]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
test: always call sync before poweroff -f
authorBenjamin Drung <benjamin.drung@canonical.com>
Sat, 7 Feb 2026 12:19:37 +0000 (13:19 +0100)
committerLaszlo <1522773+LaszloGombos@users.noreply.github.com>
Sat, 7 Feb 2026 13:16:45 +0000 (08:16 -0500)
To be on the safe side, call `sync` before calling `poweroff -f` after
creating client rootfs in a virtual machine.

test/TEST-11-USR-MOUNT/create-root.sh
test/TEST-20-STORAGE/create-root.sh
test/TEST-26-ENC-RAID-LVM/create-root.sh
test/TEST-41-FULL-SYSTEMD/create-root.sh
test/TEST-70-ISCSI/create-client-root.sh
test/TEST-71-ISCSI-MULTI/create-client-root.sh
test/TEST-72-NBD/create-encrypted-root.sh

index d9a39c904b462b2c7ef202ac4245918158782a04..9538ab93371bafa306e3a182d6531c5cc0c72845 100755 (executable)
@@ -16,5 +16,5 @@ btrfs filesystem sync /root
 btrfs subvolume snapshot -r /root /root/snapshot-root
 umount /root
 echo "dracut-root-block-created" | dd oflag=direct of=/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_marker status=none
-sync /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_marker
+sync
 poweroff -f
index bc626f808997b86ab18b8d71a6483c3fc798480d..87e129e759032c28507147578d4a607e6d421602 100755 (executable)
@@ -86,5 +86,5 @@ fi
     echo "ID_FS_UUID=$ID_FS_UUID"
 } | dd oflag=direct of=/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_marker status=none
 
-sync /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_marker
+sync
 poweroff -f
index d40a5178467ae065e1c517de20b096add3622851..58f9cdeae3ebe334409ee950a28441b224a6abcb 100755 (executable)
@@ -33,5 +33,5 @@ cryptsetup luksClose /dev/mapper/dracut_disk2
         udevadm info --query=property --name="$i" | grep -F 'ID_FS_UUID='
     done
 } | dd oflag=direct of=/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_marker status=none
-sync /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_marker
+sync
 poweroff -f
index 345f0a16cef1803199e8d30b8173bc2c354d2cc4..ddbbfd270bfbcf8bd11e7aa7547dc29d4d6a962c 100755 (executable)
@@ -38,5 +38,5 @@ eval "$(udevadm info --query=property --name=/dev/disk/by-id/scsi-0QEMU_QEMU_HAR
     echo "dracut-root-block-created"
     echo "ID_FS_UUID=$ID_FS_UUID"
 } | dd oflag=direct of=/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_marker status=none
-sync /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_marker
+sync
 poweroff -f
index 9cf1ee19aa8a7dd15e73e84482a07a21813899ca..ee8c183c35a959afe97492d935972de11f1faea2 100755 (executable)
@@ -17,5 +17,5 @@ lvm lvchange -a n /dev/dracut/root
 mdadm -W /dev/md0 || :
 mdadm --stop /dev/md0
 echo "dracut-root-block-created" | dd oflag=direct of=/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_marker status=none
-sync /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_marker
+sync
 poweroff -f
index 9cf1ee19aa8a7dd15e73e84482a07a21813899ca..ee8c183c35a959afe97492d935972de11f1faea2 100755 (executable)
@@ -17,5 +17,5 @@ lvm lvchange -a n /dev/dracut/root
 mdadm -W /dev/md0 || :
 mdadm --stop /dev/md0
 echo "dracut-root-block-created" | dd oflag=direct of=/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_marker status=none
-sync /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_marker
+sync
 poweroff -f
index 7d48053a9a727bb82f59b92cf35584cdb2ec27eb..601664f35339d208cc552c9e17a5a1941b272b37 100755 (executable)
@@ -28,5 +28,5 @@ eval "$(udevadm info --query=property --name=/dev/disk/by-id/scsi-0QEMU_QEMU_HAR
     echo "dracut-root-block-created"
     echo "ID_FS_UUID=$ID_FS_UUID"
 } | dd oflag=direct of=/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_marker status=none
-sync /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_marker
+sync
 poweroff -f