Nitrokey / nitrokey-3-tests

Automated tests for the Nitrokey 3
3 stars 0 forks source link

Add CTAP2 test suite #29

Open robin-nitrokey opened 1 year ago

robin-nitrokey commented 1 year ago

This patch adds the CTAP2-test-tool test suite from https://github.com/google/CTAP2-test-tool. To make it easier to follow the test execution and to identify problematic test cases, each test case from CTAP2-test-tool is mapped to a test case in our test suite. This adds significant overhead though because the test environment has to be setup separately for each test case.

Limitations:

sosthene-nitrokey commented 1 year ago

Sometimes, it takes several attempts to attach the usbip device. In some cases, this means that the reset time window is expired once the test suite tries to perform a reset after a reboot. We could try to restart the binary after every failed attach to work around this issue.

But since attaching needs multiple attempts each time wouldn't that just loop infinitely?

robin-nitrokey commented 1 year ago

But since attaching needs multiple attempts each time wouldn't that just loop infinitely?

I would consider two calls to usbip attach as one attempt, which works at least 9 out of 10 times for me. So the chances should be pretty high that it works after two attempts.