Skip to content

Commit

Permalink
test/crypto: fix return value for SNOW3G
Browse files Browse the repository at this point in the history
[ upstream commit 7ae50175c7e785ff258c3dc0e44dc80e89af79ac ]

Unit tests were failing due to the return value of the decryption and
authentication functions not being handled correctly. This has now been
modified to return the expected test status.

Fixes: e23eccf ("test/crypto: fix bitwise operator in a SNOW3G case")

Signed-off-by: Saoirse O'Donovan <saoirse.odonovan@intel.com>
Acked-by: Ciara Power <ciara.power@intel.com>
  • Loading branch information
saoirseod authored and kevintraynor committed Jul 11, 2023
1 parent 792da5f commit c4583cd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/test/test_cryptodev.c
Original file line number Diff line number Diff line change
Expand Up @@ -6879,6 +6879,7 @@ snow3g_hash_test_vector_setup(const struct snow3g_test_data *pattern,
static int
test_snow3g_decryption_with_digest_test_case_1(void)
{
int ret;
struct snow3g_hash_test_data snow3g_hash_data;
struct rte_cryptodev_info dev_info;
struct crypto_testsuite_params *ts_params = &testsuite_params;
Expand All @@ -6897,8 +6898,9 @@ test_snow3g_decryption_with_digest_test_case_1(void)
*/
snow3g_hash_test_vector_setup(&snow3g_test_case_7, &snow3g_hash_data);

if (test_snow3g_decryption(&snow3g_test_case_7))
return TEST_FAILED;
ret = test_snow3g_decryption(&snow3g_test_case_7);
if (ret != 0)
return ret;

return test_snow3g_authentication_verify(&snow3g_hash_data);
}
Expand Down

0 comments on commit c4583cd

Please sign in to comment.