Skip to content

Commit 72cba8a

Browse files
committed
test: sync and poweroff in create-root.sh
1 parent 1b61cfd commit 72cba8a

File tree

23 files changed

+30
-20
lines changed

23 files changed

+30
-20
lines changed

test/TEST-10-RAID/create-root.sh

+1
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,5 @@ cryptsetup luksClose /dev/mapper/dracut_crypt_test
3838
udevadm settle
3939
eval $(udevadm info --query=env --name=/dev/md0|while read line || [ -n "$line" ]; do [ "$line" != "${line#*ID_FS_UUID*}" ] && echo $line; done;)
4040
{ echo "dracut-root-block-created"; echo "ID_FS_UUID=$ID_FS_UUID"; } | dd oflag=direct,dsync of=/dev/sda1
41+
sync
4142
poweroff -f

test/TEST-10-RAID/test.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ test_setup() {
5555
(
5656
export initdir=$TESTDIR/overlay
5757
. $basedir/dracut-init.sh
58-
inst_multiple sfdisk mke2fs poweroff cp umount dd
58+
inst_multiple sfdisk mke2fs poweroff cp umount dd sync
5959
inst_hook initqueue 01 ./create-root.sh
6060
inst_hook initqueue/finished 01 ./finished-false.sh
6161
inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
@@ -65,7 +65,7 @@ test_setup() {
6565
# We do it this way so that we do not risk trashing the host mdraid
6666
# devices, volume groups, encrypted partitions, etc.
6767
$basedir/dracut.sh -l -i $TESTDIR/overlay / \
68-
-m "dash crypt lvm mdraid udev-rules base rootfs-block fs-lib kernel-modules qemu" \
68+
-m "bash crypt lvm mdraid udev-rules base rootfs-block fs-lib kernel-modules qemu" \
6969
-d "piix ide-gd_mod ata_piix ext2 sd_mod" \
7070
--nomdadmconf \
7171
--no-hostonly-cmdline -N \

test/TEST-11-LVM/create-root.sh

+1
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,5 @@ sleep 1 && \
2929
lvm lvchange -a n /dev/dracut/root && \
3030
sleep 1 && \
3131
echo "dracut-root-block-created" | dd oflag=direct,dsync of=/dev/sda1
32+
sync
3233
poweroff -f

test/TEST-11-LVM/test.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ test_setup() {
5353
(
5454
export initdir=$TESTDIR/overlay
5555
. $basedir/dracut-init.sh
56-
inst_multiple sfdisk mke2fs poweroff cp umount dd
56+
inst_multiple sfdisk mke2fs poweroff cp umount dd sync
5757
inst_hook initqueue 01 ./create-root.sh
5858
inst_hook initqueue/finished 01 ./finished-false.sh
5959
inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
@@ -63,7 +63,7 @@ test_setup() {
6363
# We do it this way so that we do not risk trashing the host mdraid
6464
# devices, volume groups, encrypted partitions, etc.
6565
$basedir/dracut.sh -l -i $TESTDIR/overlay / \
66-
-m "dash lvm mdraid udev-rules base rootfs-block fs-lib kernel-modules qemu" \
66+
-m "bash lvm mdraid udev-rules base rootfs-block fs-lib kernel-modules qemu" \
6767
-d "piix ide-gd_mod ata_piix ext2 sd_mod" \
6868
--no-hostonly-cmdline -N \
6969
-f $TESTDIR/initramfs.makeroot $KVERSION || return 1

test/TEST-12-RAID-DEG/create-root.sh

+3
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ printf test >keyfile
1818
cryptsetup -q luksFormat /dev/md0 /keyfile
1919
echo "The passphrase is test"
2020
set -e
21+
set -x
2122
cryptsetup luksOpen /dev/md0 dracut_crypt_test </keyfile
2223
lvm pvcreate -ff -y /dev/mapper/dracut_crypt_test
2324
lvm vgcreate dracut /dev/mapper/dracut_crypt_test
@@ -40,3 +41,5 @@ mdadm --detail --export /dev/md0 |grep -F MD_UUID > /tmp/mduuid
4041
udevadm settle
4142
eval $(udevadm info --query=env --name=/dev/md0|while read line || [ -n "$line" ]; do [ "$line" != "${line#*ID_FS_UUID*}" ] && echo $line; done;)
4243
{ echo "dracut-root-block-created"; echo MD_UUID=$MD_UUID; echo "ID_FS_UUID=$ID_FS_UUID";} | dd oflag=direct,dsync of=/dev/sda
44+
sync
45+
poweroff -f

test/TEST-12-RAID-DEG/test.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ test_setup() {
9494
(
9595
export initdir=$TESTDIR/overlay
9696
. $basedir/dracut-init.sh
97-
inst_multiple sfdisk mke2fs poweroff cp umount dd grep
97+
inst_multiple sfdisk mke2fs poweroff cp umount dd grep sync
9898
inst_hook initqueue 01 ./create-root.sh
9999
inst_hook initqueue/finished 01 ./finished-false.sh
100100
inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
@@ -104,7 +104,7 @@ test_setup() {
104104
# We do it this way so that we do not risk trashing the host mdraid
105105
# devices, volume groups, encrypted partitions, etc.
106106
$basedir/dracut.sh -l -i $TESTDIR/overlay / \
107-
-m "dash crypt lvm mdraid udev-rules base rootfs-block fs-lib kernel-modules qemu" \
107+
-m "bash crypt lvm mdraid udev-rules base rootfs-block fs-lib kernel-modules qemu" \
108108
-d "piix ide-gd_mod ata_piix ext2 sd_mod" \
109109
--no-hostonly-cmdline -N \
110110
-f $TESTDIR/initramfs.makeroot $KVERSION || return 1

test/TEST-13-ENC-RAID-LVM/create-root.sh

+1
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,5 @@ cryptsetup luksClose /dev/mapper/dracut_sda4 && \
5353
udevadm info --query=env --name=$i|grep -F 'ID_FS_UUID='
5454
done
5555
} | dd oflag=direct,dsync of=/dev/sda1
56+
sync
5657
poweroff -f

test/TEST-13-ENC-RAID-LVM/test.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ test_setup() {
8686
(
8787
export initdir=$TESTDIR/overlay
8888
. $basedir/dracut-init.sh
89-
inst_multiple sfdisk mke2fs poweroff cp umount grep dd
89+
inst_multiple sfdisk mke2fs poweroff cp umount grep dd sync
9090
inst_hook initqueue 01 ./create-root.sh
9191
inst_hook initqueue/finished 01 ./finished-false.sh
9292
inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
@@ -96,7 +96,7 @@ test_setup() {
9696
# We do it this way so that we do not risk trashing the host mdraid
9797
# devices, volume groups, encrypted partitions, etc.
9898
$basedir/dracut.sh -l -i $TESTDIR/overlay / \
99-
-m "dash crypt lvm mdraid udev-rules base rootfs-block fs-lib kernel-modules qemu" \
99+
-m "bash crypt lvm mdraid udev-rules base rootfs-block fs-lib kernel-modules qemu" \
100100
-d "piix ide-gd_mod ata_piix ext2 sd_mod" \
101101
--no-hostonly-cmdline -N \
102102
-f $TESTDIR/initramfs.makeroot $KVERSION || return 1

test/TEST-14-IMSM/create-root.sh

+2
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,5 @@ mdadm --detail --export /dev/md0 |grep -F MD_UUID > /tmp/mduuid
7777
echo "MD_UUID=$MD_UUID"
7878
{ echo "dracut-root-block-created"; echo MD_UUID=$MD_UUID;} | dd oflag=direct,dsync of=/dev/sda
7979
mdadm --wait-clean /dev/md0
80+
sync
81+
poweroff -f

test/TEST-14-IMSM/test.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ test_setup() {
9191
(
9292
export initdir=$TESTDIR/overlay
9393
. $basedir/dracut-init.sh
94-
inst_multiple sfdisk mke2fs poweroff cp umount grep dd
94+
inst_multiple sfdisk mke2fs poweroff cp umount grep dd sync
9595
inst_hook initqueue 01 ./create-root.sh
9696
inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
9797
)
@@ -100,7 +100,7 @@ test_setup() {
100100
# We do it this way so that we do not risk trashing the host mdraid
101101
# devices, volume groups, encrypted partitions, etc.
102102
$basedir/dracut.sh -l -i $TESTDIR/overlay / \
103-
-m "dash lvm mdraid dmraid udev-rules base rootfs-block fs-lib kernel-modules qemu" \
103+
-m "bash lvm mdraid dmraid udev-rules base rootfs-block fs-lib kernel-modules qemu" \
104104
-d "piix ide-gd_mod ata_piix ext2 sd_mod dm-multipath dm-crypt dm-round-robin faulty linear multipath raid0 raid10 raid1 raid456" \
105105
--no-hostonly-cmdline -N \
106106
-f $TESTDIR/initramfs.makeroot $KVERSION || return 1

test/TEST-15-BTRFSRAID/create-root.sh

+1
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,5 @@ mount -t btrfs /dev/sda5 /sysroot
2525
cp -a -t /sysroot /source/*
2626
umount /sysroot
2727
echo "dracut-root-block-created" | dd oflag=direct,dsync of=/dev/sda1
28+
sync
2829
poweroff -f

test/TEST-15-BTRFSRAID/test.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ test_setup() {
5757
(
5858
export initdir=$TESTDIR/overlay
5959
. $basedir/dracut-init.sh
60-
inst_multiple sfdisk mkfs.btrfs poweroff cp umount dd
60+
inst_multiple sfdisk mkfs.btrfs poweroff cp umount dd sync
6161
inst_hook initqueue 01 ./create-root.sh
6262
inst_hook initqueue/finished 01 ./finished-false.sh
6363
inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
@@ -67,7 +67,7 @@ test_setup() {
6767
# We do it this way so that we do not risk trashing the host mdraid
6868
# devices, volume groups, encrypted partitions, etc.
6969
$basedir/dracut.sh -l -i $TESTDIR/overlay / \
70-
-m "dash btrfs udev-rules base rootfs-block fs-lib kernel-modules qemu" \
70+
-m "bash btrfs udev-rules base rootfs-block fs-lib kernel-modules qemu" \
7171
-d "piix ide-gd_mod ata_piix btrfs sd_mod" \
7272
--nomdadmconf \
7373
--no-hostonly-cmdline -N \

test/TEST-17-LVM-THIN/create-root.sh

+1
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,5 @@ lvm lvchange -a n /dev/dracut/root && \
3131
sleep 1
3232
dmsetup status |grep out_of_data_space || \
3333
echo "dracut-root-block-created" | dd oflag=direct,dsync of=/dev/sda1
34+
sync
3435
poweroff -f

test/TEST-17-LVM-THIN/test.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ test_setup() {
5353
(
5454
export initdir=$TESTDIR/overlay
5555
. $basedir/dracut-init.sh
56-
inst_multiple sfdisk mke2fs poweroff cp umount grep dmsetup dd
56+
inst_multiple sfdisk mke2fs poweroff cp umount grep dmsetup dd sync
5757
inst_hook initqueue 01 ./create-root.sh
5858
inst_hook initqueue/finished 01 ./finished-false.sh
5959
inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
@@ -63,7 +63,7 @@ test_setup() {
6363
# We do it this way so that we do not risk trashing the host mdraid
6464
# devices, volume groups, encrypted partitions, etc.
6565
$basedir/dracut.sh -l -i $TESTDIR/overlay / \
66-
-m "dash lvm mdraid udev-rules base rootfs-block fs-lib kernel-modules qemu" \
66+
-m "bash lvm mdraid udev-rules base rootfs-block fs-lib kernel-modules qemu" \
6767
-d "piix ide-gd_mod ata_piix ext2 sd_mod" \
6868
--no-hostonly-cmdline -N \
6969
-f $TESTDIR/initramfs.makeroot $KVERSION || return 1

test/TEST-20-NFS/test.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ test_setup() {
352352
# We do it this way so that we do not risk trashing the host mdraid
353353
# devices, volume groups, encrypted partitions, etc.
354354
$basedir/dracut.sh -l -i $TESTDIR/server/overlay / \
355-
-m "dash udev-rules base rootfs-block fs-lib kernel-modules fs-lib qemu" \
355+
-m "bash udev-rules base rootfs-block fs-lib kernel-modules fs-lib qemu" \
356356
-d "piix ide-gd_mod ata_piix ext3 sd_mod" \
357357
--nomdadmconf \
358358
--no-hostonly-cmdline -N \

test/TEST-30-ISCSI/create-client-root.sh

+1
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,5 @@ cp -a -t /sysroot /source/* && \
2424
umount /sysroot && \
2525
lvm lvchange -a n /dev/dracut/root && \
2626
echo "dracut-root-block-created" | dd oflag=direct,dsync of=/dev/sdb
27+
sync
2728
poweroff -f

test/TEST-30-ISCSI/create-server-root.sh

-1
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,3 @@ umount /root
2323
echo "dracut-root-block-created" | dd oflag=direct,dsync of=/dev/sda1
2424
sync
2525
poweroff -f
26-

test/TEST-35-ISCSI-MULTI/create-client-root.sh

+1
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,5 @@ cp -a -t /sysroot /source/* && \
2424
umount /sysroot && \
2525
lvm lvchange -a n /dev/dracut/root && \
2626
echo "dracut-root-block-created" | dd oflag=direct,dsync of=/dev/sdb
27+
sync
2728
poweroff -f

test/TEST-40-NBD/create-encrypted-root.sh

+1
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,5 @@ udevadm settle
2828
sleep 1
2929
eval $(udevadm info --query=env --name=/dev/sda|while read line || [ -n "$line" ]; do [ "$line" != "${line#*ID_FS_UUID*}" ] && echo $line; done;)
3030
{ echo "dracut-root-block-created"; echo "ID_FS_UUID=$ID_FS_UUID"; } | dd oflag=direct,dsync of=/dev/sdb
31+
sync
3132
poweroff -f

test/TEST-50-MULTINIC/create-root.sh

-1
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,3 @@ umount /root
2323
echo "dracut-root-block-created" | dd oflag=direct,dsync of=/dev/sda1
2424
sync
2525
poweroff -f
26-

test/TEST-50-MULTINIC/test.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ test_setup() {
299299
# We do it this way so that we do not risk trashing the host mdraid
300300
# devices, volume groups, encrypted partitions, etc.
301301
$basedir/dracut.sh -l -i $TESTDIR/overlay / \
302-
-m "dash udev-rules base rootfs-block fs-lib kernel-modules fs-lib qemu" \
302+
-m "bash udev-rules base rootfs-block fs-lib kernel-modules fs-lib qemu" \
303303
-d "piix ide-gd_mod ata_piix ext3 sd_mod" \
304304
--nomdadmconf \
305305
--no-hostonly-cmdline -N \

test/TEST-60-BONDBRIDGEVLANIFCFG/create-root.sh

-1
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,3 @@ umount /root
2323
echo "dracut-root-block-created" | dd oflag=direct,dsync of=/dev/sda1
2424
sync
2525
poweroff -f
26-

test/TEST-60-BONDBRIDGEVLANIFCFG/test.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ test_setup() {
318318
# We do it this way so that we do not risk trashing the host mdraid
319319
# devices, volume groups, encrypted partitions, etc.
320320
$basedir/dracut.sh -l -i $TESTDIR/overlay / \
321-
-m "dash udev-rules base rootfs-block fs-lib kernel-modules fs-lib qemu" \
321+
-m "bash udev-rules base rootfs-block fs-lib kernel-modules fs-lib qemu" \
322322
-d "piix ide-gd_mod ata_piix ext3 sd_mod" \
323323
--nomdadmconf \
324324
--no-hostonly-cmdline -N \

0 commit comments

Comments
 (0)