aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorTaras Kondratiuk <taras.kondratiuk@linaro.org>2015-02-25 13:14:04 +0200
committerMaxim Uvarov <maxim.uvarov@linaro.org>2015-02-26 15:36:48 +0300
commit46d3f78ae6843e5510fffd1aea5dd778641ad925 (patch)
treee2a97eb28d8a8774d9a67a4d6bb48d4fe09102da /test
parentdcd6e6690f42b19c1c70b31e1bd1d126a20ac92c (diff)
validation: crypto: verify odp_crypto_operation() return code
It doesn't make sense to process crypto operation results if operation have failed. Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org> Reviewed-and-tested-by: Robbie King <robking@cisco.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'test')
-rw-r--r--test/validation/crypto/odp_crypto_test_async_inp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/validation/crypto/odp_crypto_test_async_inp.c b/test/validation/crypto/odp_crypto_test_async_inp.c
index 44f8e2033..3e478848c 100644
--- a/test/validation/crypto/odp_crypto_test_async_inp.c
+++ b/test/validation/crypto/odp_crypto_test_async_inp.c
@@ -91,6 +91,10 @@ static void alg_test(enum odp_crypto_op op,
}
rc = odp_crypto_operation(&op_params, &posted, NULL);
+ if (rc < 0) {
+ odp_packet_free(pkt);
+ CU_FAIL_FATAL("Failed odp_crypto_operation()");
+ }
CU_ASSERT(posted);
/* Poll completion queue for results */