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 2190BA0548; Thu, 11 Nov 2021 14:00:48 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F1E2941177; Thu, 11 Nov 2021 14:00:47 +0100 (CET) Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by mails.dpdk.org (Postfix) with ESMTP id E9B1840E03 for ; Thu, 11 Nov 2021 12:54:42 +0100 (CET) Received: from dggemv703-chm.china.huawei.com (unknown [172.30.72.55]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4Hqg8D6Q7sz8vMh; Thu, 11 Nov 2021 19:53:00 +0800 (CST) Received: from kwepeml100004.china.huawei.com (7.221.188.19) by dggemv703-chm.china.huawei.com (10.3.19.46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.15; Thu, 11 Nov 2021 19:54:38 +0800 Received: from dggpeml500021.china.huawei.com (7.185.36.21) by kwepeml100004.china.huawei.com (7.221.188.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.15; Thu, 11 Nov 2021 19:54:37 +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; Thu, 11 Nov 2021 19:54:37 +0800 From: "wuchangsheng (C)" To: Akhil Goyal , "fiona.trahe@intel.com" , Ashish Gupta CC: "dev@dpdk.org" , "Chenxiang (EulerOS)" Subject: Re: [EXT] [dpdk-dev] [v2] [PATCH] test_compressdev:fix test case skipping due to missing device init Thread-Topic: [EXT] [dpdk-dev] [v2] [PATCH] test_compressdev:fix test case skipping due to missing device init Thread-Index: AdfW8O2++D/gt4MpSyqmL3TADIIxTw== Date: Thu, 11 Nov 2021 11:54:37 +0000 Message-ID: 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] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-CFilter-Loop: Reflected X-Mailman-Approved-At: Thu, 11 Nov 2021 14:00:46 +0100 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 > >> The testsuite_setup function in the compressdev_autotest test case,=20 >> 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. > >Why? Devices can be added as command line argument. >* Use ``--vdev=3D"compress_isal"`` in the EAL options, which will call ``r= te_vdev_init()`` internally. >See documentation of compressdevs. > >And if at all it is required, why only the zlib, there are other devices a= s well. > When ut test in this steps, will not call rte_vdev_init() 1. meson build 2. cd build 3. meson test compressdev_autotest This use case tests the framework code and doesn't care about the specific = device, so zlib device is randomly selected. According to what you said, it may affect the command-line test. I need to = think it again. >> Signed-off-by: Changsheng Wu >> --- >> app/test/test_compressdev.c | 6 ++++++ >> 1 file changed, 6 insertions(+) >>=20 >> diff --git a/app/test/test_compressdev.c b/app/test/test_compressdev.c=20 >> index a1b9f06250..f15fbe7f2d 100644 >> --- a/app/test/test_compressdev.c >> +++ b/app/test/test_compressdev.c >> @@ -14,6 +14,7 @@ >> #include >> #include >> #include >> +#include >>=20 >> #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; >>=20 >> + 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