From: Benjamin Drung Date: Sat, 7 Feb 2026 12:19:37 +0000 (+0100) Subject: test: always call sync before poweroff -f X-Git-Tag: 110~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dbe40e5ba47576f4f12db8e74bafe6e52a9392cb;p=thirdparty%2Fdracut-ng.git test: always call sync before poweroff -f To be on the safe side, call `sync` before calling `poweroff -f` after creating client rootfs in a virtual machine. --- diff --git a/test/TEST-11-USR-MOUNT/create-root.sh b/test/TEST-11-USR-MOUNT/create-root.sh index d9a39c904..9538ab933 100755 --- a/test/TEST-11-USR-MOUNT/create-root.sh +++ b/test/TEST-11-USR-MOUNT/create-root.sh @@ -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 diff --git a/test/TEST-20-STORAGE/create-root.sh b/test/TEST-20-STORAGE/create-root.sh index bc626f808..87e129e75 100755 --- a/test/TEST-20-STORAGE/create-root.sh +++ b/test/TEST-20-STORAGE/create-root.sh @@ -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 diff --git a/test/TEST-26-ENC-RAID-LVM/create-root.sh b/test/TEST-26-ENC-RAID-LVM/create-root.sh index d40a51784..58f9cdeae 100755 --- a/test/TEST-26-ENC-RAID-LVM/create-root.sh +++ b/test/TEST-26-ENC-RAID-LVM/create-root.sh @@ -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 diff --git a/test/TEST-41-FULL-SYSTEMD/create-root.sh b/test/TEST-41-FULL-SYSTEMD/create-root.sh index 345f0a16c..ddbbfd270 100755 --- a/test/TEST-41-FULL-SYSTEMD/create-root.sh +++ b/test/TEST-41-FULL-SYSTEMD/create-root.sh @@ -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 diff --git a/test/TEST-70-ISCSI/create-client-root.sh b/test/TEST-70-ISCSI/create-client-root.sh index 9cf1ee19a..ee8c183c3 100755 --- a/test/TEST-70-ISCSI/create-client-root.sh +++ b/test/TEST-70-ISCSI/create-client-root.sh @@ -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 diff --git a/test/TEST-71-ISCSI-MULTI/create-client-root.sh b/test/TEST-71-ISCSI-MULTI/create-client-root.sh index 9cf1ee19a..ee8c183c3 100755 --- a/test/TEST-71-ISCSI-MULTI/create-client-root.sh +++ b/test/TEST-71-ISCSI-MULTI/create-client-root.sh @@ -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 diff --git a/test/TEST-72-NBD/create-encrypted-root.sh b/test/TEST-72-NBD/create-encrypted-root.sh index 7d48053a9..601664f35 100755 --- a/test/TEST-72-NBD/create-encrypted-root.sh +++ b/test/TEST-72-NBD/create-encrypted-root.sh @@ -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