diff mbox series

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

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

Commit Message

Github ODP bot Nov. 13, 2017, 2 a.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: d4ef7e80916d7a2c5f5fb1032bed9e07488cbe69
 **/
 test/validation/api/crypto/odp_crypto_test_inp.c | 5 +++++
 1 file changed, 5 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..94f2dcf51 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,8 @@  static int alg_packet_op_enq(odp_packet_t pkt,
 		return rc;
 	}
 
+	CU_ASSERT((!odp_packet_has_error(pkt)) == result.ok);
+
 	*ok = result.ok;
 
 	return 0;