]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
test(NFS): let it run in an Arch container
authorHarald Hoyer <harald@redhat.com>
Tue, 4 May 2021 10:58:34 +0000 (12:58 +0200)
committerHarald Hoyer <harald@hoyer.xyz>
Tue, 4 May 2021 11:47:03 +0000 (13:47 +0200)
`dhclient` on Arch does not understand the `--timeout` parameter.

`/etc/virc` does not need to be installed in tests. This is a debugging
leftover.

test/TEST-20-NFS/test.sh

index 5a46f3d581ac26100a300677c6a51982aec09338..0be16cebef9873ebe2e12c74833f0c284f9bff5e 100755 (executable)
@@ -70,12 +70,16 @@ client_test() {
     declare -i disk_index=0
     qemu_add_drive_args disk_index disk_args "$TESTDIR"/marker.img marker
 
+    if dhclient --help 2>&1 | grep -q -F -- '--timeout' 2> /dev/null; then
+        cmdline="$cmdline rd.net.timeout.dhcp=3"
+    fi
+
     "$testdir"/run-qemu \
         "${disk_args[@]}" \
         -net nic,macaddr="$mac",model=e1000 \
         -net socket,connect=127.0.0.1:12320 \
         -watchdog i6300esb -watchdog-action poweroff \
-        -append "rd.net.timeout.dhcp=3 panic=1 systemd.crash_reboot rd.shell=0 $cmdline $DEBUGFAIL rd.retry=10 quiet ro console=ttyS0,115200n81 selinux=0" \
+        -append "panic=1 systemd.crash_reboot rd.shell=0 $cmdline $DEBUGFAIL rd.retry=10 quiet ro console=ttyS0,115200n81 selinux=0" \
         -initrd "$TESTDIR"/initramfs.testing
 
     # shellcheck disable=SC2181
@@ -319,7 +323,7 @@ test_setup() {
         )
 
         inst_multiple sh shutdown poweroff stty cat ps ln ip dd \
-            mount dmesg mkdir cp ping grep setsid ls vi /etc/virc less cat sync
+            mount dmesg mkdir cp ping grep setsid ls vi less cat sync
         for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do
             [ -f ${_terminfodir}/l/linux ] && break
         done