diff options
author | Janne Peltonen <janne.peltonen@nokia.com> | 2023-04-05 14:39:00 +0300 |
---|---|---|
committer | Petri Savolainen <petri.savolainen@nokia.com> | 2023-04-06 09:11:13 +0300 |
commit | 4d162f58fa3909480cd8bab44fad3f2b5ce64143 (patch) | |
tree | c32198fef9d4725815f89b67bf41455462c46a97 /test | |
parent | 291d293463dac12cf63396846171a7867c66466f (diff) |
validation: crypto: test all digest lengths in full test only
By default, test only digest lengths divisible by four to reduce test
run time in case an ODP implementation supports any digest length up to
a maximum. In most real use cases digest/MAC lengths are divisible by four.
Test all digest lengths in full test.
Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com>
Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/validation/api/crypto/odp_crypto_test_inp.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/validation/api/crypto/odp_crypto_test_inp.c b/test/validation/api/crypto/odp_crypto_test_inp.c index 3c1b725c2..89b16457e 100644 --- a/test/validation/api/crypto/odp_crypto_test_inp.c +++ b/test/validation/api/crypto/odp_crypto_test_inp.c @@ -1672,6 +1672,9 @@ static void test_auth_hash_in_auth_range(odp_auth_alg_t auth, const odp_packet_data_range_t cipher_range = {.offset = 0, .length = 0}; odp_packet_data_range_t auth_range; + if (!full_test && capa->digest_len % 4 != 0) + return; + /* * Create test packets with auth hash in the authenticated range and * zeroes in the hash location in the plaintext packet. @@ -2260,6 +2263,9 @@ static void test_combo(const crypto_suite_t *suite, /* Iterate and test different cipher/auth range and hash locations */ static void test_combo_ranges(const crypto_suite_t *suite) { + if (!full_test && suite->auth_capa->digest_len % 4 != 0) + return; + for (int overlap = 0; overlap < NUM_RANGE_OVERLAPS; overlap++) for (int location = 0; location < NUM_HASH_LOCATIONS; location++) { if (suite->order == AUTH_CIPHERTEXT && |