Skip to contentSkip to conversation

test/crypto: fix errors for test stats testcase

PATCH Applied Saoirse O'Donovan 3 participants 3 messages Mar 20, 2023 – Mar 28, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 test/crypto: fix errors for test stats testcase

The test stats testcase was printing the same error message for multiple errors in the test stats testcase. This is now replaced with descriptive error messages, which match the cause of the failure.

Fixes 202d375 ("app/test: add cryptodev unit and performance tests")
---
 .mailmap                  |  1 +
 app/test/test_cryptodev.c | 12 ++++++------
 2 files changed, 7 insertions(+), 6 deletions(-)
.mailmap +1 -0
index 4018f0fc47..f61972b63d 100644
@@ -1175,6 +1175,7 @@ Sangjin Han <[email protected]>
 Sankar Chokkalingam <[email protected]>
 Santoshkumar Karanappa Rastapur <[email protected]>
 Santosh Shukla <[email protected]> <[email protected]>
+Saoirse O'Donovan <[email protected]>
 Saori Usami <[email protected]>
 Sarath Somasekharan <[email protected]>
 Sarosh Arif <[email protected]>
app/test/test_cryptodev.c +6 -6
index af3d89b9c7..59cf3ec40f 100644
@@ -12335,11 +12335,11 @@ test_stats(void)
 	TEST_ASSERT((stats.enqueued_count == 1),
 		"rte_cryptodev_stats_get returned unexpected enqueued stat");
 	TEST_ASSERT((stats.dequeued_count == 1),
-		"rte_cryptodev_stats_get returned unexpected enqueued stat");
+		"rte_cryptodev_stats_get returned unexpected dequeued stat");
 	TEST_ASSERT((stats.enqueue_err_count == 0),
-		"rte_cryptodev_stats_get returned unexpected enqueued stat");
+		"rte_cryptodev_stats_get returned unexpected enqueued error count stat");
 	TEST_ASSERT((stats.dequeue_err_count == 0),
-		"rte_cryptodev_stats_get returned unexpected enqueued stat");
+		"rte_cryptodev_stats_get returned unexpected dequeued error count stat");
 
 	/* invalid device but should ignore and not reset device stats*/
 	rte_cryptodev_stats_reset(ts_params->valid_devs[0] + 300);
@@ -12347,7 +12347,7 @@ test_stats(void)
 			&stats),
 		"rte_cryptodev_stats_get failed");
 	TEST_ASSERT((stats.enqueued_count == 1),
-		"rte_cryptodev_stats_get returned unexpected enqueued stat");
+		"rte_cryptodev_stats_get returned unexpected enqueued stat after invalid reset");
 
 	/* check that a valid reset clears stats */
 	rte_cryptodev_stats_reset(ts_params->valid_devs[0]);
@@ -12355,9 +12355,9 @@ test_stats(void)
 			&stats),
 					  "rte_cryptodev_stats_get failed");
 	TEST_ASSERT((stats.enqueued_count == 0),
-		"rte_cryptodev_stats_get returned unexpected enqueued stat");
+		"rte_cryptodev_stats_get returned unexpected enqueued stat after valid reset");
 	TEST_ASSERT((stats.dequeued_count == 0),
-		"rte_cryptodev_stats_get returned unexpected enqueued stat");
+		"rte_cryptodev_stats_get returned unexpected dequeued stat after valid reset");
 
 	return TEST_SUCCESS;
 }
Signature · 1 line
2.25.1
Acked-by on v1 1/1
#1 lore raw

Hi Saoirse,

Quoted 17 lines

-----Original Message-----
From: Saoirse O'Donovan <[email protected]>
Sent: Monday 20 March 2023 09:30
To: Thomas Monjalon <[email protected]>; Akhil Goyal <[email protected]>; Fan Zhang <[email protected]>
Cc: [email protected]; O'Donovan, Saoirse <[email protected]>; [email protected]; Doherty, Declan <[email protected]>
Subject: [PATCH] test/crypto: fix errors for test stats testcase

The test stats testcase was printing the same error message for multiple errors in the test stats testcase. This is now replaced with descriptive error messages, which match the cause of the failure.

Fixes 202d375 ("app/test: add cryptodev unit and performance tests")
Quoted 5 lines
---
 .mailmap                  |  1 +
 app/test/test_cryptodev.c | 12 ++++++------
 2 files changed, 7 insertions(+), 6 deletions(-)
Applied
#2 lore raw
Quoted 12 lines

Hi Saoirse,

Quoted 10 lines

Subject: [PATCH] test/crypto: fix errors for test stats testcase

The test stats testcase was printing the same error message for multiple errors in the test stats testcase. This is now replaced with descriptive error messages, which match the cause of the failure.

Fixes 202d375 ("app/test: add cryptodev unit and performance tests")
Quoted 7 lines
Quoted 5 lines
---
 .mailmap                  |  1 +
 app/test/test_cryptodev.c | 12 ++++++------
 2 files changed, 7 insertions(+), 6 deletions(-)

Applied to dpdk-next-crypto

Changed title to "test/crypto: fix stats case error messages"