From: Pavan Nikhilesh Date: Thu, 11 Jan 2018 10:21:55 +0000 (+0530) Subject: test/event: register selftests X-Git-Tag: spdx-start~183 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=123d67c73b06b1ca9f306caace134da04b5c0c39;p=dpdk.git test/event: register selftests Signed-off-by: Pavan Nikhilesh Acked-by: Jerin Jacob --- diff --git a/test/test/test_eventdev.c b/test/test/test_eventdev.c index 71129de239..04bdc6b6ce 100644 --- a/test/test/test_eventdev.c +++ b/test/test/test_eventdev.c @@ -990,4 +990,26 @@ test_eventdev_common(void) return unit_test_suite_runner(&eventdev_common_testsuite); } +static int +test_eventdev_selftest_impl(const char *pmd, const char *opts) +{ + rte_vdev_init(pmd, opts); + return rte_event_dev_selftest(rte_event_dev_get_dev_id(pmd)); +} + +static int +test_eventdev_selftest_sw(void) +{ + return test_eventdev_selftest_impl("event_sw", ""); +} + +static int +test_eventdev_selftest_octeontx(void) +{ + return test_eventdev_selftest_impl("event_octeontx", ""); +} + REGISTER_TEST_COMMAND(eventdev_common_autotest, test_eventdev_common); +REGISTER_TEST_COMMAND(eventdev_selftest_sw, test_eventdev_selftest_sw); +REGISTER_TEST_COMMAND(eventdev_selftest_octeontx, + test_eventdev_selftest_octeontx);