pam-u2f can be tested as follows: 1. Build a Docker image containing everything needed to run pam-u2f. This can be achieved through the command: $ docker build -t pam-u2f-test -f tests/bionic/Dockerfile . 2. Connect a YubiKey to the host OS and take note of the path of the device's U2F endpoint (e.g. /dev/hidraw6). 3. Execute tests/bionic/run.sh in a container, exposing the YubiKey to the guest OS. This can be done through the command: $ docker run -it --rm=true --device=/dev/hidraw6 \ pam-u2f-test /pam-u2f/tests/bionic/run.sh To test U2F devices, pass -e U2F_TOKEN=1 to docker-run. To test FIDO2 devices configured with a PIN, pass -e FIDO2_PIN=1 to docker-run.