Browse Source

TEST-04-FULL-SYSTEMD: use seperate marker disk for root creation

master
Harald Hoyer 5 years ago
parent
commit
c7403700df
  1. 3
      test/TEST-04-FULL-SYSTEMD/create-root.sh
  2. 4
      test/TEST-04-FULL-SYSTEMD/test.sh

3
test/TEST-04-FULL-SYSTEMD/create-root.sh

@ -38,7 +38,6 @@ btrfs filesystem sync /root/usr @@ -38,7 +38,6 @@ btrfs filesystem sync /root/usr
btrfs filesystem sync /root
umount /root/usr
umount /root
echo "dracut-root-block-created" | dd oflag=direct,dsync of=/dev/sda1
echo "dracut-root-block-created" | dd oflag=direct,dsync of=/dev/sdc
sync
poweroff -f


4
test/TEST-04-FULL-SYSTEMD/test.sh

@ -242,12 +242,14 @@ EOF @@ -242,12 +242,14 @@ EOF
# Invoke KVM and/or QEMU to actually create the target filesystem.
rm -rf -- $TESTDIR/overlay

dd if=/dev/zero of=$TESTDIR/result bs=1M count=1
$testdir/run-qemu \
-drive format=raw,index=0,media=disk,file=$TESTDIR/root.btrfs \
-drive format=raw,index=1,media=disk,file=$TESTDIR/usr.btrfs \
-drive format=raw,index=2,media=disk,file=$TESTDIR/result \
-append "root=/dev/fakeroot rw rootfstype=btrfs quiet console=ttyS0,115200n81 selinux=0" \
-initrd $TESTDIR/initramfs.makeroot || return 1
if ! grep -F -m 1 -q dracut-root-block-created $TESTDIR/root.btrfs; then
if ! grep -F -m 1 -q dracut-root-block-created $TESTDIR/result; then
echo "Could not create root filesystem"
return 1
fi

Loading…
Cancel
Save