Blame 0074-TEST-30-ISCSI-test-more-and-set-static-initiator-nam.patch

Harald Hoyer bb31e7
From 0a66b74b51f7d58916504e0e8bb01b6e981b489b Mon Sep 17 00:00:00 2001
Harald Hoyer bb31e7
From: Harald Hoyer <harald@redhat.com>
Harald Hoyer bb31e7
Date: Thu, 13 Aug 2015 11:54:24 +0200
Harald Hoyer bb31e7
Subject: [PATCH] TEST-30-ISCSI: test more and set static initiator name
Harald Hoyer bb31e7
Harald Hoyer bb31e7
---
Harald Hoyer bb31e7
 test/TEST-30-ISCSI/test.sh | 42 ++++++++++++++++++++++++++++++------------
Harald Hoyer bb31e7
 1 file changed, 30 insertions(+), 12 deletions(-)
Harald Hoyer bb31e7
Harald Hoyer bb31e7
diff --git a/test/TEST-30-ISCSI/test.sh b/test/TEST-30-ISCSI/test.sh
Harald Hoyer bb31e7
index cc6ec4e..be3399a 100755
Harald Hoyer bb31e7
--- a/test/TEST-30-ISCSI/test.sh
Harald Hoyer bb31e7
+++ b/test/TEST-30-ISCSI/test.sh
Harald Hoyer bb31e7
@@ -48,7 +48,7 @@ run_client() {
Harald Hoyer bb31e7
         -net nic,macaddr=52:54:00:12:34:00,model=e1000 \
Harald Hoyer bb31e7
         -net nic,macaddr=52:54:00:12:34:01,model=e1000 \
Harald Hoyer bb31e7
         -net socket,connect=127.0.0.1:12330 \
Harald Hoyer bb31e7
-        -append "$* rw rd.auto rd.retry=20 console=ttyS0,115200n81 selinux=0 rd.debug=0 $DEBUGFAIL" \
Harald Hoyer bb31e7
+        -append "rw rd.auto rd.retry=20 console=ttyS0,115200n81 selinux=0 rd.debug=0 $DEBUGFAIL $*" \
Harald Hoyer bb31e7
         -initrd $TESTDIR/initramfs.testing
Harald Hoyer bb31e7
     if ! grep -F -m 1 -q iscsi-OK $TESTDIR/client.img; then
Harald Hoyer bb31e7
 	echo "CLIENT TEST END: $test_name [FAILED - BAD EXIT]"
Harald Hoyer bb31e7
@@ -60,22 +60,27 @@ run_client() {
Harald Hoyer bb31e7
 }
Harald Hoyer bb31e7
 
Harald Hoyer bb31e7
 do_test_run() {
Harald Hoyer bb31e7
+    initiator=$(iscsi-iname)
Harald Hoyer bb31e7
+
Harald Hoyer bb31e7
     run_client "root=dhcp" \
Harald Hoyer bb31e7
-        "root=/dev/root netroot=dhcp ip=ens3:dhcp" \
Harald Hoyer bb31e7
+               "root=/dev/root netroot=dhcp ip=ens3:dhcp" \
Harald Hoyer bb31e7
+               "rd.iscsi.initiator=$initiator" \
Harald Hoyer bb31e7
         || return 1
Harald Hoyer bb31e7
 
Harald Hoyer bb31e7
     run_client "netroot=iscsi target0"\
Harald Hoyer bb31e7
-        "root=LABEL=singleroot netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target0" \
Harald Hoyer bb31e7
-        "ip=192.168.50.101::192.168.50.1:255.255.255.0:iscsi-1:ens3:off" \
Harald Hoyer bb31e7
+               "root=LABEL=singleroot netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target0" \
Harald Hoyer bb31e7
+               "ip=192.168.50.101::192.168.50.1:255.255.255.0:iscsi-1:ens3:off" \
Harald Hoyer bb31e7
+               "rd.iscsi.initiator=$initiator" \
Harald Hoyer bb31e7
         || return 1
Harald Hoyer bb31e7
 
Harald Hoyer bb31e7
     run_client "netroot=iscsi target1 target2" \
Harald Hoyer bb31e7
-                "root=LABEL=sysroot" \
Harald Hoyer bb31e7
-                "ip=192.168.50.101:::255.255.255.0::ens3:off" \
Harald Hoyer bb31e7
-                "ip=192.168.51.101:::255.255.255.0::ens4:off" \
Harald Hoyer bb31e7
-                "netroot=iscsi:192.168.51.1::::iqn.2009-06.dracut:target1" \
Harald Hoyer bb31e7
-                "netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target2" \
Harald Hoyer bb31e7
-         || return 1
Harald Hoyer bb31e7
+               "root=LABEL=sysroot" \
Harald Hoyer bb31e7
+               "ip=192.168.50.101:::255.255.255.0::ens3:off" \
Harald Hoyer bb31e7
+               "ip=192.168.51.101:::255.255.255.0::ens4:off" \
Harald Hoyer bb31e7
+               "netroot=iscsi:192.168.51.1::::iqn.2009-06.dracut:target1" \
Harald Hoyer bb31e7
+               "netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target2" \
Harald Hoyer bb31e7
+               "rd.iscsi.initiator=$initiator" \
Harald Hoyer bb31e7
+        || return 1
Harald Hoyer bb31e7
 
Harald Hoyer bb31e7
     run_client "netroot=iscsi target1 target2 rd.iscsi.waitnet=0" \
Harald Hoyer bb31e7
 	       "root=LABEL=sysroot" \
Harald Hoyer bb31e7
@@ -83,7 +88,8 @@ do_test_run() {
Harald Hoyer bb31e7
                "ip=192.168.51.101:::255.255.255.0::ens4:off" \
Harald Hoyer bb31e7
 	       "netroot=iscsi:192.168.51.1::::iqn.2009-06.dracut:target1" \
Harald Hoyer bb31e7
                "netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target2" \
Harald Hoyer bb31e7
-               "rd.waitnet=0" \
Harald Hoyer bb31e7
+               "rd.iscsi.initiator=$initiator" \
Harald Hoyer bb31e7
+               "rd.waitnet=0 rd.retry=30" \
Harald Hoyer bb31e7
 	|| return 1
Harald Hoyer bb31e7
 
Harald Hoyer bb31e7
     run_client "netroot=iscsi target1 target2 rd.iscsi.waitnet=0 rd.iscsi.testroute=0" \
Harald Hoyer bb31e7
@@ -92,8 +98,20 @@ do_test_run() {
Harald Hoyer bb31e7
                "ip=192.168.51.101:::255.255.255.0::ens4:off" \
Harald Hoyer bb31e7
 	       "netroot=iscsi:192.168.51.1::::iqn.2009-06.dracut:target1" \
Harald Hoyer bb31e7
                "netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target2" \
Harald Hoyer bb31e7
-               "rd.waitnet=0 rd.iscsi.testroute=0" \
Harald Hoyer bb31e7
+               "rd.iscsi.initiator=$initiator" \
Harald Hoyer bb31e7
+               "rd.waitnet=0 rd.iscsi.testroute=0 rd.retry=30" \
Harald Hoyer bb31e7
 	|| return 1
Harald Hoyer bb31e7
+
Harald Hoyer bb31e7
+    run_client "netroot=iscsi target1 target2 rd.iscsi.waitnet=0 rd.iscsi.testroute=0 default GW" \
Harald Hoyer bb31e7
+	       "root=LABEL=sysroot" \
Harald Hoyer bb31e7
+               "ip=192.168.50.101::192.168.50.1:255.255.255.0::ens3:off" \
Harald Hoyer bb31e7
+               "ip=192.168.51.101::192.168.51.1:255.255.255.0::ens4:off" \
Harald Hoyer bb31e7
+	       "netroot=iscsi:192.168.51.1::::iqn.2009-06.dracut:target1" \
Harald Hoyer bb31e7
+               "netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target2" \
Harald Hoyer bb31e7
+               "rd.iscsi.initiator=$initiator" \
Harald Hoyer bb31e7
+               "rd.waitnet=0 rd.iscsi.testroute=0 rd.retry=30" \
Harald Hoyer bb31e7
+	|| return 1
Harald Hoyer bb31e7
+
Harald Hoyer bb31e7
     return 0
Harald Hoyer bb31e7
 }
Harald Hoyer bb31e7