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 06363A0C4D; Mon, 8 Nov 2021 13:34:55 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 54ADF41139; Mon, 8 Nov 2021 13:34:44 +0100 (CET) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by mails.dpdk.org (Postfix) with ESMTP id 2CC2C410FD for ; Mon, 8 Nov 2021 13:34:42 +0100 (CET) Received: from dggemv704-chm.china.huawei.com (unknown [172.30.72.55]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4Hnr666JL8zcbCW; Mon, 8 Nov 2021 20:29:50 +0800 (CST) Received: from dggpeml500021.china.huawei.com (7.185.36.21) by dggemv704-chm.china.huawei.com (10.3.19.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.15; Mon, 8 Nov 2021 20:34:39 +0800 Received: from localhost (10.137.16.173) by dggpeml500021.china.huawei.com (7.185.36.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.15; Mon, 8 Nov 2021 20:34:38 +0800 From: Changsheng Wu To: , CC: , , Changsheng Wu Date: Mon, 8 Nov 2021 20:35:42 +0800 Message-ID: <20211108123542.404239-1-wuchangsheng2@huawei.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.137.16.173] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggpeml500021.china.huawei.com (7.185.36.21) X-CFilter-Loop: Reflected Subject: [dpdk-dev] [v2] [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" 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 = 0; unsigned int i; + if (rte_vdev_init("compress_zlib", NULL) != 0) { + RTE_LOG(WARNING, USER1, "not find compress_zlib device\n"); + return TEST_SKIPPED; + } + if (rte_compressdev_count() == 0) { RTE_LOG(WARNING, USER1, "Need at least one compress device\n"); return TEST_SKIPPED; -- 2.27.0