Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:tsaupe:branches:Base:System:dracut-openqa-v059
dracut
TEST-30-ISCSI-adapt-for-openQA.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File TEST-30-ISCSI-adapt-for-openQA.patch of Package dracut
From a4b8a72698e8d00f37e3776a845a9df8b8d08cb8 Mon Sep 17 00:00:00 2001 From: Robert Richardson <robert.richardson@suse.com> Date: Wed, 13 Apr 2022 12:02:05 +0200 Subject: [PATCH] test 30 patch --- test/TEST-30-ISCSI/server-init.sh | 12 +++++------ test/TEST-30-ISCSI/test.sh | 32 +++++++++++++++++----------- test/TEST-30-ISCSI/wait-if-server.sh | 4 ++-- 3 files changed, 27 insertions(+), 21 deletions(-) diff --git a/test/TEST-30-ISCSI/server-init.sh b/test/TEST-30-ISCSI/server-init.sh index fd5538d8..cef92c9e 100755 --- a/test/TEST-30-ISCSI/server-init.sh +++ b/test/TEST-30-ISCSI/server-init.sh @@ -47,17 +47,17 @@ linkup() { wait_for_if_link "$1" 2> /dev/null && ip link set "$1" up 2> /dev/null && wait_for_if_up "$1" 2> /dev/null } -wait_for_if_link enx525400123456 -wait_for_if_link enx525400123457 +wait_for_if_link eth0 +wait_for_if_link eth1 ip addr add 127.0.0.1/8 dev lo ip link set lo up -ip addr add 192.168.50.1/24 dev enx525400123456 -linkup enx525400123456 +ip addr add 192.168.50.1/24 dev eth0 +linkup eth0 -ip addr add 192.168.51.1/24 dev enx525400123457 -linkup enx525400123457 +ip addr add 192.168.51.1/24 dev eth1 +linkup eth1 modprobe af_packet diff --git a/test/TEST-30-ISCSI/test.sh b/test/TEST-30-ISCSI/test.sh index 5f0063f8..2269aa77 100755 --- a/test/TEST-30-ISCSI/test.sh +++ b/test/TEST-30-ISCSI/test.sh @@ -16,7 +16,7 @@ KVERSION=${KVERSION-$(uname -r)} DEBUGFAIL="loglevel=1" #DEBUGFAIL="rd.shell rd.break rd.debug loglevel=7 " DEBUGFAIL="rd.debug loglevel=7 " -#SERVER_DEBUG="rd.debug loglevel=7" +SERVER_DEBUG="rd.debug loglevel=7" #SERIAL="tcp:127.0.0.1:9999" run_server() { @@ -36,7 +36,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/ata-disk_serverroot rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0 $SERVER_DEBUG" \ + -append "nompath panic=1 oops=panic softlockup_panic=1 quiet root=/dev/disk/by-id/ata-disk_serverroot rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0 $SERVER_DEBUG" \ -initrd "$TESTDIR"/initramfs.server \ -pidfile "$TESTDIR"/server.pid -daemonize || return 1 chmod 644 "$TESTDIR"/server.pid || return 1 @@ -45,11 +45,16 @@ run_server() { tty -s && stty sane if ! [[ $SERIAL ]]; then + let count=0; while :; do + if [ $count -gt 300 ]; then + return 1 + fi grep Serving "$TESTDIR"/server.log && break echo "Waiting for the server to startup" tail "$TESTDIR"/server.log sleep 1 + let count++ done else echo Sleeping 10 seconds to give the server a head start @@ -91,13 +96,13 @@ do_test_run() { initiator=$(iscsi-iname) run_client "root=dhcp" \ - "root=/dev/root netroot=dhcp ip=enp0s1:dhcp" \ + "nompath root=/dev/root netroot=dhcp ip=eth0:dhcp" \ "rd.iscsi.initiator=$initiator" \ || return 1 run_client "netroot=iscsi target0" \ - "root=LABEL=singleroot netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target0" \ - "ip=192.168.50.101::192.168.50.1:255.255.255.0:iscsi-1:enp0s1:off" \ + "nompath root=LABEL=singleroot netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target0" \ + "ip=192.168.50.101::192.168.50.1:255.255.255.0:iscsi-1:eth0:off" \ "rd.iscsi.initiator=$initiator" \ || return 1 @@ -110,7 +115,7 @@ do_test_run() { || return 1 run_client "root=ibft" \ - "root=LABEL=singleroot" \ + "nompath root=LABEL=singleroot" \ "rd.iscsi.ibft=1" \ "rd.iscsi.firmware=1" \ || return 1 @@ -122,6 +127,7 @@ do_test_run() { test_run() { if ! run_server; then echo "Failed to start server" 1>&2 + cp $TESTDIR/server.log /tmp/dracut-testsuite-logs/$test_name-test_run_server.log return 1 fi do_test_run @@ -188,7 +194,7 @@ test_setup() { # We do it this way so that we do not risk trashing the host mdraid # devices, volume groups, encrypted partitions, etc. "$basedir"/dracut.sh -l -i "$TESTDIR"/overlay / \ - -m "dash crypt lvm mdraid udev-rules base rootfs-block fs-lib kernel-modules qemu" \ + -m "bash crypt lvm mdraid udev-rules base rootfs-block fs-lib kernel-modules qemu" \ -d "piix ide-gd_mod ata_piix ext3 sd_mod" \ --no-hostonly-cmdline -N \ -f "$TESTDIR"/initramfs.makeroot "$KVERSION" || return 1 @@ -256,7 +262,7 @@ test_setup() { _nsslibs=${_nsslibs#|} _nsslibs=${_nsslibs%|} - inst_libdir_file -n "$_nsslibs" 'libnss_*.so*' + inst_libdir_file -n "$_nsslibs" 'ltestdirbnss_*.so*' cp -a /etc/ld.so.conf* "$initdir"/etc ldconfig -r "$initdir" @@ -279,7 +285,7 @@ test_setup() { # We do it this way so that we do not risk trashing the host mdraid # devices, volume groups, encrypted partitions, etc. "$basedir"/dracut.sh -l -i "$TESTDIR"/overlay / \ - -m "dash udev-rules base rootfs-block fs-lib kernel-modules fs-lib qemu" \ + -m "bash udev-rules base rootfs-block fs-lib kernel-modules fs-lib qemu" \ -d "piix ide-gd_mod ata_piix ext3 sd_mod" \ --nomdadmconf \ --no-hostonly-cmdline -N \ @@ -297,7 +303,7 @@ 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=ext3 quiet console=ttyS0,115200n81 selinux=0" \ + -append "nompath root=/dev/dracut/root rw rootfstype=ext3 quiet console=ttyS0,115200n81 selinux=0" \ -initrd "$TESTDIR"/initramfs.makeroot || return 1 grep -U --binary-files=binary -F -m 1 -q dracut-root-block-created "$TESTDIR"/marker.img || return 1 rm -- "$TESTDIR"/marker.img @@ -316,7 +322,7 @@ test_setup() { ) # Make client's dracut image "$basedir"/dracut.sh -l -i "$TESTDIR"/overlay / \ - -o "dash plymouth dmraid nfs ${OMIT_NETWORK}" \ + -o "bash plymouth dmraid nfs ${OMIT_NETWORK}" \ -a "debug ${USE_NETWORK}" \ --no-hostonly-cmdline -N \ -f "$TESTDIR"/initramfs.testing "$KVERSION" || return 1 @@ -332,7 +338,7 @@ test_setup() { ) # Make server's dracut image "$basedir"/dracut.sh -l -i "$TESTDIR"/overlay / \ - -a "dash udev-rules base rootfs-block fs-lib debug kernel-modules network network-legacy" \ + -a "bash udev-rules base rootfs-block fs-lib debug kernel-modules network network-legacy" \ -d "af_packet piix ide-gd_mod ata_piix ext3 sd_mod e1000 drbg" \ --no-hostonly-cmdline -N \ -f "$TESTDIR"/initramfs.server "$KVERSION" || return 1 @@ -348,4 +354,4 @@ test_cleanup() { } # shellcheck disable=SC1090 -. "$testdir"/test-functions +. "$testdir"/test-functions \ No newline at end of file diff --git a/test/TEST-30-ISCSI/wait-if-server.sh b/test/TEST-30-ISCSI/wait-if-server.sh index b53e41fe..06ad17ff 100644 --- a/test/TEST-30-ISCSI/wait-if-server.sh +++ b/test/TEST-30-ISCSI/wait-if-server.sh @@ -1,4 +1,4 @@ #!/bin/sh . /lib/net-lib.sh -wait_for_if_link enx525400123456 -wait_for_if_link enx525400123457 +wait_for_if_link eth0 +wait_for_if_link eth1 \ No newline at end of file -- 2.37.1
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor