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