DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/2] test/crypto: change the failure condition check
@ 2019-10-01 11:41 Hemant Agrawal
  2019-10-01 11:41 ` [dpdk-dev] [PATCH 2/2] test/crypto: add negative test support for dpaaX Hemant Agrawal
  0 siblings, 1 reply; 3+ messages in thread
From: Hemant Agrawal @ 2019-10-01 11:41 UTC (permalink / raw)
  To: dev; +Cc: akhil.goyal, Hemant Agrawal

In some of the cases, the test is looking for a specific
failure returned from the CryptoDev. Not all cryptodev
support returning specific errors.
This patch changes such checks to NOT-SUCCESS

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 app/test/test_cryptodev.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 4197febb0..915acf13c 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -9410,8 +9410,8 @@ test_authentication_verify_fail_when_data_corruption(
 	ut_params->op = process_crypto_request(ts_params->valid_devs[0],
 			ut_params->op);
 	TEST_ASSERT_NOT_NULL(ut_params->op, "failed crypto process");
-	TEST_ASSERT_EQUAL(ut_params->op->status,
-			RTE_CRYPTO_OP_STATUS_AUTH_FAILED,
+	TEST_ASSERT_NOT_EQUAL(ut_params->op->status,
+			RTE_CRYPTO_OP_STATUS_SUCCESS,
 			"authentication not failed");
 
 	ut_params->obuf = ut_params->op->sym->m_src;
@@ -9471,8 +9471,8 @@ test_authentication_verify_GMAC_fail_when_corruption(
 	ut_params->op = process_crypto_request(ts_params->valid_devs[0],
 			ut_params->op);
 	TEST_ASSERT_NOT_NULL(ut_params->op, "failed crypto process");
-	TEST_ASSERT_EQUAL(ut_params->op->status,
-			RTE_CRYPTO_OP_STATUS_AUTH_FAILED,
+	TEST_ASSERT_NOT_EQUAL(ut_params->op->status,
+			RTE_CRYPTO_OP_STATUS_SUCCESS,
 			"authentication not failed");
 
 	ut_params->obuf = ut_params->op->sym->m_src;
@@ -9532,8 +9532,8 @@ test_authenticated_decryption_fail_when_corruption(
 			ut_params->op);
 
 	TEST_ASSERT_NOT_NULL(ut_params->op, "failed crypto process");
-	TEST_ASSERT_EQUAL(ut_params->op->status,
-			RTE_CRYPTO_OP_STATUS_AUTH_FAILED,
+	TEST_ASSERT_NOT_EQUAL(ut_params->op->status,
+			RTE_CRYPTO_OP_STATUS_SUCCESS,
 			"authentication not failed");
 
 	ut_params->obuf = ut_params->op->sym->m_src;
-- 
2.17.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-10-03 14:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-01 11:41 [dpdk-dev] [PATCH 1/2] test/crypto: change the failure condition check Hemant Agrawal
2019-10-01 11:41 ` [dpdk-dev] [PATCH 2/2] test/crypto: add negative test support for dpaaX Hemant Agrawal
2019-10-03 14:13   ` Akhil Goyal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).