redhat-qe-security / SCAutolib

Library for automation of smart card testing
GNU General Public License v3.0
3 stars 10 forks source link

Add "allowed exit codes" to check_output function #20

Closed mahavrila closed 2 years ago

mahavrila commented 2 years ago

In certain scenarios, it could be beneficial to check that exit code of command has exact (non-zero) value. Example: We test that SC authentication fails if user types wrong pin. We evaluate presence of string "Authentication failure" and if this string is present, our test pass. However, we need to turn off (which is default) check of exit code because failing authentication will of course provide (expected) non-zero exit code. It would be nice to monitor exit code of failing authentication to make sure it has always the same value - it's failing the same way.

P.S.: This does not hurry.

x00Pavel commented 2 years ago

Now there is run function what checks return code of the command by default