From: Pavan Nikhilesh Date: Mon, 6 Jan 2020 07:42:41 +0000 (+0530) Subject: test/event: fix unintended vdev creation X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=2155b9ca1a0d4aaf25d51f63034bc9357f66b96a;p=dpdk.git test/event: fix unintended vdev creation Virtual eventdevice should only be created when there is no existing device with the same name. Fixes: e0f4a0ed4237 ("test: skip tests when missing requirements") Cc: stable@dpdk.org Signed-off-by: Pavan Nikhilesh Acked-by: Jerin Jacob --- diff --git a/app/test/test_eventdev.c b/app/test/test_eventdev.c index 427dbbf77f..56155838d8 100644 --- a/app/test/test_eventdev.c +++ b/app/test/test_eventdev.c @@ -996,9 +996,13 @@ test_eventdev_common(void) static int test_eventdev_selftest_impl(const char *pmd, const char *opts) { - rte_vdev_init(pmd, opts); + int ret = 0; + if (rte_event_dev_get_dev_id(pmd) == -ENODEV) + ret = rte_vdev_init(pmd, opts); + if (ret) return TEST_SKIPPED; + return rte_event_dev_selftest(rte_event_dev_get_dev_id(pmd)); }