If null PMD is disabled, the test to load filter can not work
because it uses that. Change to skip the test if setup fails.
Fixes: 81038845c90b ("test/bpf: add Rx and Tx filtering")
Cc: [email protected]
Signed-off-by: Stephen Hemminger <[email protected]>
---
app/test/test_bpf.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/app/test/test_bpf.c b/app/test/test_bpf.c
index 0e969f9f13..8bf783c00c 100644
--- a/app/test/test_bpf.c
+++ b/app/test/test_bpf.c
@@ -3441,7 +3441,11 @@ static int null_vdev_setup(const char *name, uint16_t
*port, struct rte_mempool
/* Make a null device */
ret = rte_vdev_init(name, NULL);
- TEST_ASSERT(ret == 0, "rte_vdev_init(%s) failed: %d", name, ret);
+ if (ret != 0) {
+ printf("rte_vdev_init(%s) failed: %d:%s\n",
+ name, ret, strerror(-ret));
+ return -ENOTSUP;
+ }
ret = rte_eth_dev_get_port_by_name(name, port);
TEST_ASSERT(ret == 0, "failed to get port id for %s: %d", name, ret);
--
2.51.0