dracut/0093-test-correct-cmdline-reading-functions.patch
Harald Hoyer 414eba6e75 dracut-044-109
- git snapshot
2016-08-18 13:30:10 +02:00

214 lines
6.5 KiB
Diff

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