You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
2.3 KiB

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