Blob Blame History Raw
From 7c62555bcffd7565883738df5e8c2150e887694f Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Thu, 16 Aug 2018 13:05:42 +0200
Subject: [PATCH] TEST-15-BTRFSRAID: use seperate disk image for boot result

---
 test/TEST-15-BTRFSRAID/test-init.sh |  2 +-
 test/TEST-15-BTRFSRAID/test.sh      | 10 ++++++----
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/test/TEST-15-BTRFSRAID/test-init.sh b/test/TEST-15-BTRFSRAID/test-init.sh
index ab9021df..ed66a2b3 100755
--- a/test/TEST-15-BTRFSRAID/test-init.sh
+++ b/test/TEST-15-BTRFSRAID/test-init.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 export PATH=/sbin:/bin:/usr/sbin:/usr/bin
 exec >/dev/console 2>&1
-echo "dracut-root-block-success" >/dev/sda1
+echo "dracut-root-block-success" >/dev/sda
 sync
 export TERM=linux
 export PS1='initramfs-test:\w\$ '
diff --git a/test/TEST-15-BTRFSRAID/test.sh b/test/TEST-15-BTRFSRAID/test.sh
index 3936ade2..092ed254 100755
--- a/test/TEST-15-BTRFSRAID/test.sh
+++ b/test/TEST-15-BTRFSRAID/test.sh
@@ -7,15 +7,17 @@ KVERSION=${KVERSION-$(uname -r)}
 #DEBUGFAIL="rd.shell"
 test_run() {
     DISKIMAGE=$TESTDIR/TEST-15-BTRFSRAID-root.img
+    MARKER_DISKIMAGE=$TESTDIR/TEST-15-BTRFSRAID-marker.img
+    dd if=/dev/zero of=$MARKER_DISKIMAGE bs=512 count=10
     $testdir/run-qemu \
-	-drive format=raw,index=0,media=disk,file=$DISKIMAGE \
-	-m 512M   -smp 2 -nographic \
+	-drive format=raw,index=0,media=disk,file=$MARKER_DISKIMAGE \
+	-drive format=raw,index=1,media=disk,file=$DISKIMAGE \
+	-m 512M -smp 2 -nographic \
 	-net none \
         -no-reboot \
 	-append "panic=1 root=LABEL=root rw rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.shell=0 $DEBUGFAIL" \
 	-initrd $TESTDIR/initramfs.testing
-    dd if=$DISKIMAGE bs=512 count=4 skip=2048 | grep -F -m 1 -q dracut-root-block-success $DISKIMAGE || return 1
-    return 0
+    grep -F -m 1 -q dracut-root-block-success $MARKER_DISKIMAGE || return 1
 }
 
 test_setup() {