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

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