diff options
Diffstat (limited to 'test/TEST-60-BONDBRIDGEVLAN')
-rwxr-xr-x | test/TEST-60-BONDBRIDGEVLAN/create-root.sh | 6 | ||||
-rwxr-xr-x | test/TEST-60-BONDBRIDGEVLAN/server-init.sh | 2 | ||||
-rwxr-xr-x | test/TEST-60-BONDBRIDGEVLAN/test.sh | 31 |
3 files changed, 19 insertions, 20 deletions
diff --git a/test/TEST-60-BONDBRIDGEVLAN/create-root.sh b/test/TEST-60-BONDBRIDGEVLAN/create-root.sh index fe7b515..9164628 100755 --- a/test/TEST-60-BONDBRIDGEVLAN/create-root.sh +++ b/test/TEST-60-BONDBRIDGEVLAN/create-root.sh @@ -11,12 +11,12 @@ udevadm control --reload udevadm settle set -e -mkfs.ext4 -L dracut /dev/disk/by-id/ata-disk_root +mkfs.ext4 -q -L dracut /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_root mkdir -p /root -mount -t ext4 /dev/disk/by-id/ata-disk_root /root +mount -t ext4 /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_root /root cp -a -t /root /source/* mkdir -p /root/run umount /root -echo "dracut-root-block-created" | dd oflag=direct,dsync of=/dev/disk/by-id/ata-disk_marker +echo "dracut-root-block-created" | dd oflag=direct,dsync of=/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_marker status=none sync poweroff -f diff --git a/test/TEST-60-BONDBRIDGEVLAN/server-init.sh b/test/TEST-60-BONDBRIDGEVLAN/server-init.sh index 3b0f55e..e4ddf3f 100755 --- a/test/TEST-60-BONDBRIDGEVLAN/server-init.sh +++ b/test/TEST-60-BONDBRIDGEVLAN/server-init.sh @@ -64,7 +64,7 @@ ip link set dev enx525401123457 name net2 ip link set dev enx525401123458 name net3 ip link set dev enx525401123459 name net4 -modprobe --all -b -q 8021q bonding +modprobe -b -q 8021q && modprobe -b -q bonding : > /dev/watchdog ip addr add 127.0.0.1/8 dev lo diff --git a/test/TEST-60-BONDBRIDGEVLAN/test.sh b/test/TEST-60-BONDBRIDGEVLAN/test.sh index 5110ddb..be4cb6d 100755 --- a/test/TEST-60-BONDBRIDGEVLAN/test.sh +++ b/test/TEST-60-BONDBRIDGEVLAN/test.sh @@ -9,6 +9,11 @@ TEST_DESCRIPTION="root filesystem on NFS with bridging/bonding/vlan with $USE_NE #DEBUGFAIL="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 +} + # Network topology: # # .---------------------. .---------------. @@ -44,8 +49,7 @@ run_server() { -device virtio-net-pci,netdev=n3,mac=52:54:01:12:34:59 \ -hda "$TESTDIR"/server.ext4 \ -serial "${SERIAL:-"file:$TESTDIR/server.log"}" \ - -device i6300esb -watchdog-action poweroff \ - -append "panic=1 oops=panic softlockup_panic=1 loglevel=7 root=LABEL=dracut rootfstype=ext4 rw console=ttyS0,115200n81 selinux=0 rd.debug" \ + -append "panic=1 oops=panic softlockup_panic=1 root=LABEL=dracut rootfstype=ext4 rw console=ttyS0,115200n81 selinux=0" \ -initrd "$TESTDIR"/initramfs.server \ -pidfile "$TESTDIR"/server.pid -daemonize || return 1 chmod 644 -- "$TESTDIR"/server.pid || return 1 @@ -87,16 +91,14 @@ client_test() { -netdev socket,connect=127.0.0.1:12373,id=n4 -device virtio-net-pci,mac=52:54:00:12:34:04,netdev=n4 \ -netdev hubport,id=n5,hubid=1 -device virtio-net-pci,mac=52:54:00:12:34:05,netdev=n5 \ -hda "$TESTDIR"/client.img \ - -device i6300esb -watchdog-action poweroff \ -append " - panic=1 oops=panic softlockup_panic=1 ifname=net1:52:54:00:12:34:01 ifname=net2:52:54:00:12:34:02 ifname=net3:52:54:00:12:34:03 ifname=net4:52:54:00:12:34:04 ifname=net5:52:54:00:12:34:05 - $cmdline rd.net.timeout.dhcp=30 systemd.crash_reboot - $DEBUGFAIL rd.retry=5 rw console=ttyS0,115200n81 selinux=0 init=/sbin/init" \ + $cmdline rd.net.timeout.dhcp=30 + rd.retry=5 rw init=/sbin/init" \ -initrd "$TESTDIR"/initramfs.testing || return 1 { @@ -323,7 +325,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 ) @@ -340,8 +342,8 @@ test_setup() { declare -a disk_args=() 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.ext4 root 120 + qemu_add_drive disk_index disk_args "$TESTDIR"/marker.img marker 1 + qemu_add_drive disk_index disk_args "$TESTDIR"/server.ext4 root 120 # Invoke KVM and/or QEMU to actually create the target filesystem. "$testdir"/run-qemu \ @@ -364,12 +366,9 @@ test_setup() { inst_simple ./client.link /etc/systemd/network/01-client.link ) # Make client's dracut image - "$DRACUT" -l -i "$TESTDIR"/overlay / \ - --no-early-microcode \ - -o "plymouth" \ - -a "debug ${USE_NETWORK}" \ - --no-hostonly-cmdline -N \ - -f "$TESTDIR"/initramfs.testing "$KVERSION" || return 1 + test_dracut \ + -a "debug ${USE_NETWORK} ifcfg" \ + "$TESTDIR"/initramfs.testing ( # shellcheck disable=SC2031 @@ -384,7 +383,7 @@ test_setup() { "$DRACUT" -l -i "$TESTDIR"/overlay / \ --no-early-microcode \ -m "rootfs-block debug kernel-modules watchdog qemu network network-legacy" \ - -d "ipvlan macvlan af_packet piix ide-gd_mod ata_piix ext4 sd_mod nfsv2 nfsv3 nfsv4 nfs_acl nfs_layout_nfsv41_files nfsd virtio-net i6300esb ib700wdt" \ + -d "ipvlan macvlan af_packet piix ide-gd_mod ata_piix ext4 sd_mod nfsv2 nfsv3 nfsv4 nfs_acl nfs_layout_nfsv41_files nfsd virtio-net i6300esb" \ --no-hostonly-cmdline -N \ -f "$TESTDIR"/initramfs.server "$KVERSION" || return 1 } |