[v1] test/crypto: fix synchronous API call

Message ID 20241025142251.1149785-1-brian.dooley@intel.com (mailing list archive)
State Accepted, archived
Delegated to: akhil goyal
Headers
Series [v1] test/crypto: fix synchronous API call |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/github-robot: build success github build: passed
ci/intel-Functional success Functional PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-marvell-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-compile-arm64-testing success Testing PASS
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-compile-amd64-testing success Testing PASS
ci/iol-sample-apps-testing success Testing PASS

Commit Message

Dooley, Brian Oct. 25, 2024, 2:22 p.m. UTC
For the synchronous API the enqueue/dequeue burst functions are not
called. Skip these tests when calling the synchronous API.

Fixes: 4ad17a1c8fb3 ("test/crypto: fix enqueue/dequeue callback case")
Cc: stable@dpdk.org

Signed-off-by: Brian Dooley <brian.dooley@intel.com>
---
 app/test/test_cryptodev.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
  

Comments

Akhil Goyal Nov. 6, 2024, 11:31 a.m. UTC | #1
> For the synchronous API the enqueue/dequeue burst functions are not
> called. Skip these tests when calling the synchronous API.
> 
> Fixes: 4ad17a1c8fb3 ("test/crypto: fix enqueue/dequeue callback case")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Brian Dooley <brian.dooley@intel.com>
Applied to dpdk-next-crypto
Thanks.
  

Patch

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 25eef342b0..c647baeee1 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -2496,7 +2496,8 @@  test_queue_pair_descriptor_count(void)
 	int qp_depth = 0;
 	int i;
 
-	RTE_VERIFY(gbl_action_type != RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO);
+	if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO)
+		return TEST_SKIPPED;
 
 	/* Verify if the queue pair depth API is supported by driver */
 	qp_depth = rte_cryptodev_qp_depth_used(ts_params->valid_devs[0], 0);
@@ -15135,6 +15136,10 @@  test_enq_callback_setup(void)
 	uint16_t qp_id = 0;
 	int j = 0;
 
+	/* Skip test if synchronous API is used */
+	if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO)
+		return TEST_SKIPPED;
+
 	/* Verify the crypto capabilities for which enqueue/dequeue is done. */
 	cap_idx.type = RTE_CRYPTO_SYM_XFORM_AUTH;
 	cap_idx.algo.auth = RTE_CRYPTO_AUTH_NULL;
@@ -15256,6 +15261,10 @@  test_deq_callback_setup(void)
 	uint16_t qp_id = 0;
 	int j = 0;
 
+	/* Skip test if synchronous API is used */
+	if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO)
+		return TEST_SKIPPED;
+
 	/* Verify the crypto capabilities for which enqueue/dequeue is done. */
 	cap_idx.type = RTE_CRYPTO_SYM_XFORM_AUTH;
 	cap_idx.algo.auth = RTE_CRYPTO_AUTH_NULL;