Blame SOURCES/0192-test-add-udev-settle-after-sfdisk.patch

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