From: Jo Zzsi Date: Tue, 6 Jan 2026 01:43:48 +0000 (-0500) Subject: test(NETWORK): do not set net.ifnames=0 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=674fc03405dc785594ea4ea9f21247bdeb2d2856;p=thirdparty%2Fdracut-ng.git test(NETWORK): do not set net.ifnames=0 Increase test coverage by letting CI test containers to decide the value of net.ifnames. Change the test expectation to handle both net.ifnames=0 and net.ifnames=1. --- diff --git a/test/TEST-50-NETWORK/assertion.sh b/test/TEST-50-NETWORK/assertion.sh index 28efd9b6e..b872f9b5b 100755 --- a/test/TEST-50-NETWORK/assertion.sh +++ b/test/TEST-50-NETWORK/assertion.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash -# Get the output of 'ip addr show eth0' -ip_output=$(ip addr show eth0) +# Get the output of 'ip addr show' and filter out lo interface +ip_output=$(ip -o -4 addr show | grep -v ': lo') # Extract the line containing "inet" inet_line="${ip_output##*inet }" diff --git a/test/TEST-50-NETWORK/test.sh b/test/TEST-50-NETWORK/test.sh index b9934d195..d21acef57 100755 --- a/test/TEST-50-NETWORK/test.sh +++ b/test/TEST-50-NETWORK/test.sh @@ -19,7 +19,7 @@ test_run() { -device "virtio-net-pci,netdev=lan0" \ -netdev "user,id=lan0,net=10.0.2.0/24,dhcpstart=10.0.2.15" \ "${disk_args[@]}" \ - -append "root=LABEL=dracut $TEST_KERNEL_CMDLINE rd.neednet=1 net.ifnames=0" \ + -append "root=LABEL=dracut $TEST_KERNEL_CMDLINE rd.neednet=1" \ -initrd "$TESTDIR"/initramfs.testing test_marker_check