diff mbox series

[API-NEXT,v1,3/3] validation: crypto: check error flag being set

Message ID 1510502406-25607-4-git-send-email-odpbot@yandex.ru
State Superseded
Headers show
Series [API-NEXT,v1,1/3] linux-gen: crypto: drop extra memcpy on result return | expand

Commit Message

Github ODP bot Nov. 12, 2017, 4 p.m. UTC
From: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>


Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>

---
/** Email created from pull request 294 (lumag:crypto-err-flag)
 ** https://github.com/Linaro/odp/pull/294
 ** Patch: https://github.com/Linaro/odp/pull/294.patch
 ** Base sha: a908a4dead95321e84d6a8a23de060051dcd8969
 ** Merge commit sha: 5a1039aa1f26df3ca3cbb44a047116fe285b5dbc
 **/
 test/validation/api/crypto/odp_crypto_test_inp.c | 8 ++++++++
 1 file changed, 8 insertions(+)
diff mbox series

Patch

diff --git a/test/validation/api/crypto/odp_crypto_test_inp.c b/test/validation/api/crypto/odp_crypto_test_inp.c
index 1f7523de2..40c3a0076 100644
--- a/test/validation/api/crypto/odp_crypto_test_inp.c
+++ b/test/validation/api/crypto/odp_crypto_test_inp.c
@@ -201,6 +201,9 @@  static int alg_packet_op(odp_packet_t pkt,
 		return rc;
 	}
 
+	if (!result.ok)
+		CU_ASSERT(odp_packet_has_error(pkt));
+
 	*ok = result.ok;
 
 	return 0;
@@ -270,6 +273,11 @@  static int alg_packet_op_enq(odp_packet_t pkt,
 		return rc;
 	}
 
+	if (!result.ok)
+		CU_ASSERT(odp_packet_has_error(pkt))
+	else
+		CU_ASSERT(!odp_packet_has_error(pkt));
+
 	*ok = result.ok;
 
 	return 0;