summaryrefslogtreecommitdiffstats
path: root/test/TEST-30-ISCSI
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-26 10:33:11 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-26 10:33:11 +0000
commit203af7302854f453fa4a05ecefd4403b6c8a4f8d (patch)
tree967fdacafe332baabd12b57725505c138d0f3bbf /test/TEST-30-ISCSI
parentAdding upstream version 102. (diff)
downloaddracut-upstream.tar.xz
dracut-upstream.zip
Adding upstream version 103.upstream/103upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/TEST-30-ISCSI')
-rwxr-xr-xtest/TEST-30-ISCSI/client-init.sh2
-rw-r--r--test/TEST-30-ISCSI/hosts8
-rwxr-xr-xtest/TEST-30-ISCSI/test.sh17
3 files changed, 9 insertions, 18 deletions
diff --git a/test/TEST-30-ISCSI/client-init.sh b/test/TEST-30-ISCSI/client-init.sh
index d7f1370..ab70d17 100755
--- a/test/TEST-30-ISCSI/client-init.sh
+++ b/test/TEST-30-ISCSI/client-init.sh
@@ -17,7 +17,7 @@ done < /proc/mounts
if getargbool 0 rd.shell; then
strstr "$(setsid --help)" "control" && CTTY="-c"
- setsid $CTTY sh -i
+ setsid ${CTTY:+"${CTTY}"} sh -i
fi
sync
diff --git a/test/TEST-30-ISCSI/hosts b/test/TEST-30-ISCSI/hosts
deleted file mode 100644
index f8c18b6..0000000
--- a/test/TEST-30-ISCSI/hosts
+++ /dev/null
@@ -1,8 +0,0 @@
-127.0.0.1 localhost
-192.168.50.1 server
-192.168.50.2 server-ip
-192.168.50.3 server-proto-ip
-192.168.50.100 workstation1
-192.168.50.101 workstation2
-192.168.50.102 workstation3
-192.168.50.103 workstation4
diff --git a/test/TEST-30-ISCSI/test.sh b/test/TEST-30-ISCSI/test.sh
index f4bf33e..ca56a9d 100755
--- a/test/TEST-30-ISCSI/test.sh
+++ b/test/TEST-30-ISCSI/test.sh
@@ -24,7 +24,7 @@ run_server() {
-net nic,macaddr=52:54:00:12:34:56,model=e1000 \
-net nic,macaddr=52:54:00:12:34:57,model=e1000 \
-net socket,listen=127.0.0.1:12330 \
- -append "panic=1 oops=panic softlockup_panic=1 quiet root=/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_serverroot rootfstype=ext4 rw console=ttyS0,115200n81 selinux=0 $SERVER_DEBUG" \
+ -append "panic=1 oops=panic softlockup_panic=1 quiet root=/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_serverroot rootfstype=ext4 rw console=ttyS0,115200n81 $SERVER_DEBUG" \
-initrd "$TESTDIR"/initramfs.server \
-pidfile "$TESTDIR"/server.pid -daemonize || return 1
chmod 644 "$TESTDIR"/server.pid || return 1
@@ -62,7 +62,7 @@ run_client() {
-net nic,macaddr=52:54:00:12:34:01,model=e1000 \
-net socket,connect=127.0.0.1:12330 \
-acpitable file=ibft.table \
- -append "$*" \
+ -append "$TEST_KERNEL_CMDLINE $*" \
-initrd "$TESTDIR"/initramfs.testing
# shellcheck disable=SC2181
@@ -149,7 +149,7 @@ test_setup() {
# We do it this way so that we do not risk trashing the host mdraid
# devices, volume groups, encrypted partitions, etc.
"$DRACUT" -l -i "$TESTDIR"/overlay / \
- -m "test-makeroot crypt lvm mdraid" \
+ -a "test-makeroot crypt lvm mdraid" \
-I "setsid blockdev" \
-i ./create-client-root.sh /lib/dracut/hooks/initqueue/01-create-client-root.sh \
--no-hostonly-cmdline -N \
@@ -166,20 +166,19 @@ test_setup() {
# Invoke KVM and/or QEMU to actually create the target filesystem.
"$testdir"/run-qemu \
"${disk_args[@]}" \
- -append "root=/dev/fakeroot rw rootfstype=ext4 quiet console=ttyS0,115200n81 selinux=0" \
+ -append "root=/dev/fakeroot rw rootfstype=ext4 quiet console=ttyS0,115200n81" \
-initrd "$TESTDIR"/initramfs.makeroot || return 1
test_marker_check dracut-root-block-created || return 1
rm -- "$TESTDIR"/marker.img
# Create what will eventually be the server root filesystem onto an overlay
"$DRACUT" -N -l --keep --tmpdir "$TESTDIR" \
- -m "test-root network-legacy" \
+ -m "test-root ${USE_NETWORK}" \
-d "iscsi_tcp crc32c ipv6" \
-i "${PKGLIBDIR}/modules.d/99base/dracut-lib.sh" "/lib/dracut-lib.sh" \
-i "${PKGLIBDIR}/modules.d/99base/dracut-dev-lib.sh" "/lib/dracut-dev-lib.sh" \
-I "modprobe chmod ip tcpdump setsid pidof tgtd tgtadm /etc/passwd" \
--install-optional "/etc/netconfig dhcpd /etc/group /etc/nsswitch.conf /etc/rpc /etc/protocols /etc/services /usr/etc/nsswitch.conf /usr/etc/rpc /usr/etc/protocols /usr/etc/services" \
- -i "./hosts" "/etc/hosts" \
-i "./dhcpd.conf" "/etc/dhcpd.conf" \
-f "$TESTDIR"/initramfs.root "$KVERSION" || return 1
mkdir -p "$TESTDIR"/overlay/source && mv "$TESTDIR"/dracut.*/initramfs/* "$TESTDIR"/overlay/source && rm -rf "$TESTDIR"/dracut.*
@@ -192,7 +191,7 @@ test_setup() {
# We do it this way so that we do not risk trashing the host mdraid
# devices, volume groups, encrypted partitions, etc.
"$DRACUT" -N -l -i "$TESTDIR"/overlay / \
- -m "test-makeroot" \
+ -a "test-makeroot" \
-i ./create-server-root.sh /lib/dracut/hooks/initqueue/01-create-server-root.sh \
-f "$TESTDIR"/initramfs.makeroot "$KVERSION" || return 1
rm -rf -- "$TESTDIR"/overlay
@@ -206,14 +205,14 @@ test_setup() {
# Invoke KVM and/or QEMU to actually create the target filesystem.
"$testdir"/run-qemu \
"${disk_args[@]}" \
- -append "root=/dev/dracut/root rw rootfstype=ext4 quiet console=ttyS0,115200n81 selinux=0" \
+ -append "root=/dev/dracut/root rw rootfstype=ext4 quiet console=ttyS0,115200n81" \
-initrd "$TESTDIR"/initramfs.makeroot || return 1
test_marker_check dracut-root-block-created || return 1
rm -- "$TESTDIR"/marker.img
# Make server's dracut image
"$DRACUT" -l \
- -a "dash rootfs-block test kernel-modules network-legacy" \
+ -a "dash rootfs-block test kernel-modules ${USE_NETWORK}" \
-d "piix ide-gd_mod ata_piix ext4 sd_mod e1000 drbg virtio_pci virtio_scsi" \
-i "./server.link" "/etc/systemd/network/01-server.link" \
-i ./wait-if-server.sh /lib/dracut/hooks/pre-mount/99-wait-if-server.sh \