diff --git a/test/TEST-30-ISCSI/server-init.sh b/test/TEST-30-ISCSI/server-init.sh index 420ad61822..9c00d7d9bd 100755 --- a/test/TEST-30-ISCSI/server-init.sh +++ b/test/TEST-30-ISCSI/server-init.sh @@ -44,11 +44,14 @@ tgtadm --lld iscsi --mode target --op bind --tid 1 -I 192.168.50.101 tgtadm --lld iscsi --mode target --op bind --tid 2 -I 192.168.51.101 tgtadm --lld iscsi --mode target --op bind --tid 3 -I 192.168.50.101 +echo "Serving iSCSI" + # Wait forever for the VM to die -while :; do - echo "Serving iSCSI" - [ -n "$(jobs -rp)" ] && echo > /dev/watchdog - sleep 10 +while pidof tgtd > /dev/null; do + : > /dev/watchdog + dmesg -c + sleep 1 done +dmesg -c mount -n -o remount,ro / poweroff -f diff --git a/test/TEST-30-ISCSI/test.sh b/test/TEST-30-ISCSI/test.sh index 39269c5b0d..d72d67e949 100755 --- a/test/TEST-30-ISCSI/test.sh +++ b/test/TEST-30-ISCSI/test.sh @@ -244,7 +244,7 @@ test_setup() { inst_multiple sh ls shutdown poweroff stty cat ps ln ip \ dmesg mkdir cp ping \ modprobe tcpdump setsid \ - /etc/services sleep mount chmod + /etc/services sleep mount chmod pidof inst_multiple tgtd tgtadm for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do [ -f ${_terminfodir}/l/linux ] && break diff --git a/test/TEST-35-ISCSI-MULTI/server-init.sh b/test/TEST-35-ISCSI-MULTI/server-init.sh index 420335c9c3..436ee9b8dd 100755 --- a/test/TEST-35-ISCSI-MULTI/server-init.sh +++ b/test/TEST-35-ISCSI-MULTI/server-init.sh @@ -78,9 +78,11 @@ tgtadm --lld iscsi --mode target --op bind --tid 3 -I 192.168.50.101 # Wait forever for the VM to die echo "Serving iSCSI" -while :; do - [ -n "$(jobs -rp)" ] && echo > /dev/watchdog - sleep 10 +while pidof tgtd > /dev/null; do + : > /dev/watchdog + dmesg -c + sleep 1 done +dmesg -c mount -n -o remount,ro / poweroff -f diff --git a/test/TEST-35-ISCSI-MULTI/test.sh b/test/TEST-35-ISCSI-MULTI/test.sh index 1dee2eedf1..f3f213a1b6 100755 --- a/test/TEST-35-ISCSI-MULTI/test.sh +++ b/test/TEST-35-ISCSI-MULTI/test.sh @@ -248,7 +248,7 @@ test_setup() { inst_multiple sh ls shutdown poweroff stty cat ps ln ip \ dmesg mkdir cp ping \ modprobe tcpdump setsid \ - /etc/services sleep mount chmod + /etc/services sleep mount chmod pidof inst_multiple tgtd tgtadm for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do [ -f ${_terminfodir}/l/linux ] && break