Browse Source

TEST-15-BTRFSRAID: use seperate disk image for boot result

master
Harald Hoyer 7 years ago
parent
commit
7c62555bcf
  1. 2
      test/TEST-15-BTRFSRAID/test-init.sh
  2. 10
      test/TEST-15-BTRFSRAID/test.sh

2
test/TEST-15-BTRFSRAID/test-init.sh

@ -1,7 +1,7 @@ @@ -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\$ '

10
test/TEST-15-BTRFSRAID/test.sh

@ -7,15 +7,17 @@ KVERSION=${KVERSION-$(uname -r)} @@ -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() {

Loading…
Cancel
Save