From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id BCFCEA0C4B; Mon, 8 Nov 2021 09:54:38 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 634034111C; Mon, 8 Nov 2021 09:54:32 +0100 (CET) Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by mails.dpdk.org (Postfix) with ESMTP id 4DE344111C for ; Mon, 8 Nov 2021 09:54:30 +0100 (CET) Received: from dggeme751-chm.china.huawei.com (unknown [172.30.72.55]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4HnlH519ZCz1DJJv; Mon, 8 Nov 2021 16:52:17 +0800 (CST) Received: from dggpeml500021.china.huawei.com (7.185.36.21) by dggeme751-chm.china.huawei.com (10.3.19.97) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.15; Mon, 8 Nov 2021 16:54:28 +0800 Received: from dggpeml500021.china.huawei.com ([7.185.36.21]) by dggpeml500021.china.huawei.com ([7.185.36.21]) with mapi id 15.01.2308.015; Mon, 8 Nov 2021 16:54:28 +0800 From: "wuchangsheng (C)" To: "fiona.trahe@intel.com" , "ashish.gupta@marvell.com" CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] test_compressdev:fix test case skipping due to missing device init Thread-Index: AdfUfckRnb9FkMOuQM2cVURYPaYrdg== Date: Mon, 8 Nov 2021 08:54:28 +0000 Message-ID: <0b042fef73824ace8242e88238f21e63@huawei.com> Accept-Language: zh-CN, en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.136.112.45] MIME-Version: 1.0 X-CFilter-Loop: Reflected Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: [dpdk-dev] [PATCH] test_compressdev:fix test case skipping due to missing device init X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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 d2f21802f26036e12db29b2544217a44a748a7ee Mon Sep 17 00:00:00 2001 From: Changsheng Wu Date: Mon, 8 Nov 2021 16:12:36 +0800 Subject: [PATCH] test_compressdev:fix test case skipping due to missing dev= ice init The testsuite_setup function in the compressdev_autotest test case, the rte_compressdev_count() return 0 due to the lack of device init. It is considered that there is no equitment to skip execution. So add rte_vdev_init init compress_zlib device. Signed-off-by: Changsheng Wu --- app/test/test_compressdev.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/test/test_compressdev.c b/app/test/test_compressdev.c index a1b9f06250..f15fbe7f2d 100644 --- a/app/test/test_compressdev.c +++ b/app/test/test_compressdev.c @@ -14,6 +14,7 @@ #include #include #include +#include #include "test_compressdev_test_buffer.h" #include "test.h" @@ -197,6 +198,11 @@ testsuite_setup(void) uint32_t max_buf_size =3D 0; unsigned int i; + if(rte_vdev_init("compress_zlib", NULL) !=3D 0) { + RTE_LOG(WARNING, USER1, "not find compress_zlib device\n")= ; + return TEST_SKIPPED; + } + if (rte_compressdev_count() =3D=3D 0) { RTE_LOG(WARNING, USER1, "Need at least one compress device\= n"); return TEST_SKIPPED; -- 2.27.0