diff mbox

[dpdk-dev,13/13] app/bbdev: improve readability of test application

Message ID 20180426133008.12388-13-kamilx.chalupnik@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Pablo de Lara Guarch
Headers show

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Kamil Chalupnik April 26, 2018, 1:30 p.m. UTC
From: KamilX Chalupnik <kamilx.chalupnik@intel.com>

Improve readability of test application by replacing
int values with rte_bbdev_event_type enum

Signed-off-by: Kamil Chalupnik <kamilx.chalupnik@intel.com>
---
 app/test-bbdev/test_bbdev.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
diff mbox

Patch

diff --git a/app/test-bbdev/test_bbdev.c b/app/test-bbdev/test_bbdev.c
index 5d325b6..a914817 100644
--- a/app/test-bbdev/test_bbdev.c
+++ b/app/test-bbdev/test_bbdev.c
@@ -895,12 +895,12 @@  test_bbdev_callback(void)
 			"Failed to callback rgstr for RTE_BBDEV_EVENT_UNKNOWN");
 
 	rte_bbdev_pmd_callback_process(dev1, RTE_BBDEV_EVENT_UNKNOWN, NULL);
-	TEST_ASSERT(event_status == 0,
+	TEST_ASSERT(event_status == (int) RTE_BBDEV_EVENT_UNKNOWN,
 			"Failed test for rte_bbdev_pmd_callback_process "
 			"for RTE_BBDEV_EVENT_UNKNOWN ");
 
 	rte_bbdev_pmd_callback_process(dev1, RTE_BBDEV_EVENT_ERROR, NULL);
-	TEST_ASSERT(event_status == 0,
+	TEST_ASSERT(event_status == (int) RTE_BBDEV_EVENT_UNKNOWN,
 			"Failed test for rte_bbdev_pmd_callback_process: "
 			"event RTE_BBDEV_EVENT_ERROR was not registered ");
 
@@ -919,12 +919,12 @@  test_bbdev_callback(void)
 
 	event_status = -1;
 	rte_bbdev_pmd_callback_process(dev1, RTE_BBDEV_EVENT_UNKNOWN, NULL);
-	TEST_ASSERT(event_status == 0,
+	TEST_ASSERT(event_status == (int) RTE_BBDEV_EVENT_UNKNOWN,
 			"Failed test for rte_bbdev_pmd_callback_process "
 			"for RTE_BBDEV_EVENT_UNKNOWN ");
 
 	rte_bbdev_pmd_callback_process(dev1, RTE_BBDEV_EVENT_ERROR, NULL);
-	TEST_ASSERT(event_status == 1,
+	TEST_ASSERT(event_status == (int) RTE_BBDEV_EVENT_ERROR,
 			"Failed test for rte_bbdev_pmd_callback_process "
 			"for RTE_BBDEV_EVENT_ERROR ");
 
@@ -938,12 +938,12 @@  test_bbdev_callback(void)
 
 	event_status = -1;
 	rte_bbdev_pmd_callback_process(dev1, RTE_BBDEV_EVENT_UNKNOWN, NULL);
-	TEST_ASSERT(event_status == 0,
+	TEST_ASSERT(event_status == (int) RTE_BBDEV_EVENT_UNKNOWN,
 			"Failed test for rte_bbdev_pmd_callback_process "
 			"for RTE_BBDEV_EVENT_UNKNOWN ");
 
 	rte_bbdev_pmd_callback_process(dev1, RTE_BBDEV_EVENT_ERROR, NULL);
-	TEST_ASSERT(event_status == 0,
+	TEST_ASSERT(event_status == (int) RTE_BBDEV_EVENT_UNKNOWN,
 			"Failed test for rte_bbdev_pmd_callback_process: "
 			"event RTE_BBDEV_EVENT_ERROR was unregistered ");
 
@@ -992,7 +992,7 @@  test_bbdev_callback(void)
 		"for RTE_BBDEV_EVENT_ERROR ");
 
 	rte_bbdev_pmd_callback_process(dev2, RTE_BBDEV_EVENT_ERROR, NULL);
-	TEST_ASSERT(event_status == 1,
+	TEST_ASSERT(event_status == (int) RTE_BBDEV_EVENT_ERROR,
 		"Failed test for rte_bbdev_pmd_callback_process in dev2 "
 		"for RTE_BBDEV_EVENT_ERROR ");
 
@@ -1006,7 +1006,7 @@  test_bbdev_callback(void)
 			"in dev 2 ");
 
 	rte_bbdev_pmd_callback_process(dev2, RTE_BBDEV_EVENT_UNKNOWN, NULL);
-	TEST_ASSERT(event_status == 0,
+	TEST_ASSERT(event_status == (int) RTE_BBDEV_EVENT_UNKNOWN,
 			"Failed test for rte_bbdev_pmd_callback_process in dev2"
 			" for RTE_BBDEV_EVENT_UNKNOWN ");
 
@@ -1026,7 +1026,7 @@  test_bbdev_callback(void)
 		" for RTE_BBDEV_EVENT_UNKNOWN ");
 
 	rte_bbdev_pmd_callback_process(dev1, RTE_BBDEV_EVENT_UNKNOWN, NULL);
-	TEST_ASSERT(event_status == 0,
+	TEST_ASSERT(event_status == (int) RTE_BBDEV_EVENT_UNKNOWN,
 			"Failed test for rte_bbdev_pmd_callback_process in dev2 "
 			"for RTE_BBDEV_EVENT_UNKNOWN ");