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 F089DA034F; Wed, 10 Nov 2021 15:00:08 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D87274113F; Wed, 10 Nov 2021 15:00:08 +0100 (CET) Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by mails.dpdk.org (Postfix) with ESMTP id 8E2CC4014D for ; Wed, 10 Nov 2021 07:08:02 +0100 (CET) Received: from dggemv703-chm.china.huawei.com (unknown [172.30.72.57]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4HpvR14W4xzbhl9; Wed, 10 Nov 2021 14:03:09 +0800 (CST) Received: from dggpeml500021.china.huawei.com (7.185.36.21) 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; Wed, 10 Nov 2021 14:07:59 +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; Wed, 10 Nov 2021 14:07:59 +0800 From: Changsheng Wu To: , CC: , Changsheng Wu Subject: [PATCH] ut_test_compressdev:fix test case skipping due to missing device init Date: Wed, 10 Nov 2021 14:09:07 +0800 Message-ID: <20211110060907.1330658-1-wuchangsheng2@huawei.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <0b042fef73824ace8242e88238f21e63@huawei.com> References: <0b042fef73824ace8242e88238f21e63@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.137.16.173] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggpeml500021.china.huawei.com (7.185.36.21) X-CFilter-Loop: Reflected X-Mailman-Approved-At: Wed, 10 Nov 2021 15:00:07 +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, 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