summaryrefslogtreecommitdiffstats
path: root/test/TEST-60-BONDBRIDGEVLAN/test.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-03 14:01:35 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-03 14:01:35 +0000
commite6f2eaf47a177a8eca054d1d70a1b6287e8c3521 (patch)
treec5719e819a9e37df4b54affd61438f382ec38a8f /test/TEST-60-BONDBRIDGEVLAN/test.sh
parentAdding upstream version 060+5. (diff)
downloaddracut-f4ac0b6f47c31cc6f085f2db5656b9f0fd8da386.tar.xz
dracut-f4ac0b6f47c31cc6f085f2db5656b9f0fd8da386.zip
Adding upstream version 102.upstream/102
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/TEST-60-BONDBRIDGEVLAN/test.sh')
-rwxr-xr-xtest/TEST-60-BONDBRIDGEVLAN/test.sh31
1 files changed, 15 insertions, 16 deletions
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
}