diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-03 14:01:35 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-03 14:01:35 +0000 |
commit | e6f2eaf47a177a8eca054d1d70a1b6287e8c3521 (patch) | |
tree | c5719e819a9e37df4b54affd61438f382ec38a8f /test/TEST-50-MULTINIC/test.sh | |
parent | Adding upstream version 060+5. (diff) | |
download | dracut-upstream/102.tar.xz dracut-upstream/102.zip |
Adding upstream version 102.upstream/102
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/TEST-50-MULTINIC/test.sh')
-rwxr-xr-x | test/TEST-50-MULTINIC/test.sh | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/test/TEST-50-MULTINIC/test.sh b/test/TEST-50-MULTINIC/test.sh index 4f81235..e2aa5a3 100755 --- a/test/TEST-50-MULTINIC/test.sh +++ b/test/TEST-50-MULTINIC/test.sh @@ -7,6 +7,11 @@ TEST_DESCRIPTION="root filesystem on NFS with multiple nics with $USE_NETWORK" #DEBUGFAIL="loglevel=7 rd.shell rd.break" #SERIAL="tcp:127.0.0.1:9999" +# skip the test if ifcfg dracut module can not be installed +test_check() { + test -d /etc/sysconfig/network-scripts +} + run_server() { # Start server first echo "MULTINIC TEST SETUP: Starting DHCP/NFS server" @@ -14,14 +19,13 @@ run_server() { declare -a disk_args=() # shellcheck disable=SC2034 declare -i disk_index=0 - qemu_add_drive_args disk_index disk_args "$TESTDIR"/server.img root + qemu_add_drive disk_index disk_args "$TESTDIR"/server.img root "$testdir"/run-qemu \ "${disk_args[@]}" \ -net socket,listen=127.0.0.1:12350 \ -net nic,macaddr=52:54:01:12:34:56,model=e1000 \ -serial "${SERIAL:-"file:$TESTDIR/server.log"}" \ - -device i6300esb -watchdog-action poweroff \ -append "panic=1 oops=panic softlockup_panic=1 systemd.crash_reboot root=LABEL=dracut rootfstype=ext4 rw console=ttyS0,115200n81 selinux=0" \ -initrd "$TESTDIR"/initramfs.server \ -pidfile "$TESTDIR"/server.pid -daemonize || return 1 @@ -57,7 +61,7 @@ client_test() { declare -a disk_args=() # shellcheck disable=SC2034 declare -i disk_index=0 - qemu_add_drive_args disk_index disk_args "$TESTDIR"/marker.img marker + qemu_add_drive disk_index disk_args "$TESTDIR"/marker.img marker cmdline="$cmdline rd.net.timeout.dhcp=30" # Invoke KVM and/or QEMU to actually create the target filesystem. @@ -72,8 +76,7 @@ client_test() { -netdev hubport,id=n2,hubid=2 \ -device e1000,netdev=n1,mac=52:54:00:12:34:98 \ -device e1000,netdev=n2,mac=52:54:00:12:34:99 \ - -device i6300esb -watchdog-action poweroff \ - -append "quiet panic=1 oops=panic softlockup_panic=1 systemd.crash_reboot rd.shell=0 $cmdline $DEBUGFAIL rd.retry=5 ro console=ttyS0,115200n81 selinux=0 init=/sbin/init rd.debug systemd.log_target=console" \ + -append "$cmdline rd.retry=5 ro init=/sbin/init systemd.log_target=console" \ -initrd "$TESTDIR"/initramfs.testing || return 1 { @@ -189,7 +192,7 @@ test_setup() { ) inst_multiple sh ls shutdown poweroff stty cat ps ln ip \ - dmesg mkdir cp ping exportfs \ + dmesg mkdir cp exportfs \ modprobe rpc.nfsd rpc.mountd showmount tcpdump \ sleep mount chmod rm for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do @@ -247,7 +250,7 @@ test_setup() { ) inst_multiple sh shutdown poweroff stty cat ps ln ip dd \ - mount dmesg mkdir cp ping grep setsid ls vi less cat sync + mount dmesg mkdir cp grep setsid ls vi less cat sync for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do if [ -f "${_terminfodir}"/l/linux ]; then inst_multiple -o "${_terminfodir}"/l/linux @@ -291,7 +294,7 @@ test_setup() { export initdir=$TESTDIR/overlay # shellcheck disable=SC1090 . "$PKGLIBDIR"/dracut-init.sh - inst_multiple sfdisk mkfs.ext4 poweroff cp umount sync dd + inst_multiple mkfs.ext4 poweroff cp umount sync dd inst_hook initqueue 01 ./create-root.sh inst_hook initqueue/finished 01 ./finished-false.sh ) @@ -310,8 +313,8 @@ test_setup() { declare -a disk_args=() # shellcheck disable=SC2034 declare -i disk_index=0 - qemu_add_drive_args disk_index disk_args "$TESTDIR"/marker.img marker 1 - qemu_add_drive_args disk_index disk_args "$TESTDIR"/server.img root 120 + qemu_add_drive disk_index disk_args "$TESTDIR"/marker.img marker 1 + qemu_add_drive disk_index disk_args "$TESTDIR"/server.img root 120 # Invoke KVM and/or QEMU to actually create the target filesystem. "$testdir"/run-qemu \ @@ -337,11 +340,9 @@ test_setup() { inst_hook pre-pivot 85 "$PKGLIBDIR/modules.d/45ifcfg/write-ifcfg.sh" ) # Make client's dracut image - "$DRACUT" -l -i "$TESTDIR"/overlay / \ - -o "ifcfg plymouth" \ - -a "debug watchdog ${USE_NETWORK}" \ - --no-hostonly-cmdline -N \ - -f "$TESTDIR"/initramfs.testing "$KVERSION" || return 1 + test_dracut \ + -a "${USE_NETWORK}" \ + "$TESTDIR"/initramfs.testing ( # shellcheck disable=SC2031 @@ -354,8 +355,8 @@ test_setup() { ) # Make server's dracut image "$DRACUT" -l -i "$TESTDIR"/overlay / \ - -m "bash rootfs-block debug kernel-modules watchdog qemu network network-legacy" \ - -d "af_packet piix ide-gd_mod ata_piix ext4 sd_mod nfsv2 nfsv3 nfsv4 nfs_acl nfs_layout_nfsv41_files nfsd e1000 i6300esb ib700wdt" \ + -m "bash rootfs-block debug kernel-modules watchdog qemu network-legacy" \ + -d "af_packet piix ide-gd_mod ata_piix ext4 sd_mod nfsv2 nfsv3 nfsv4 nfs_acl nfs_layout_nfsv41_files nfsd e1000 i6300esb" \ --no-hostonly-cmdline -N \ -f "$TESTDIR"/initramfs.server "$KVERSION" || return 1 |