Page MenuHomeFreeBSD

Skip tests with missing test vectors instead of failing.
ClosedPublic

Authored by jhb on Apr 23 2019, 9:58 PM.
Tags
None
Referenced Files
Unknown Object (File)
Oct 24 2024, 3:25 PM
Unknown Object (File)
Oct 18 2024, 9:40 AM
Unknown Object (File)
Oct 18 2024, 12:39 AM
Unknown Object (File)
Oct 3 2024, 2:16 PM
Unknown Object (File)
Sep 12 2024, 12:22 AM
Unknown Object (File)
Sep 10 2024, 2:58 AM
Unknown Object (File)
Sep 7 2024, 8:09 AM
Unknown Object (File)
Sep 5 2024, 11:40 PM
Subscribers

Details

Summary

This copes more gracefully when older version of the nist-kat package
are intalled that don't have newer test vectors such as CCM or plain
SHA.

If the nist-kat package is not installed at all, this still fails with
an error.

Test Plan
  • ran updated cryptotest.py with CCM and plain SHA support against older nist-kat package and now get skips instead of failures.

Diff Detail

Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 23857
Build 22792: arc lint + arc unit

Event Timeline

I think this should go in before the CCM and plain SHA changes so that Jenkins doesn't blow up with new failures due to the updated nist-kat package not yet being available.

LGTM. I'm assuming the message is printed and not silently discarded if tests are skipped when running on the command line? I don't want silent "success" when KAT vectors are missing.

This revision is now accepted and ready to land.Apr 23 2019, 11:15 PM

By default you just get a 's' in output instead of '.' With '-v' you get the full message:

# python2.7 ./cryptotest.py
.s.s.s..s.s...
----------------------------------------------------------------------
Ran 14 tests in 5.735s

# python2.7 ./cryptotest.py -v
test_cbc (__main__.GendCryptoTestCase) ... ok
test_ccm (__main__.GendCryptoTestCase) ... skipped 'Missing ccmtestvectors test vectors'
test_gcm (__main__.GendCryptoTestCase) ... ok
test_sha (__main__.GendCryptoTestCase) ... skipped 'Missing shabytetestvectors test vectors'
test_sha1hmac (__main__.GendCryptoTestCase) ... ok
test_tdes (__main__.GendCryptoTestCase) ... skipped 'skipping DES on ccr0'
test_xts (__main__.GendCryptoTestCase) ... ok
test_cbc (__main__.GendCryptoTestCase) ... ok
test_ccm (__main__.GendCryptoTestCase) ... skipped 'Missing ccmtestvectors test vectors'
test_gcm (__main__.GendCryptoTestCase) ... ok
test_sha (__main__.GendCryptoTestCase) ... skipped 'Missing shabytetestvectors test vectors'
test_sha1hmac (__main__.GendCryptoTestCase) ... ok
test_tdes (__main__.GendCryptoTestCase) ... ok
test_xts (__main__.GendCryptoTestCase) ... ok

----------------------------------------------------------------------
Ran 14 tests in 5.699s

OK (skipped=5)
In D20034#430600, @jhb wrote:

By default you just get a 's' in output instead of '.' With '-v' you get the full message:

Works for me, thanks.

This revision was automatically updated to reflect the committed changes.