]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
TEST-15-BTRFSRAID: use seperate disk image for boot result
authorHarald Hoyer <harald@redhat.com>
Thu, 16 Aug 2018 11:05:42 +0000 (13:05 +0200)
committerHarald Hoyer <harald@redhat.com>
Thu, 16 Aug 2018 11:20:35 +0000 (13:20 +0200)
test/TEST-15-BTRFSRAID/test-init.sh
test/TEST-15-BTRFSRAID/test.sh

index ab9021dfae1c4b236df5a86627a5976693f6bde0..ed66a2b3555b227aea1eb8999ff9f7f26b1dc7e9 100755 (executable)
@@ -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\$ '
index 3936ade240e7e834f42176961e35ed738a6e03e3..092ed254e6b5e9b309fc06418eca48ccb2780d3f 100755 (executable)
@@ -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() {