[PATCH 2/2] test/crypto: handle return code
Anoob Joseph
anoobj at marvell.com
Fri May 12 16:09:46 CEST 2023
The sub test case, test_snow3g_decryption, may fail for non-critical
reasons such as lack of support. Handle the return value gracefully to
allow TEST_SKIPPED return value to be propagated correctly.
Signed-off-by: Anoob Joseph <anoobj at marvell.com>
---
app/test/test_cryptodev.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 86e63a33fc..d212e71ba6 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -6947,6 +6947,7 @@ test_snow3g_decryption_with_digest_test_case_1(void)
struct snow3g_hash_test_data snow3g_hash_data;
struct rte_cryptodev_info dev_info;
struct crypto_testsuite_params *ts_params = &testsuite_params;
+ int ret;
rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
uint64_t feat_flags = dev_info.feature_flags;
@@ -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 != TEST_SUCCESS)
+ return ret;
return test_snow3g_authentication_verify(&snow3g_hash_data);
}
--
2.25.1
More information about the dev
mailing list