DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] test_compressdev:fix test case skipping due to missing device init
@ 2021-11-08  8:54 wuchangsheng (C)
  2021-11-10  6:09 ` [PATCH] ut_test_compressdev:fix " Changsheng Wu
  0 siblings, 1 reply; 2+ messages in thread
From: wuchangsheng (C) @ 2021-11-08  8:54 UTC (permalink / raw)
  To: fiona.trahe, ashish.gupta; +Cc: dev

From d2f21802f26036e12db29b2544217a44a748a7ee Mon Sep 17 00:00:00 2001
From: Changsheng Wu <wuchangsheng2@huawei.com>
Date: Mon, 8 Nov 2021 16:12:36 +0800
Subject: [PATCH] test_compressdev:fix test case skipping due to missing device 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 <wuchangsheng2@huawei.com>
---
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 <rte_mbuf.h>
#include <rte_compressdev.h>
#include <rte_string_fns.h>
+#include <rte_bus_vdev.h>
 #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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH] ut_test_compressdev:fix test case skipping due to missing device init
  2021-11-08  8:54 [dpdk-dev] [PATCH] test_compressdev:fix test case skipping due to missing device init wuchangsheng (C)
@ 2021-11-10  6:09 ` Changsheng Wu
  0 siblings, 0 replies; 2+ messages in thread
From: Changsheng Wu @ 2021-11-10  6:09 UTC (permalink / raw)
  To: fiona.trahe, ashish.gupta; +Cc: dev, Changsheng Wu

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 <wuchangsheng2@huawei.com>
---
 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 <rte_mbuf.h>
 #include <rte_compressdev.h>
 #include <rte_string_fns.h>
+#include <rte_bus_vdev.h>
 
 #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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-11-10 14:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-08  8:54 [dpdk-dev] [PATCH] test_compressdev:fix test case skipping due to missing device init wuchangsheng (C)
2021-11-10  6:09 ` [PATCH] ut_test_compressdev:fix " Changsheng Wu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).