From: Harald Hoyer Date: Thu, 16 Aug 2018 11:05:42 +0000 (+0200) Subject: TEST-15-BTRFSRAID: use seperate disk image for boot result X-Git-Tag: 049~37 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7c62555bcffd7565883738df5e8c2150e887694f;p=thirdparty%2Fdracut.git TEST-15-BTRFSRAID: use seperate disk image for boot result --- diff --git a/test/TEST-15-BTRFSRAID/test-init.sh b/test/TEST-15-BTRFSRAID/test-init.sh index ab9021dfa..ed66a2b35 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 3936ade24..092ed254e 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() {