From: Kamil Chalupnik Date: Wed, 9 May 2018 14:42:10 +0000 (+0200) Subject: app/bbdev: improve readability X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=f287b79759ff7abd2498b0d78f7b7ae260be0d30;p=dpdk.git app/bbdev: improve readability Improve readability of test application by replacing int values with rte_bbdev_event_type enum. Signed-off-by: Kamil Chalupnik Acked-by: Pablo de Lara --- diff --git a/app/test-bbdev/test_bbdev.c b/app/test-bbdev/test_bbdev.c index 5d325b6482..a914817bc6 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 ");