Blame 0093-test-correct-cmdline-reading-functions.patch

Harald Hoyer 414eba
From b039b20ec257901b89ecb32fa8d4ded676c0096c Mon Sep 17 00:00:00 2001
Harald Hoyer 414eba
From: Harald Hoyer <harald@redhat.com>
Harald Hoyer 414eba
Date: Mon, 27 Jun 2016 12:05:37 +0200
Harald Hoyer 414eba
Subject: [PATCH] test: correct cmdline reading functions
Harald Hoyer 414eba
Harald Hoyer 414eba
---
Harald Hoyer 414eba
 test/TEST-01-BASIC/test-init.sh        | 2 +-
Harald Hoyer 414eba
 test/TEST-02-SYSTEMD/test-init.sh      | 4 ++--
Harald Hoyer 414eba
 test/TEST-02-SYSTEMD/test.sh           | 2 +-
Harald Hoyer 414eba
 test/TEST-03-USR-MOUNT/test-init.sh    | 2 +-
Harald Hoyer 414eba
 test/TEST-04-FULL-SYSTEMD/test-init.sh | 2 +-
Harald Hoyer 414eba
 test/TEST-10-RAID/test-init.sh         | 2 +-
Harald Hoyer 414eba
 test/TEST-11-LVM/test-init.sh          | 2 +-
Harald Hoyer 414eba
 test/TEST-12-RAID-DEG/test-init.sh     | 2 +-
Harald Hoyer 414eba
 test/TEST-14-IMSM/test-init.sh         | 2 +-
Harald Hoyer 414eba
 test/TEST-16-DMSQUASH/test-init.sh     | 2 +-
Harald Hoyer 414eba
 test/TEST-17-LVM-THIN/test-init.sh     | 2 +-
Harald Hoyer 414eba
 test/TEST-20-NFS/client-init.sh        | 2 +-
Harald Hoyer 414eba
 test/TEST-30-ISCSI/client-init.sh      | 2 +-
Harald Hoyer 414eba
 test/TEST-50-MULTINIC/client-init.sh   | 2 +-
Harald Hoyer 414eba
 14 files changed, 15 insertions(+), 15 deletions(-)
Harald Hoyer 414eba
Harald Hoyer 414eba
diff --git a/test/TEST-01-BASIC/test-init.sh b/test/TEST-01-BASIC/test-init.sh
Harald Hoyer 414eba
index a8b6e39..78f124a 100755
Harald Hoyer 414eba
--- a/test/TEST-01-BASIC/test-init.sh
Harald Hoyer 414eba
+++ b/test/TEST-01-BASIC/test-init.sh
Harald Hoyer 414eba
@@ -2,7 +2,7 @@
Harald Hoyer 414eba
 >/dev/watchdog
Harald Hoyer 414eba
 getcmdline() {
Harald Hoyer 414eba
     while read -r _line || [ -n "$_line" ]; do
Harald Hoyer 414eba
-        printf "%s" "$line"
Harald Hoyer 414eba
+        printf "%s" "$_line"
Harald Hoyer 414eba
     done 
Harald Hoyer 414eba
 }
Harald Hoyer 414eba
 
Harald Hoyer 414eba
diff --git a/test/TEST-02-SYSTEMD/test-init.sh b/test/TEST-02-SYSTEMD/test-init.sh
Harald Hoyer 414eba
index 0999bc0..63fd58f 100755
Harald Hoyer 414eba
--- a/test/TEST-02-SYSTEMD/test-init.sh
Harald Hoyer 414eba
+++ b/test/TEST-02-SYSTEMD/test-init.sh
Harald Hoyer 414eba
@@ -2,7 +2,7 @@
Harald Hoyer 414eba
 
Harald Hoyer 414eba
 getcmdline() {
Harald Hoyer 414eba
     while read -r _line || [ -n "$_line" ]; do
Harald Hoyer 414eba
-        printf "%s" "$line"
Harald Hoyer 414eba
+        printf "%s" "$_line"
Harald Hoyer 414eba
     done 
Harald Hoyer 414eba
 }
Harald Hoyer 414eba
 
Harald Hoyer 414eba
@@ -99,7 +99,7 @@ getargbool() {
Harald Hoyer 414eba
 
Harald Hoyer 414eba
 export PATH=/sbin:/bin:/usr/sbin:/usr/bin
Harald Hoyer 414eba
 strstr() { [ "${1##*"$2"*}" != "$1" ]; }
Harald Hoyer 414eba
-CMDLINE=$(while read line || [ -n "$line" ]; do echo $line;done < /proc/cmdline)
Harald Hoyer 414eba
+
Harald Hoyer 414eba
 plymouth --quit
Harald Hoyer 414eba
 exec </dev/console >/dev/console 2>&1
Harald Hoyer 414eba
 echo "dracut-root-block-success" >/dev/sda1
Harald Hoyer 414eba
diff --git a/test/TEST-02-SYSTEMD/test.sh b/test/TEST-02-SYSTEMD/test.sh
Harald Hoyer 414eba
index 6189561..9736278 100755
Harald Hoyer 414eba
--- a/test/TEST-02-SYSTEMD/test.sh
Harald Hoyer 414eba
+++ b/test/TEST-02-SYSTEMD/test.sh
Harald Hoyer 414eba
@@ -4,7 +4,7 @@ TEST_DESCRIPTION="root filesystem on a ext3 filesystem"
Harald Hoyer 414eba
 KVERSION="${KVERSION-$(uname -r)}"
Harald Hoyer 414eba
 
Harald Hoyer 414eba
 # Uncomment this to debug failures
Harald Hoyer 414eba
-#DEBUGFAIL="rd.shell"
Harald Hoyer 414eba
+#DEBUGFAIL="rd.shell=1 rd.break"
Harald Hoyer 414eba
 test_run() {
Harald Hoyer 414eba
     $testdir/run-qemu \
Harald Hoyer 414eba
 	-drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext3 \
Harald Hoyer 414eba
diff --git a/test/TEST-03-USR-MOUNT/test-init.sh b/test/TEST-03-USR-MOUNT/test-init.sh
Harald Hoyer 414eba
index 68eaff0..dc03359 100755
Harald Hoyer 414eba
--- a/test/TEST-03-USR-MOUNT/test-init.sh
Harald Hoyer 414eba
+++ b/test/TEST-03-USR-MOUNT/test-init.sh
Harald Hoyer 414eba
@@ -2,7 +2,7 @@
Harald Hoyer 414eba
 >/dev/watchdog
Harald Hoyer 414eba
 getcmdline() {
Harald Hoyer 414eba
     while read -r _line || [ -n "$_line" ]; do
Harald Hoyer 414eba
-        printf "%s" "$line"
Harald Hoyer 414eba
+        printf "%s" "$_line"
Harald Hoyer 414eba
     done 
Harald Hoyer 414eba
 }
Harald Hoyer 414eba
 
Harald Hoyer 414eba
diff --git a/test/TEST-04-FULL-SYSTEMD/test-init.sh b/test/TEST-04-FULL-SYSTEMD/test-init.sh
Harald Hoyer 414eba
index e388afc..3b29bee 100755
Harald Hoyer 414eba
--- a/test/TEST-04-FULL-SYSTEMD/test-init.sh
Harald Hoyer 414eba
+++ b/test/TEST-04-FULL-SYSTEMD/test-init.sh
Harald Hoyer 414eba
@@ -2,7 +2,7 @@
Harald Hoyer 414eba
 >/dev/watchdog
Harald Hoyer 414eba
 getcmdline() {
Harald Hoyer 414eba
     while read -r _line || [ -n "$_line" ]; do
Harald Hoyer 414eba
-        printf "%s" "$line"
Harald Hoyer 414eba
+        printf "%s" "$_line"
Harald Hoyer 414eba
     done 
Harald Hoyer 414eba
 }
Harald Hoyer 414eba
 
Harald Hoyer 414eba
diff --git a/test/TEST-10-RAID/test-init.sh b/test/TEST-10-RAID/test-init.sh
Harald Hoyer 414eba
index 7eb932a..5ca9de1 100755
Harald Hoyer 414eba
--- a/test/TEST-10-RAID/test-init.sh
Harald Hoyer 414eba
+++ b/test/TEST-10-RAID/test-init.sh
Harald Hoyer 414eba
@@ -2,7 +2,7 @@
Harald Hoyer 414eba
 export PATH=/sbin:/bin:/usr/sbin:/usr/bin
Harald Hoyer 414eba
 getcmdline() {
Harald Hoyer 414eba
     while read -r _line || [ -n "$_line" ]; do
Harald Hoyer 414eba
-        printf "%s" "$line"
Harald Hoyer 414eba
+        printf "%s" "$_line"
Harald Hoyer 414eba
     done 
Harald Hoyer 414eba
 }
Harald Hoyer 414eba
 
Harald Hoyer 414eba
diff --git a/test/TEST-11-LVM/test-init.sh b/test/TEST-11-LVM/test-init.sh
Harald Hoyer 414eba
index 18fd2b3..00d9da7 100755
Harald Hoyer 414eba
--- a/test/TEST-11-LVM/test-init.sh
Harald Hoyer 414eba
+++ b/test/TEST-11-LVM/test-init.sh
Harald Hoyer 414eba
@@ -2,7 +2,7 @@
Harald Hoyer 414eba
 export PATH=/sbin:/bin:/usr/sbin:/usr/bin
Harald Hoyer 414eba
 getcmdline() {
Harald Hoyer 414eba
     while read -r _line || [ -n "$_line" ]; do
Harald Hoyer 414eba
-        printf "%s" "$line"
Harald Hoyer 414eba
+        printf "%s" "$_line"
Harald Hoyer 414eba
     done 
Harald Hoyer 414eba
 }
Harald Hoyer 414eba
 
Harald Hoyer 414eba
diff --git a/test/TEST-12-RAID-DEG/test-init.sh b/test/TEST-12-RAID-DEG/test-init.sh
Harald Hoyer 414eba
index 7eb932a..5ca9de1 100755
Harald Hoyer 414eba
--- a/test/TEST-12-RAID-DEG/test-init.sh
Harald Hoyer 414eba
+++ b/test/TEST-12-RAID-DEG/test-init.sh
Harald Hoyer 414eba
@@ -2,7 +2,7 @@
Harald Hoyer 414eba
 export PATH=/sbin:/bin:/usr/sbin:/usr/bin
Harald Hoyer 414eba
 getcmdline() {
Harald Hoyer 414eba
     while read -r _line || [ -n "$_line" ]; do
Harald Hoyer 414eba
-        printf "%s" "$line"
Harald Hoyer 414eba
+        printf "%s" "$_line"
Harald Hoyer 414eba
     done 
Harald Hoyer 414eba
 }
Harald Hoyer 414eba
 
Harald Hoyer 414eba
diff --git a/test/TEST-14-IMSM/test-init.sh b/test/TEST-14-IMSM/test-init.sh
Harald Hoyer 414eba
index 127185a..01cbe96 100755
Harald Hoyer 414eba
--- a/test/TEST-14-IMSM/test-init.sh
Harald Hoyer 414eba
+++ b/test/TEST-14-IMSM/test-init.sh
Harald Hoyer 414eba
@@ -1,7 +1,7 @@
Harald Hoyer 414eba
 #!/bin/sh
Harald Hoyer 414eba
 getcmdline() {
Harald Hoyer 414eba
     while read -r _line || [ -n "$_line" ]; do
Harald Hoyer 414eba
-        printf "%s" "$line"
Harald Hoyer 414eba
+        printf "%s" "$_line"
Harald Hoyer 414eba
     done 
Harald Hoyer 414eba
 }
Harald Hoyer 414eba
 
Harald Hoyer 414eba
diff --git a/test/TEST-16-DMSQUASH/test-init.sh b/test/TEST-16-DMSQUASH/test-init.sh
Harald Hoyer 414eba
index 5fe523c..3a93c80 100755
Harald Hoyer 414eba
--- a/test/TEST-16-DMSQUASH/test-init.sh
Harald Hoyer 414eba
+++ b/test/TEST-16-DMSQUASH/test-init.sh
Harald Hoyer 414eba
@@ -1,7 +1,7 @@
Harald Hoyer 414eba
 #!/bin/sh
Harald Hoyer 414eba
 getcmdline() {
Harald Hoyer 414eba
     while read -r _line || [ -n "$_line" ]; do
Harald Hoyer 414eba
-        printf "%s" "$line"
Harald Hoyer 414eba
+        printf "%s" "$_line"
Harald Hoyer 414eba
     done 
Harald Hoyer 414eba
 }
Harald Hoyer 414eba
 
Harald Hoyer 414eba
diff --git a/test/TEST-17-LVM-THIN/test-init.sh b/test/TEST-17-LVM-THIN/test-init.sh
Harald Hoyer 414eba
index 77fb346..cb9d921 100755
Harald Hoyer 414eba
--- a/test/TEST-17-LVM-THIN/test-init.sh
Harald Hoyer 414eba
+++ b/test/TEST-17-LVM-THIN/test-init.sh
Harald Hoyer 414eba
@@ -1,7 +1,7 @@
Harald Hoyer 414eba
 #!/bin/sh
Harald Hoyer 414eba
 getcmdline() {
Harald Hoyer 414eba
     while read -r _line || [ -n "$_line" ]; do
Harald Hoyer 414eba
-        printf "%s" "$line"
Harald Hoyer 414eba
+        printf "%s" "$_line"
Harald Hoyer 414eba
     done 
Harald Hoyer 414eba
 }
Harald Hoyer 414eba
 
Harald Hoyer 414eba
diff --git a/test/TEST-20-NFS/client-init.sh b/test/TEST-20-NFS/client-init.sh
Harald Hoyer 414eba
index eea162c..55762d1 100755
Harald Hoyer 414eba
--- a/test/TEST-20-NFS/client-init.sh
Harald Hoyer 414eba
+++ b/test/TEST-20-NFS/client-init.sh
Harald Hoyer 414eba
@@ -1,7 +1,7 @@
Harald Hoyer 414eba
 #!/bin/sh
Harald Hoyer 414eba
 getcmdline() {
Harald Hoyer 414eba
     while read -r _line || [ -n "$_line" ]; do
Harald Hoyer 414eba
-        printf "%s" "$line"
Harald Hoyer 414eba
+        printf "%s" "$_line"
Harald Hoyer 414eba
     done 
Harald Hoyer 414eba
 }
Harald Hoyer 414eba
 
Harald Hoyer 414eba
diff --git a/test/TEST-30-ISCSI/client-init.sh b/test/TEST-30-ISCSI/client-init.sh
Harald Hoyer 414eba
index 7279987..7a5b754 100755
Harald Hoyer 414eba
--- a/test/TEST-30-ISCSI/client-init.sh
Harald Hoyer 414eba
+++ b/test/TEST-30-ISCSI/client-init.sh
Harald Hoyer 414eba
@@ -1,7 +1,7 @@
Harald Hoyer 414eba
 #!/bin/sh
Harald Hoyer 414eba
 getcmdline() {
Harald Hoyer 414eba
     while read -r _line || [ -n "$_line" ]; do
Harald Hoyer 414eba
-        printf "%s" "$line"
Harald Hoyer 414eba
+        printf "%s" "$_line"
Harald Hoyer 414eba
     done 
Harald Hoyer 414eba
 }
Harald Hoyer 414eba
 
Harald Hoyer 414eba
diff --git a/test/TEST-50-MULTINIC/client-init.sh b/test/TEST-50-MULTINIC/client-init.sh
Harald Hoyer 414eba
index d9ba45e..529379f 100755
Harald Hoyer 414eba
--- a/test/TEST-50-MULTINIC/client-init.sh
Harald Hoyer 414eba
+++ b/test/TEST-50-MULTINIC/client-init.sh
Harald Hoyer 414eba
@@ -1,7 +1,7 @@
Harald Hoyer 414eba
 #!/bin/sh
Harald Hoyer 414eba
 getcmdline() {
Harald Hoyer 414eba
     while read -r _line || [ -n "$_line" ]; do
Harald Hoyer 414eba
-        printf "%s" "$line"
Harald Hoyer 414eba
+        printf "%s" "$_line"
Harald Hoyer 414eba
     done 
Harald Hoyer 414eba
 }
Harald Hoyer 414eba