test/crypto: fix return value for snow3g testcase
Checks
Commit Message
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: e23eccfd281e ("test/crypto: fix bitwise operator in a SNOW3G case")
Cc: kai.ji@intel.com
Cc: stable@dpdk.org
Signed-off-by: Saoirse O'Donovan <saoirse.odonovan@intel.com>
---
app/test/test_cryptodev.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
Comments
Hi Saoirse,
> -----Original Message-----
> From: Saoirse O'Donovan <saoirse.odonovan@intel.com>
> Sent: Friday 14 April 2023 14:55
> To: Akhil Goyal <gakhil@marvell.com>; Fan Zhang
> <fanzhang.oss@gmail.com>
> Cc: dev@dpdk.org; O'Donovan, Saoirse <saoirse.odonovan@intel.com>; Ji,
> Kai <kai.ji@intel.com>; stable@dpdk.org
> Subject: [PATCH] test/crypto: fix return value for snow3g testcase
>
> 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: e23eccfd281e ("test/crypto: fix bitwise operator in a SNOW3G case")
> Cc: kai.ji@intel.com
> Cc: stable@dpdk.org
>
> Signed-off-by: Saoirse O'Donovan <saoirse.odonovan@intel.com>
> ---
> app/test/test_cryptodev.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
Acked-by: Ciara Power <ciara.power@intel.com>
>
> Acked-by: Ciara Power <ciara.power@intel.com>
Applied to dpdk-next-crypto
Thanks.
@@ -6944,6 +6944,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;
@@ -6962,8 +6963,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);
}