[master 2/2] Use labels for the rest of the non-autopart test results.

dashea installerbot-noreply at redhat.com
Thu Aug 6 20:09:28 UTC 2015


From: David Shea <dshea at redhat.com>

---
 tests/kickstart_tests/btrfs-1.sh | 2 +-
 tests/kickstart_tests/btrfs-2.sh | 2 +-
 tests/kickstart_tests/raid-1.ks  | 2 +-
 tests/kickstart_tests/raid-1.sh  | 4 +---
 4 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/tests/kickstart_tests/btrfs-1.sh b/tests/kickstart_tests/btrfs-1.sh
index 16c00a8..24c113d 100755
--- a/tests/kickstart_tests/btrfs-1.sh
+++ b/tests/kickstart_tests/btrfs-1.sh
@@ -26,7 +26,7 @@ validate() {
     # There should be a /root/root/RESULT file with results in it.  Check
     # its contents and decide whether the test finally succeeded or
     # not.
-    result=$(virt-cat ${args} -m /dev/sda2 /root/root/RESULT)
+    result=$(virt-cat ${args} -m /dev/disk/by-label/fedora-btrfs /root/root/RESULT)
     if [[ $? != 0 ]]; then
         status=1
         echo '*** /root/RESULT does not exist in VM image.'
diff --git a/tests/kickstart_tests/btrfs-2.sh b/tests/kickstart_tests/btrfs-2.sh
index 16c00a8..24c113d 100755
--- a/tests/kickstart_tests/btrfs-2.sh
+++ b/tests/kickstart_tests/btrfs-2.sh
@@ -26,7 +26,7 @@ validate() {
     # There should be a /root/root/RESULT file with results in it.  Check
     # its contents and decide whether the test finally succeeded or
     # not.
-    result=$(virt-cat ${args} -m /dev/sda2 /root/root/RESULT)
+    result=$(virt-cat ${args} -m /dev/disk/by-label/fedora-btrfs /root/root/RESULT)
     if [[ $? != 0 ]]; then
         status=1
         echo '*** /root/RESULT does not exist in VM image.'
diff --git a/tests/kickstart_tests/raid-1.ks b/tests/kickstart_tests/raid-1.ks
index 4be04ac..878f869 100644
--- a/tests/kickstart_tests/raid-1.ks
+++ b/tests/kickstart_tests/raid-1.ks
@@ -16,7 +16,7 @@ part raid.22 --size=1024 --ondisk=sdb
 # Yes, using 0,1,2 is wrong, but /proc/mounts uses /dev/mdX not /dev/md/X
 raid /boot --level=1 --device=0 --fstype=ext4 raid.01 raid.02
 raid swap  --level=1 --device=1 --fstype=swap raid.21 raid.22
-raid /     --level=1 --device=2 --fstype=ext4 raid.11 raid.12
+raid /     --level=1 --device=2 --fstype=ext4 --label=rootfs raid.11 raid.12
 
 keyboard us
 lang en_US.UTF-8
diff --git a/tests/kickstart_tests/raid-1.sh b/tests/kickstart_tests/raid-1.sh
index fc7fc9b..ae9e73e 100755
--- a/tests/kickstart_tests/raid-1.sh
+++ b/tests/kickstart_tests/raid-1.sh
@@ -31,12 +31,10 @@ validate() {
     disksdir=$1
     args=$(for d in ${disksdir}/disk-*img; do echo -a ${d}; done)
 
-    # virt-cat doesn't setup /dev/md/* links so cross our fingers that
-    # / always ends up on /dev/md126
     # There should be a /root/RESULT file with results in it.  Check
     # its contents and decide whether the test finally succeeded or
     # not.
-    result=$(virt-cat ${args} -m /dev/md126 /root/RESULT)
+    result=$(virt-cat ${args} -m /dev/disk/by-label/rootfs /root/RESULT)
     if [[ $? != 0 ]]; then
         status=1
         echo '*** /root/RESULT does not exist in VM image.'


-- 
To view this commit on github, visit https://github.com/rhinstaller/anaconda/commit/e5ad51ad8743f820cac533eb0116ad212f18f1d3


More information about the anaconda-patches mailing list