test/crypto: fix errors for test stats testcase

Message ID 20230320092956.8576-1-saoirse.odonovan@intel.com (mailing list archive)
State Accepted, archived
Delegated to: akhil goyal
Headers
Series test/crypto: fix errors for test stats testcase |

Checks

Context Check Description
ci/checkpatch warning coding style issues
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/Intel-compilation success Compilation OK
ci/iol-intel-Performance success Performance Testing PASS
ci/github-robot: build success github build: passed
ci/iol-x86_64-compile-testing success Testing PASS
ci/intel-Testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/intel-Functional success Functional PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-unit-testing success Testing PASS
ci/iol-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS

Commit Message

O'Donovan, Saoirse March 20, 2023, 9:29 a.m. UTC
  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")
Cc: stable@dpdk.org
Cc: declan.doherty@intel.com

Signed-off-by: Saoirse O'Donovan <saoirse.odonovan@intel.com>
---
 .mailmap                  |  1 +
 app/test/test_cryptodev.c | 12 ++++++------
 2 files changed, 7 insertions(+), 6 deletions(-)
  

Comments

Power, Ciara March 20, 2023, 9:40 a.m. UTC | #1
Hi Saoirse,

> -----Original Message-----
> From: Saoirse O'Donovan <saoirse.odonovan@intel.com>
> Sent: Monday 20 March 2023 09:30
> To: Thomas Monjalon <thomas@monjalon.net>; Akhil Goyal
> <gakhil@marvell.com>; Fan Zhang <fanzhang.oss@gmail.com>
> Cc: dev@dpdk.org; O'Donovan, Saoirse <saoirse.odonovan@intel.com>;
> stable@dpdk.org; Doherty, Declan <declan.doherty@intel.com>
> 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")
> Cc: stable@dpdk.org
> Cc: declan.doherty@intel.com
> 
> Signed-off-by: Saoirse O'Donovan <saoirse.odonovan@intel.com>
> ---
>  .mailmap                  |  1 +
>  app/test/test_cryptodev.c | 12 ++++++------
>  2 files changed, 7 insertions(+), 6 deletions(-)

Acked-by: Ciara Power <ciara.power@intel.com>
  
Akhil Goyal March 28, 2023, 6:37 a.m. UTC | #2
> Hi Saoirse,
> 
> > 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")
> > Cc: stable@dpdk.org
> > Cc: declan.doherty@intel.com
> >
> > Signed-off-by: Saoirse O'Donovan <saoirse.odonovan@intel.com>
> > ---
> >  .mailmap                  |  1 +
> >  app/test/test_cryptodev.c | 12 ++++++------
> >  2 files changed, 7 insertions(+), 6 deletions(-)
> 
> Acked-by: Ciara Power <ciara.power@intel.com>

Applied to dpdk-next-crypto

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

Patch

diff --git a/.mailmap b/.mailmap
index 4018f0fc47..f61972b63d 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1175,6 +1175,7 @@  Sangjin Han <sangjin@eecs.berkeley.edu>
 Sankar Chokkalingam <sankarx.chokkalingam@intel.com>
 Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
 Santosh Shukla <santosh.shukla@caviumnetworks.com> <sshukla@mvista.com>
+Saoirse O'Donovan <saoirse.odonovan@intel.com>
 Saori Usami <susami@igel.co.jp>
 Sarath Somasekharan <sarathx.somasekharan@intel.com>
 Sarosh Arif <sarosh.arif@emumba.com>
diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index af3d89b9c7..59cf3ec40f 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -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;
 }