On Hyper-V systems (including Azure-hosted CI), the vdev_netvsc
driver auto-injects itself during vdev bus scan. This interferes
with the vdev flag test causing the nodeaction subprocess to fail.

Suppress by passing net_vdev_netvsc,ignore=1 in the valid vdev
test cases. The scan callback sees it already in devargs and
skips injection; the probe honours ignore and does nothing.

Fixes: 0d684a783088 ("app/test: fix and separate --vdev unit test")
Cc: [email protected]

Signed-off-by: Stephen Hemminger <[email protected]>
---
 app/test/test_eal_flags.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/app/test/test_eal_flags.c b/app/test/test_eal_flags.c
index bebddf1c98..1c0d8e040a 100644
--- a/app/test/test_eal_flags.c
+++ b/app/test/test_eal_flags.c
@@ -426,13 +426,16 @@ test_invalid_vdev_flag(void)
 
        /* Test with valid vdev option */
        const char *vdevval1[] = {prgname, prefix, no_huge, eal_debug_logs,
-                               bus_debug_logs, vdev, "net_ring0"};
+                               bus_debug_logs, vdev, "net_ring0",
+                               vdev, "net_vdev_netvsc,ignore=1"};
 
        const char *vdevval2[] = {prgname, prefix, no_huge, eal_debug_logs,
-                               bus_debug_logs, vdev, "net_ring0,args=test"};
+                               bus_debug_logs, vdev, "net_ring0,args=test",
+                               vdev, "net_vdev_netvsc,ignore=1"};
 
        const char *vdevval3[] = {prgname, prefix, no_huge, eal_debug_logs,
-                               bus_debug_logs, vdev, 
"net_ring0,nodeaction=r1:0:CREATE"};
+                               bus_debug_logs, vdev, 
"net_ring0,nodeaction=r1:0:CREATE",
+                               vdev, "net_vdev_netvsc,ignore=1"};
 
        if (launch_proc(vdevinval) == 0) {
                printf("Error (line %d) - process did run ok with invalid vdev 
parameter\n",
-- 
2.51.0

Reply via email to