From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id AB27AA04F1; Mon, 6 Jan 2020 08:42:51 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A37DF1D5D8; Mon, 6 Jan 2020 08:42:50 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 55DE11D5D2; Mon, 6 Jan 2020 08:42:49 +0100 (CET) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0067a0Bc008537; Sun, 5 Jan 2020 23:42:48 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=pfpt0818; bh=XEn3lGM7vsBpzuTjJwAiXjEdVV6KXGAapaMGej0CXto=; b=tuQUjkVJYrjdlc+wtaFOZkSviQ2HHz5hZPJIbqU/l9gDzU7h4Gu+lfJEm0f6od/I8Xo8 xNuTcTY22aBqi8YH2UGc07eAN1o3FBJwvnJQa08SB2qQvja6KsOYtB7rEBBq8ZzNsRa9 GHiFaOsXp/wueSYSkXZG0X4y+scYnrqDQ1IxwhTCwVit7uRBbzFaF+tClbjbU3rFrL7e zT6tHp0zlRtLn4hYt3q5WaCS55uh2gveJrsTN/HmPPLbA4ECRNsRV0YjWOUjNUjs3jjP cnXuBLXGerSlTtsAzUbAcIFrYbg4GbwAQEBXxkCRp/pMvqXrlPSnX3AK/TsBJv4y+yvX 6Q== Received: from sc-exch02.marvell.com ([199.233.58.182]) by mx0b-0016f401.pphosted.com with ESMTP id 2xau3smhak-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Sun, 05 Jan 2020 23:42:48 -0800 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sun, 5 Jan 2020 23:42:46 -0800 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Sun, 5 Jan 2020 23:42:46 -0800 Received: from BG-LT7430.marvell.com (bg-lt7430.marvell.com [10.28.10.90]) by maili.marvell.com (Postfix) with ESMTP id 798A53F703F; Sun, 5 Jan 2020 23:42:44 -0800 (PST) From: To: CC: , Pavan Nikhilesh , Date: Mon, 6 Jan 2020 13:12:41 +0530 Message-ID: <20200106074243.2336-1-pbhagavatula@marvell.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,18.0.572 definitions=2020-01-06_01:2020-01-06,2020-01-06 signatures=0 Subject: [dpdk-dev] [PATCH 1/2] test/eventdev: fix unintended vdev creation X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Pavan Nikhilesh 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 --- app/test/test_eventdev.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/test/test_eventdev.c b/app/test/test_eventdev.c index 427dbbf77..56155838d 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)); } -- 2.17.1