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

master
Harald Hoyer 2020-03-03 16:56:16 +01:00
parent ce62465caf
commit c7403700df
2 changed files with 4 additions and 3 deletions

View File

@ -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


View File

@ -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