Blame SOURCES/0393-test-TEST-02-systemd-use-marker-disk-for-successfull.patch

a0a3b4
From 8175f5eb82d5efd8f873c091793a4c6500b50956 Mon Sep 17 00:00:00 2001
a0a3b4
From: Harald Hoyer <harald@redhat.com>
a0a3b4
Date: Mon, 27 Jun 2016 10:28:09 +0200
a0a3b4
Subject: [PATCH] test/TEST-02-systemd: use marker disk for successfull boot
a0a3b4
 marker
a0a3b4
a0a3b4
---
a0a3b4
 test/TEST-02-SYSTEMD/test-init.sh |  2 +-
a0a3b4
 test/TEST-02-SYSTEMD/test.sh      | 10 +++++++---
a0a3b4
 2 files changed, 8 insertions(+), 4 deletions(-)
a0a3b4
a0a3b4
diff --git a/test/TEST-02-SYSTEMD/test-init.sh b/test/TEST-02-SYSTEMD/test-init.sh
a0a3b4
index ff17b6b..1c65e84 100755
a0a3b4
--- a/test/TEST-02-SYSTEMD/test-init.sh
a0a3b4
+++ b/test/TEST-02-SYSTEMD/test-init.sh
a0a3b4
@@ -4,7 +4,7 @@ strstr() { [ "${1#*$2*}" != "$1" ]; }
a0a3b4
 CMDLINE=$(while read line; do echo $line;done < /proc/cmdline)
a0a3b4
 plymouth --quit
a0a3b4
 exec </dev/console >/dev/console 2>&1
a0a3b4
-echo "dracut-root-block-success" >/dev/sda1
a0a3b4
+echo "dracut-root-block-success" >/dev/sdb
a0a3b4
 export TERM=linux
a0a3b4
 export PS1='initramfs-test:\w\$ '
a0a3b4
 [ -f /etc/mtab ] || ln -sfn /proc/mounts /etc/mtab
a0a3b4
diff --git a/test/TEST-02-SYSTEMD/test.sh b/test/TEST-02-SYSTEMD/test.sh
a0a3b4
index 47268b0..6f33181 100755
a0a3b4
--- a/test/TEST-02-SYSTEMD/test.sh
a0a3b4
+++ b/test/TEST-02-SYSTEMD/test.sh
a0a3b4
@@ -4,19 +4,23 @@ TEST_DESCRIPTION="root filesystem on a ext3 filesystem"
a0a3b4
 KVERSION="${KVERSION-$(uname -r)}"
a0a3b4
 
a0a3b4
 # Uncomment this to debug failures
a0a3b4
-#DEBUGFAIL="rd.shell"
a0a3b4
+#DEBUGFAIL="rd.shell loglevel=77 systemd.log_level=debug systemd.log_target=console"
a0a3b4
+#DEBUGFAIL="rd.shell rd.break=initqueue"
a0a3b4
 test_run() {
a0a3b4
+    dd if=/dev/zero of=$TESTDIR/marker.disk bs=1M count=80
a0a3b4
     $testdir/run-qemu \
a0a3b4
 	-hda $TESTDIR/root.ext3 \
a0a3b4
+	-hdb $TESTDIR/marker.disk \
a0a3b4
 	-m 256M -smp 2 -nographic \
a0a3b4
 	-net none -kernel /boot/vmlinuz-$KVERSION \
a0a3b4
-	-append "root=LABEL=dracut rw loglevel=77 systemd.log_level=debug systemd.log_target=console rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug init=/sbin/init $DEBUGFAIL" \
a0a3b4
+	-append "root=LABEL=dracut rw loglevel=77 rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 init=/sbin/init $DEBUGFAIL" \
a0a3b4
 	-initrd $TESTDIR/initramfs.testing
a0a3b4
-    grep -F -m 1 -q dracut-root-block-success $TESTDIR/root.ext3 || return 1
a0a3b4
+    grep -F -m 1 -q dracut-root-block-success $TESTDIR/marker.disk || return 1
a0a3b4
 }
a0a3b4
 
a0a3b4
 test_setup() {
a0a3b4
     rm -f -- $TESTDIR/root.ext3
a0a3b4
+    rm -f -- $TESTDIR/marker.disk
a0a3b4
     # Create the blank file to use as a root filesystem
a0a3b4
     dd if=/dev/null of=$TESTDIR/root.ext3 bs=1M seek=80
a0a3b4