|
|
a56a5e |
From 932169bc349be88cd31bb3bd0e19c02a532b8241 Mon Sep 17 00:00:00 2001
|
|
|
a56a5e |
From: Harald Hoyer <harald@redhat.com>
|
|
|
a56a5e |
Date: Mon, 30 Jun 2014 11:29:37 +0200
|
|
|
a56a5e |
Subject: [PATCH] test: add udev settle after sfdisk
|
|
|
a56a5e |
|
|
|
a56a5e |
(cherry picked from commit e54d961160f12e30917c1a6360f7ba32ecb0f83d)
|
|
|
a56a5e |
---
|
|
|
a56a5e |
test/TEST-01-BASIC/create-root.sh | 1 +
|
|
|
a56a5e |
test/TEST-02-SYSTEMD/create-root.sh | 1 +
|
|
|
a56a5e |
test/TEST-03-USR-MOUNT/create-root.sh | 1 +
|
|
|
a56a5e |
test/TEST-04-FULL-SYSTEMD/create-root.sh | 1 +
|
|
|
a56a5e |
test/TEST-10-RAID/create-root.sh | 1 +
|
|
|
a56a5e |
test/TEST-11-LVM/create-root.sh | 1 +
|
|
|
a56a5e |
test/TEST-12-RAID-DEG/create-root.sh | 1 +
|
|
|
a56a5e |
test/TEST-13-ENC-RAID-LVM/create-root.sh | 1 +
|
|
|
a56a5e |
test/TEST-15-BTRFSRAID/create-root.sh | 9 +++++----
|
|
|
a56a5e |
test/TEST-17-LVM-THIN/create-root.sh | 1 +
|
|
|
a56a5e |
10 files changed, 14 insertions(+), 4 deletions(-)
|
|
|
a56a5e |
|
|
|
a56a5e |
diff --git a/test/TEST-01-BASIC/create-root.sh b/test/TEST-01-BASIC/create-root.sh
|
|
|
a56a5e |
index 96e3c33..3a62afd 100755
|
|
|
a56a5e |
--- a/test/TEST-01-BASIC/create-root.sh
|
|
|
a56a5e |
+++ b/test/TEST-01-BASIC/create-root.sh
|
|
|
a56a5e |
@@ -12,6 +12,7 @@ sfdisk -C 2560 -H 2 -S 32 -L /dev/sda <
|
|
|
a56a5e |
,
|
|
|
a56a5e |
EOF
|
|
|
a56a5e |
|
|
|
a56a5e |
+udevadm settle
|
|
|
a56a5e |
mkfs.ext3 -L dracut /dev/sda2
|
|
|
a56a5e |
mkdir -p /root
|
|
|
a56a5e |
mount /dev/sda2 /root
|
|
|
a56a5e |
diff --git a/test/TEST-02-SYSTEMD/create-root.sh b/test/TEST-02-SYSTEMD/create-root.sh
|
|
|
a56a5e |
index 682e472..b102106 100755
|
|
|
a56a5e |
--- a/test/TEST-02-SYSTEMD/create-root.sh
|
|
|
a56a5e |
+++ b/test/TEST-02-SYSTEMD/create-root.sh
|
|
|
a56a5e |
@@ -12,6 +12,7 @@ sfdisk -C 2560 -H 2 -S 32 -L /dev/sda <
|
|
|
a56a5e |
,
|
|
|
a56a5e |
EOF
|
|
|
a56a5e |
|
|
|
a56a5e |
+udevadm settle
|
|
|
a56a5e |
mkfs.ext3 -L dracut /dev/sda2
|
|
|
a56a5e |
mkdir -p /root
|
|
|
a56a5e |
mount /dev/sda2 /root
|
|
|
a56a5e |
diff --git a/test/TEST-03-USR-MOUNT/create-root.sh b/test/TEST-03-USR-MOUNT/create-root.sh
|
|
|
a56a5e |
index 961392f..f3cecaf 100755
|
|
|
a56a5e |
--- a/test/TEST-03-USR-MOUNT/create-root.sh
|
|
|
a56a5e |
+++ b/test/TEST-03-USR-MOUNT/create-root.sh
|
|
|
a56a5e |
@@ -17,6 +17,7 @@ sfdisk -C 5120 -H 2 -S 32 -L /dev/sdb <
|
|
|
a56a5e |
,
|
|
|
a56a5e |
EOF
|
|
|
a56a5e |
|
|
|
a56a5e |
+udevadm settle
|
|
|
a56a5e |
modprobe btrfs
|
|
|
a56a5e |
mkfs.btrfs -L dracut /dev/sda2
|
|
|
a56a5e |
mkfs.btrfs -L dracutusr /dev/sdb2
|
|
|
a56a5e |
diff --git a/test/TEST-04-FULL-SYSTEMD/create-root.sh b/test/TEST-04-FULL-SYSTEMD/create-root.sh
|
|
|
a56a5e |
index fb462ab..86ad449 100755
|
|
|
a56a5e |
--- a/test/TEST-04-FULL-SYSTEMD/create-root.sh
|
|
|
a56a5e |
+++ b/test/TEST-04-FULL-SYSTEMD/create-root.sh
|
|
|
a56a5e |
@@ -17,6 +17,7 @@ sfdisk -C 10240 -H 2 -S 32 -L /dev/sdb <
|
|
|
a56a5e |
,
|
|
|
a56a5e |
EOF
|
|
|
a56a5e |
|
|
|
a56a5e |
+udevadm settle
|
|
|
a56a5e |
|
|
|
a56a5e |
mkfs.btrfs -L dracut /dev/sda2
|
|
|
a56a5e |
mkfs.btrfs -L dracutusr /dev/sdb2
|
|
|
a56a5e |
diff --git a/test/TEST-10-RAID/create-root.sh b/test/TEST-10-RAID/create-root.sh
|
|
|
a56a5e |
index 68face8..5055413 100755
|
|
|
a56a5e |
--- a/test/TEST-10-RAID/create-root.sh
|
|
|
a56a5e |
+++ b/test/TEST-10-RAID/create-root.sh
|
|
|
a56a5e |
@@ -12,6 +12,7 @@ sfdisk -C 2560 -H 2 -S 32 -L /dev/sda <
|
|
|
a56a5e |
,800
|
|
|
a56a5e |
,800
|
|
|
a56a5e |
EOF
|
|
|
a56a5e |
+udevadm settle
|
|
|
a56a5e |
mdadm --create /dev/md0 --run --auto=yes --level=5 --raid-devices=3 /dev/sda2 /dev/sda3 /dev/sda4
|
|
|
a56a5e |
# wait for the array to finish initailizing, otherwise this sometimes fails
|
|
|
a56a5e |
# randomly.
|
|
|
a56a5e |
diff --git a/test/TEST-11-LVM/create-root.sh b/test/TEST-11-LVM/create-root.sh
|
|
|
a56a5e |
index 0ab0496..a97fa58 100755
|
|
|
a56a5e |
--- a/test/TEST-11-LVM/create-root.sh
|
|
|
a56a5e |
+++ b/test/TEST-11-LVM/create-root.sh
|
|
|
a56a5e |
@@ -12,6 +12,7 @@ sfdisk -C 1280 -H 2 -S 32 -L /dev/sda <
|
|
|
a56a5e |
,400
|
|
|
a56a5e |
,400
|
|
|
a56a5e |
EOF
|
|
|
a56a5e |
+udevadm settle
|
|
|
a56a5e |
for i in sda2 sda3 sda4; do
|
|
|
a56a5e |
lvm pvcreate -ff -y /dev/$i ;
|
|
|
a56a5e |
done && \
|
|
|
a56a5e |
diff --git a/test/TEST-12-RAID-DEG/create-root.sh b/test/TEST-12-RAID-DEG/create-root.sh
|
|
|
a56a5e |
index 7561be1..699c27c 100755
|
|
|
a56a5e |
--- a/test/TEST-12-RAID-DEG/create-root.sh
|
|
|
a56a5e |
+++ b/test/TEST-12-RAID-DEG/create-root.sh
|
|
|
a56a5e |
@@ -15,6 +15,7 @@ sfdisk -C 1280 -H 2 -S 32 -L /dev/sda <
|
|
|
a56a5e |
,400
|
|
|
a56a5e |
,400
|
|
|
a56a5e |
EOF
|
|
|
a56a5e |
+udevadm settle
|
|
|
a56a5e |
mdadm --create /dev/md0 --run --auto=yes --level=5 --raid-devices=3 /dev/sdb /dev/sdc /dev/sdd
|
|
|
a56a5e |
# wait for the array to finish initailizing, otherwise this sometimes fails
|
|
|
a56a5e |
# randomly.
|
|
|
a56a5e |
diff --git a/test/TEST-13-ENC-RAID-LVM/create-root.sh b/test/TEST-13-ENC-RAID-LVM/create-root.sh
|
|
|
a56a5e |
index 4260e86..af83c23 100755
|
|
|
a56a5e |
--- a/test/TEST-13-ENC-RAID-LVM/create-root.sh
|
|
|
a56a5e |
+++ b/test/TEST-13-ENC-RAID-LVM/create-root.sh
|
|
|
a56a5e |
@@ -13,6 +13,7 @@ sfdisk -C 2560 -H 2 -S 32 -L /dev/sda <
|
|
|
a56a5e |
,800
|
|
|
a56a5e |
,800
|
|
|
a56a5e |
EOF
|
|
|
a56a5e |
+udevadm settle
|
|
|
a56a5e |
echo -n test >keyfile
|
|
|
a56a5e |
cryptsetup -q luksFormat /dev/sda2 /keyfile
|
|
|
a56a5e |
cryptsetup -q luksFormat /dev/sda3 /keyfile
|
|
|
a56a5e |
diff --git a/test/TEST-15-BTRFSRAID/create-root.sh b/test/TEST-15-BTRFSRAID/create-root.sh
|
|
|
a56a5e |
index 69f9280..b92f9c0 100755
|
|
|
a56a5e |
--- a/test/TEST-15-BTRFSRAID/create-root.sh
|
|
|
a56a5e |
+++ b/test/TEST-15-BTRFSRAID/create-root.sh
|
|
|
a56a5e |
@@ -15,14 +15,15 @@ sfdisk -C 327800 -H 2 -S 32 -L /dev/sda <
|
|
|
a56a5e |
,5120
|
|
|
a56a5e |
,5120
|
|
|
a56a5e |
EOF
|
|
|
a56a5e |
+udevadm settle
|
|
|
a56a5e |
mkfs.btrfs -draid10 -mraid10 -L root /dev/sda5 /dev/sda6 /dev/sda7 /dev/sda8
|
|
|
a56a5e |
udevadm settle
|
|
|
a56a5e |
btrfs device scan
|
|
|
a56a5e |
udevadm settle
|
|
|
a56a5e |
set -e
|
|
|
a56a5e |
-mkdir -p /sysroot
|
|
|
a56a5e |
-mount -t btrfs /dev/sda8 /sysroot
|
|
|
a56a5e |
-cp -a -t /sysroot /source/*
|
|
|
a56a5e |
-umount /sysroot
|
|
|
a56a5e |
+mkdir -p /sysroot
|
|
|
a56a5e |
+mount -t btrfs /dev/sda8 /sysroot
|
|
|
a56a5e |
+cp -a -t /sysroot /source/*
|
|
|
a56a5e |
+umount /sysroot
|
|
|
a56a5e |
echo "dracut-root-block-created" >/dev/sda1
|
|
|
a56a5e |
poweroff -f
|
|
|
a56a5e |
diff --git a/test/TEST-17-LVM-THIN/create-root.sh b/test/TEST-17-LVM-THIN/create-root.sh
|
|
|
a56a5e |
index 740704f..416c3c3 100755
|
|
|
a56a5e |
--- a/test/TEST-17-LVM-THIN/create-root.sh
|
|
|
a56a5e |
+++ b/test/TEST-17-LVM-THIN/create-root.sh
|
|
|
a56a5e |
@@ -12,6 +12,7 @@ sfdisk -C 2560 -H 2 -S 32 -L /dev/sda <
|
|
|
a56a5e |
,800
|
|
|
a56a5e |
,800
|
|
|
a56a5e |
EOF
|
|
|
a56a5e |
+udevadm settle
|
|
|
a56a5e |
for i in sda2 sda3 sda4; do
|
|
|
a56a5e |
lvm pvcreate -ff -y /dev/$i ;
|
|
|
a56a5e |
done && \
|