Conversation
05749af to
f68f19a
Compare
|
@mguetschow or @leandrolanzieri can you take a look ? |
|
Just wanted to take the opportunity at the Hack'n'ACK to have a look, but I cannot get the test to run on my machine on current |
Did you connect a cable to the second USB port ? This is needed. |
|
Ah no, that was it. Seemed to work on |
Yeah good idea. I can add this information to the README |
|
Is this blocked by waiting for the change in the README? |
|
No, by someone (maybe me) not looking at it again as promised 🙈 Will add it to my todo list for the Hack'n'ACK on Tuesday. |
|
@Ollrogge just had another look. It works on master now, but there seems to be a merge conflict with this PR (some changes to |
|
Would you mind rebasing on master to also see the complete diff in Github? |
f68f19a to
67f4110
Compare
bcd8c11 to
2664410
Compare
I think this was because you didn't first build the application itself. This is required because it also builds the |
Done + improved the README |
|
@mguetschow can you take another look when you have time ? :) |
mguetschow
left a comment
There was a problem hiding this comment.
make fido2-test now worked for me, but make fido2-test-up (after adapting the Makefile to include CFLAGS += -DCONFIG_FIDO2_CTAP_DISABLE_UP=0 and reflashing) always gives:
make -C tests/sys/fido2_ctap_hid BOARD=nrf52840dk fido2-test-up
make: Entering directory '/home/mikolai/TUD/Code/RIOT/tests/sys/fido2_ctap_hid'
env -i PATH=/home/mikolai/.deno/bin:/home/mikolai/.cargo/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/home/mikolai/.local/bin:/home/mikolai/.local/bin:/home/mikolai/.vscode-oss/extensions/ms-python.debugpy-2025.0.0-linux-x64/bundled/scripts/noConfigScripts:/home/mikolai/.local/bin make -C /home/mikolai/.riot/pkg/fido2_tests up-tests
make: Entering directory '/home/mikolai/.riot/pkg/fido2_tests'
/bin/sh: 1: python: not found
/bin/sh: 1: python: not found
venv/bin/pytest tests/standard/fido2/user_presence -s
================================================================================================================================================================================ test session starts ================================================================================================================================================================================
platform linux -- Python 3.11.2, pytest-8.3.4, pluggy-1.5.0
rootdir: /home/mikolai/.riot/pkg/fido2_tests
plugins: ordering-0.6, timeout-2.3.1, rerunfailures-15.0
collected 6 items
tests/standard/fido2/user_presence/test_user_presence.py --- HID ---
[CtapHidDevice(/dev/hidraw5)]
Resetting Authenticator...
EEEsEDO NOT ACTIVATE UP
.
====================================================================================================================================================================================== ERRORS =======================================================================================================================================================================================
________________________________________________________________________________________________________________________________________________________ ERROR at setup of TestUserPresence.test_user_presence_instructions _________________________________________________________________________________________________________________________________________________________
device = <tests.conftest.TestDevice object at 0x7f230c092f50>, MCRes = AttestationObject(fmt: 'packed', auth_data: AuthenticatorData(rp_id_hash: h'bfabc37432958b063360d3ad6461c9c4735ae7f8ed...\xcd\xf7{\x02!\x00\xe7\xff\x8e\x0420\x85\xd3a\x13\xda\xa2!\x1c\xd5z\xd1\x1a\xbfU\x0b\x1a\xb9&\xcev\x92W\xad\xd7\xf7s'})
@pytest.fixture(scope="class")
def GARes(device, MCRes):
req = FidoRequest(
allow_list=[
{"id": MCRes.auth_data.credential_data.credential_id, "type": "public-key"}
]
)
> res = device.sendGA(*req.toGA())
tests/conftest.py:64:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/conftest.py:464: in sendGA
return self.ctap2.get_assertion(*args, **kwargs)
venv/lib/python3.11/site-packages/fido2/ctap2.py:734: in get_assertion
return self.send_cbor(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <fido2.ctap2.CTAP2 object at 0x7f230adec450>, cmd = <CMD.GET_ASSERTION: 2>, data = {1: 'example.org', 2: b'123456789abcdef0123456789abcdef0', 3: [{'id': b"k>,\xa1z\xdbsz\xc5\xa4\x00\x86\xccB\xf1\x8d\xe...t\xd4@)\x01\x08\xf5+\xde\x1f\xcf,Z\x12\x1e\xcb_\xc7\xdbUp\xba|4\x1cF\xf9\x0fTO7\xc9\x85}\x9a)", 'type': 'public-key'}]}, event = None
parse = <class 'fido2.ctap2.AssertionResponse'>, on_keepalive = <tests.vendor.solo.utils.DeviceSelectCredential object at 0x7f230adb5350>
def send_cbor(
self, cmd, data=None, event=None, parse=cbor.decode, on_keepalive=None
):
"""Sends a CBOR message to the device, and waits for a response.
:param cmd: The command byte of the request.
:param data: The payload to send (to be CBOR encoded).
:param event: Optional threading.Event used to cancel the request.
:param parse: Function used to parse the binary response data, defaults
to parsing the CBOR.
:param on_keepalive: Optional function called when keep-alive is sent by
the authenticator.
:return: The result of calling the parse function on the response data
(defaults to the CBOR decoded value).
"""
request = struct.pack(">B", cmd)
if data is not None:
request += cbor.encode(data)
response = self.device.call(CTAPHID.CBOR, request, event, on_keepalive)
status = six.indexbytes(response, 0)
if status != 0x00:
> raise CtapError(status)
E fido2.ctap.CtapError: CTAP error: 0x27 - OPERATION_DENIED
venv/lib/python3.11/site-packages/fido2/ctap2.py:645: CtapError
_______________________________________________________________________________________________________________________________________________________________ ERROR at setup of TestUserPresence.test_user_presence _______________________________________________________________________________________________________________________________________________________________
device = <tests.conftest.TestDevice object at 0x7f230c092f50>, MCRes = AttestationObject(fmt: 'packed', auth_data: AuthenticatorData(rp_id_hash: h'bfabc37432958b063360d3ad6461c9c4735ae7f8ed...\xcd\xf7{\x02!\x00\xe7\xff\x8e\x0420\x85\xd3a\x13\xda\xa2!\x1c\xd5z\xd1\x1a\xbfU\x0b\x1a\xb9&\xcev\x92W\xad\xd7\xf7s'})
@pytest.fixture(scope="class")
def GARes(device, MCRes):
req = FidoRequest(
allow_list=[
{"id": MCRes.auth_data.credential_data.credential_id, "type": "public-key"}
]
)
> res = device.sendGA(*req.toGA())
tests/conftest.py:64:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/conftest.py:464: in sendGA
return self.ctap2.get_assertion(*args, **kwargs)
venv/lib/python3.11/site-packages/fido2/ctap2.py:734: in get_assertion
return self.send_cbor(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <fido2.ctap2.CTAP2 object at 0x7f230adec450>, cmd = <CMD.GET_ASSERTION: 2>, data = {1: 'example.org', 2: b'123456789abcdef0123456789abcdef0', 3: [{'id': b"k>,\xa1z\xdbsz\xc5\xa4\x00\x86\xccB\xf1\x8d\xe...t\xd4@)\x01\x08\xf5+\xde\x1f\xcf,Z\x12\x1e\xcb_\xc7\xdbUp\xba|4\x1cF\xf9\x0fTO7\xc9\x85}\x9a)", 'type': 'public-key'}]}, event = None
parse = <class 'fido2.ctap2.AssertionResponse'>, on_keepalive = <tests.vendor.solo.utils.DeviceSelectCredential object at 0x7f230adb5350>
def send_cbor(
self, cmd, data=None, event=None, parse=cbor.decode, on_keepalive=None
):
"""Sends a CBOR message to the device, and waits for a response.
:param cmd: The command byte of the request.
:param data: The payload to send (to be CBOR encoded).
:param event: Optional threading.Event used to cancel the request.
:param parse: Function used to parse the binary response data, defaults
to parsing the CBOR.
:param on_keepalive: Optional function called when keep-alive is sent by
the authenticator.
:return: The result of calling the parse function on the response data
(defaults to the CBOR decoded value).
"""
request = struct.pack(">B", cmd)
if data is not None:
request += cbor.encode(data)
response = self.device.call(CTAPHID.CBOR, request, event, on_keepalive)
status = six.indexbytes(response, 0)
if status != 0x00:
> raise CtapError(status)
E fido2.ctap.CtapError: CTAP error: 0x27 - OPERATION_DENIED
venv/lib/python3.11/site-packages/fido2/ctap2.py:645: CtapError
_____________________________________________________________________________________________________________________________________________________________ ERROR at setup of TestUserPresence.test_no_user_presence ______________________________________________________________________________________________________________________________________________________________
device = <tests.conftest.TestDevice object at 0x7f230c092f50>, MCRes = AttestationObject(fmt: 'packed', auth_data: AuthenticatorData(rp_id_hash: h'bfabc37432958b063360d3ad6461c9c4735ae7f8ed...\xcd\xf7{\x02!\x00\xe7\xff\x8e\x0420\x85\xd3a\x13\xda\xa2!\x1c\xd5z\xd1\x1a\xbfU\x0b\x1a\xb9&\xcev\x92W\xad\xd7\xf7s'})
@pytest.fixture(scope="class")
def GARes(device, MCRes):
req = FidoRequest(
allow_list=[
{"id": MCRes.auth_data.credential_data.credential_id, "type": "public-key"}
]
)
> res = device.sendGA(*req.toGA())
tests/conftest.py:64:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/conftest.py:464: in sendGA
return self.ctap2.get_assertion(*args, **kwargs)
venv/lib/python3.11/site-packages/fido2/ctap2.py:734: in get_assertion
return self.send_cbor(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <fido2.ctap2.CTAP2 object at 0x7f230adec450>, cmd = <CMD.GET_ASSERTION: 2>, data = {1: 'example.org', 2: b'123456789abcdef0123456789abcdef0', 3: [{'id': b"k>,\xa1z\xdbsz\xc5\xa4\x00\x86\xccB\xf1\x8d\xe...t\xd4@)\x01\x08\xf5+\xde\x1f\xcf,Z\x12\x1e\xcb_\xc7\xdbUp\xba|4\x1cF\xf9\x0fTO7\xc9\x85}\x9a)", 'type': 'public-key'}]}, event = None
parse = <class 'fido2.ctap2.AssertionResponse'>, on_keepalive = <tests.vendor.solo.utils.DeviceSelectCredential object at 0x7f230adb5350>
def send_cbor(
self, cmd, data=None, event=None, parse=cbor.decode, on_keepalive=None
):
"""Sends a CBOR message to the device, and waits for a response.
:param cmd: The command byte of the request.
:param data: The payload to send (to be CBOR encoded).
:param event: Optional threading.Event used to cancel the request.
:param parse: Function used to parse the binary response data, defaults
to parsing the CBOR.
:param on_keepalive: Optional function called when keep-alive is sent by
the authenticator.
:return: The result of calling the parse function on the response data
(defaults to the CBOR decoded value).
"""
request = struct.pack(">B", cmd)
if data is not None:
request += cbor.encode(data)
response = self.device.call(CTAPHID.CBOR, request, event, on_keepalive)
status = six.indexbytes(response, 0)
if status != 0x00:
> raise CtapError(status)
E fido2.ctap.CtapError: CTAP error: 0x27 - OPERATION_DENIED
venv/lib/python3.11/site-packages/fido2/ctap2.py:645: CtapError
________________________________________________________________________________________________________________________________________________ ERROR at setup of TestUserPresence.test_user_presence_option_false_on_get_assertion ________________________________________________________________________________________________________________________________________________
device = <tests.conftest.TestDevice object at 0x7f230c092f50>, MCRes = AttestationObject(fmt: 'packed', auth_data: AuthenticatorData(rp_id_hash: h'bfabc37432958b063360d3ad6461c9c4735ae7f8ed...\xcd\xf7{\x02!\x00\xe7\xff\x8e\x0420\x85\xd3a\x13\xda\xa2!\x1c\xd5z\xd1\x1a\xbfU\x0b\x1a\xb9&\xcev\x92W\xad\xd7\xf7s'})
@pytest.fixture(scope="class")
def GARes(device, MCRes):
req = FidoRequest(
allow_list=[
{"id": MCRes.auth_data.credential_data.credential_id, "type": "public-key"}
]
)
> res = device.sendGA(*req.toGA())
tests/conftest.py:64:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/conftest.py:464: in sendGA
return self.ctap2.get_assertion(*args, **kwargs)
venv/lib/python3.11/site-packages/fido2/ctap2.py:734: in get_assertion
return self.send_cbor(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <fido2.ctap2.CTAP2 object at 0x7f230adec450>, cmd = <CMD.GET_ASSERTION: 2>, data = {1: 'example.org', 2: b'123456789abcdef0123456789abcdef0', 3: [{'id': b"k>,\xa1z\xdbsz\xc5\xa4\x00\x86\xccB\xf1\x8d\xe...t\xd4@)\x01\x08\xf5+\xde\x1f\xcf,Z\x12\x1e\xcb_\xc7\xdbUp\xba|4\x1cF\xf9\x0fTO7\xc9\x85}\x9a)", 'type': 'public-key'}]}, event = None
parse = <class 'fido2.ctap2.AssertionResponse'>, on_keepalive = <tests.vendor.solo.utils.DeviceSelectCredential object at 0x7f230adb5350>
def send_cbor(
self, cmd, data=None, event=None, parse=cbor.decode, on_keepalive=None
):
"""Sends a CBOR message to the device, and waits for a response.
:param cmd: The command byte of the request.
:param data: The payload to send (to be CBOR encoded).
:param event: Optional threading.Event used to cancel the request.
:param parse: Function used to parse the binary response data, defaults
to parsing the CBOR.
:param on_keepalive: Optional function called when keep-alive is sent by
the authenticator.
:return: The result of calling the parse function on the response data
(defaults to the CBOR decoded value).
"""
request = struct.pack(">B", cmd)
if data is not None:
request += cbor.encode(data)
response = self.device.call(CTAPHID.CBOR, request, event, on_keepalive)
status = six.indexbytes(response, 0)
if status != 0x00:
> raise CtapError(status)
E fido2.ctap.CtapError: CTAP error: 0x27 - OPERATION_DENIED
venv/lib/python3.11/site-packages/fido2/ctap2.py:645: CtapError
================================================================================================================================================================================= warnings summary ==================================================================================================================================================================================
<frozen importlib._bootstrap>:241
<frozen importlib._bootstrap>:241: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute
<frozen importlib._bootstrap>:241
<frozen importlib._bootstrap>:241: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
============================================================================================================================================================================== short test summary info ==============================================================================================================================================================================
ERROR tests/standard/fido2/user_presence/test_user_presence.py::TestUserPresence::test_user_presence_instructions - fido2.ctap.CtapError: CTAP error: 0x27 - OPERATION_DENIED
ERROR tests/standard/fido2/user_presence/test_user_presence.py::TestUserPresence::test_user_presence - fido2.ctap.CtapError: CTAP error: 0x27 - OPERATION_DENIED
ERROR tests/standard/fido2/user_presence/test_user_presence.py::TestUserPresence::test_no_user_presence - fido2.ctap.CtapError: CTAP error: 0x27 - OPERATION_DENIED
ERROR tests/standard/fido2/user_presence/test_user_presence.py::TestUserPresence::test_user_presence_option_false_on_get_assertion - fido2.ctap.CtapError: CTAP error: 0x27 - OPERATION_DENIED
================================================================================================================================================================ 1 passed, 1 skipped, 2 warnings, 4 errors in 2.25s =================================================================================================================================================================
sys:1: DeprecationWarning: builtin type swigvarlink has no __module__ attribute
make: *** [Makefile:22: up-tests] Error 1
make: Leaving directory '/home/mikolai/.riot/pkg/fido2_tests'
make: *** [Makefile:39: fido2-test-up] Error 2
make: Leaving directory '/home/mikolai/TUD/Code/RIOT/tests/sys/fido2_ctap_hid'
I've tried cleaning the build artifacts, including manually removing venv, but that didn't change anything. Any idea what could be the cause?
Fixed. This was a bug that caused the authenticator to not wait when user presence tests are enabled, but LED animations disabled. I would recommend enabling the LED animations as well, since it makes it easier to see when to press the button. |
56d84ed to
a120801
Compare
mguetschow
left a comment
There was a problem hiding this comment.
Two more nits, will test it again tomorrow during Hack'n'ACK.
|
Just had another try with the newest commit, and Can you double-check it works on your end? |
|
Just tested it again: make fido2-test-up
env -i PATH=/home/h0ps/.wasmtime/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/lib:/usr/local/games:/home/h0ps/go/bin:/home/h0ps/ExternalSoftware/Obsidian:/home/h0ps/.local/bin:/home/h0ps/.local/share/gem/ruby/3.0.0/bin:/bin:/home/h0ps/.rvm/bin:/home/h0ps/.cargo/bin:/home/h0ps/x-tools/aarch64-rpi3-linux-gnu/bin make -C /home/h0ps/Programming/RIOT/build/pkg/fido2_tests up-tests
make: Entering directory '/home/h0ps/Programming/RIOT/build/pkg/fido2_tests'
venv/bin/pytest tests/standard/fido2/user_presence -s
====================================== test session starts ======================================
platform linux -- Python 3.13.2, pytest-8.3.4, pluggy-1.5.0
rootdir: /home/h0ps/Programming/RIOT/build/pkg/fido2_tests
plugins: rerunfailures-15.0, timeout-2.3.1, ordering-0.6
collected 6 items
tests/standard/fido2/user_presence/test_user_presence.py --- HID ---
[CtapHidDevice(/dev/hidraw7)]
Resetting Authenticator...
Starting User Presence (UP) tests.
Follow instructions. You will have to give UP or not give UP to pass the tests.
.ACTIVATE UP ONCE
.DO NOT ACTIVATE UP
.sDO NOT ACTIVATE UP
.DO NOT ACTIVATE UP
.
======================================= warnings summary ========================================
<frozen importlib._bootstrap>:488
<frozen importlib._bootstrap>:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute
<frozen importlib._bootstrap>:488
<frozen importlib._bootstrap>:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== 5 passed, 1 skipped, 2 warnings in 26.82s ===========================
<sys>:0: DeprecationWarning: builtin type swigvarlink has no __module__ attribute
make: Leaving directory '/home/h0ps/Programming/RIOT/build/pkg/fido2_tests'The UP tests seems to work for me on the |
The authenticator did not wait for user presence when user presence tests were enabled, but LED animations were disabled.
e4b5bf5 to
3e3ad83
Compare
@mguetschow just retested both tests and got all passed for both on a new |
mguetschow
left a comment
There was a problem hiding this comment.
I've re-tested on nrf52840dk and can confirm all tests run through (although it's a bit annoying to wait long enough for the board to reboot). As a bonus, I've also tested it on feather-nrf52840-sense and can confirm it to be working there too 🎉, with this diff:
diff --git a/tests/sys/fido2_ctap_hid/Makefile b/tests/sys/fido2_ctap_hid/Makefile
index 4b3cc16110..0d1b524269 100644
--- a/tests/sys/fido2_ctap_hid/Makefile
+++ b/tests/sys/fido2_ctap_hid/Makefile
@@ -5,7 +5,8 @@ include ../Makefile.sys_common
BOARD_WHITELIST = \
nrf52840dk \
- nrf52840dongle
+ nrf52840dongle \
+ feather-nrf52840-sense
USEMODULE += fido2_ctap_transport_hid
USEPKG += fido2_testsI'd probably work with any nrf52840-based board I assume?
Just a minor nit below, afterwards this is ready to be merged from my point of view.
Thanks for testing this again :) It should theoretically work for any |
mguetschow
left a comment
There was a problem hiding this comment.
Great, let's merge then!
Contribution description
Update the fido2 test package to the latest version. Also fix a small bug in the GetAssertion & GetNextAssertion behavior which became apparent because a new test failed.
I ran all tests using the nrf5284dk and reached 100% with the ctap fix.
Testing procedure
/sys/sys/fido2_ctap