[PATCH 1/3] Switch to using autopart in the kickstart tests.

Chris Lumens clumens at redhat.com
Fri May 29 17:58:02 UTC 2015


We're no longer using LMC directly, so we don't need to tell it how big of
a disk to make.  We'll have to specify that in the .sh files instead,
though.
---
 tests/kickstart_tests/basic-ftp.ks             | 4 +---
 tests/kickstart_tests/basic-ftp.sh             | 2 +-
 tests/kickstart_tests/basic-ostree.ks          | 4 +---
 tests/kickstart_tests/basic-ostree.sh          | 2 +-
 tests/kickstart_tests/bond.ks                  | 4 +---
 tests/kickstart_tests/bond.sh                  | 2 +-
 tests/kickstart_tests/escrow-cert.ks           | 4 +---
 tests/kickstart_tests/escrow-cert.sh           | 2 +-
 tests/kickstart_tests/groups-and-envs-1.ks     | 4 +---
 tests/kickstart_tests/groups-and-envs-1.sh     | 2 +-
 tests/kickstart_tests/groups-and-envs-2.ks     | 4 +---
 tests/kickstart_tests/groups-and-envs-2.sh     | 2 +-
 tests/kickstart_tests/groups-and-envs-3.ks     | 4 +---
 tests/kickstart_tests/groups-and-envs-3.sh     | 2 +-
 tests/kickstart_tests/hostname.ks              | 4 +---
 tests/kickstart_tests/hostname.sh              | 2 +-
 tests/kickstart_tests/nfs-repo-and-addon.ks    | 4 +---
 tests/kickstart_tests/nfs-repo-and-addon.sh    | 2 +-
 tests/kickstart_tests/packages-and-groups-1.ks | 4 +---
 tests/kickstart_tests/packages-and-groups-1.sh | 2 +-
 tests/kickstart_tests/packages-default.ks      | 4 +---
 tests/kickstart_tests/packages-default.sh      | 2 +-
 tests/kickstart_tests/packages-excludedocs.ks  | 4 +---
 tests/kickstart_tests/packages-excludedocs.sh  | 2 +-
 tests/kickstart_tests/packages-multilib.ks     | 4 +---
 tests/kickstart_tests/packages-multilib.sh     | 2 +-
 tests/kickstart_tests/proxy-cmdline.ks         | 4 +---
 tests/kickstart_tests/proxy-cmdline.sh         | 2 +-
 tests/kickstart_tests/proxy-kickstart.ks       | 4 +---
 tests/kickstart_tests/proxy-kickstart.sh       | 2 +-
 tests/kickstart_tests/vlan.ks                  | 4 +---
 tests/kickstart_tests/vlan.sh                  | 2 +-
 32 files changed, 32 insertions(+), 64 deletions(-)

diff --git a/tests/kickstart_tests/basic-ftp.ks b/tests/kickstart_tests/basic-ftp.ks
index 9d1ebc7..025226f 100644
--- a/tests/kickstart_tests/basic-ftp.ks
+++ b/tests/kickstart_tests/basic-ftp.ks
@@ -5,9 +5,7 @@ network --bootproto=dhcp
 bootloader --timeout=1
 zerombr
 clearpart --all
-part --fstype=ext4 --size=4400 /
-part --fstype=ext4 --size=500 /boot
-part --fstype=swap --size=500 swap
+autopart
 
 keyboard us
 lang en
diff --git a/tests/kickstart_tests/basic-ftp.sh b/tests/kickstart_tests/basic-ftp.sh
index 503198b..8c4344e 100755
--- a/tests/kickstart_tests/basic-ftp.sh
+++ b/tests/kickstart_tests/basic-ftp.sh
@@ -35,7 +35,7 @@ validate() {
     # 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 -a ${img} -m /dev/sda2 /root/RESULT)
+    result=$(virt-cat -a ${img} -m /dev/fedora/root /root/RESULT)
     if [[ $? != 0 ]]; then
         status=1
         echo '*** /root/RESULT does not exist in VM image.'
diff --git a/tests/kickstart_tests/basic-ostree.ks b/tests/kickstart_tests/basic-ostree.ks
index b2dc374..63b6dae 100644
--- a/tests/kickstart_tests/basic-ostree.ks
+++ b/tests/kickstart_tests/basic-ostree.ks
@@ -6,9 +6,7 @@ network --bootproto=dhcp
 bootloader --timeout=1
 zerombr
 clearpart --all
-part --fstype=ext4 --size=4400 /
-part --fstype=ext4 --size=500 /boot
-part --fstype=swap --size=500 swap
+autopart
 
 keyboard us
 lang en
diff --git a/tests/kickstart_tests/basic-ostree.sh b/tests/kickstart_tests/basic-ostree.sh
index 22c5cc1..e1ce4ba 100755
--- a/tests/kickstart_tests/basic-ostree.sh
+++ b/tests/kickstart_tests/basic-ostree.sh
@@ -49,7 +49,7 @@ validate() {
     # 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 -a ${img} -m /dev/sda2 /ostree/deploy/fedora-atomic/var/roothome/RESULT)
+    result=$(virt-cat -a ${img} -m /dev/fedora/root /ostree/deploy/fedora-atomic/var/roothome/RESULT)
     if [[ $? != 0 ]]; then
         status=1
         echo '*** /root/RESULT does not exist in VM image.'
diff --git a/tests/kickstart_tests/bond.ks b/tests/kickstart_tests/bond.ks
index e46676f..c93c240 100644
--- a/tests/kickstart_tests/bond.ks
+++ b/tests/kickstart_tests/bond.ks
@@ -8,9 +8,7 @@ network --device=bond0 --bootproto=static --bondslaves=link --ip=192.168.1.1 --n
 bootloader --timeout=1
 zerombr
 clearpart --all
-part --fstype=ext4 --size=4400 /
-part --fstype=ext4 --size=500 /boot
-part --fstype=swap --size=500 swap
+autopart
 
 keyboard us
 lang en
diff --git a/tests/kickstart_tests/bond.sh b/tests/kickstart_tests/bond.sh
index 549d07a..02d06c1 100755
--- a/tests/kickstart_tests/bond.sh
+++ b/tests/kickstart_tests/bond.sh
@@ -34,7 +34,7 @@ validate() {
     # 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 -a ${img} -m /dev/sda2 /root/RESULT)
+    result=$(virt-cat -a ${img} -m /dev/fedora/root /root/RESULT)
     if [[ $? != 0 ]]; then
         status=1
         echo '*** /root/RESULT does not exist in VM image.'
diff --git a/tests/kickstart_tests/escrow-cert.ks b/tests/kickstart_tests/escrow-cert.ks
index e1b31b9..4baa5b8 100644
--- a/tests/kickstart_tests/escrow-cert.ks
+++ b/tests/kickstart_tests/escrow-cert.ks
@@ -5,9 +5,7 @@ network --bootproto=dhcp
 bootloader --timeout=1
 zerombr
 clearpart --all
-part --fstype=ext4 --size=4400 /
-part --fstype=ext4 --size=500 /boot
-part --fstype=swap --size=500 swap
+autopart
 
 # Create a partition that's easy to umount and poke at in %post
 # The escrow certificate is created in %pre, below
diff --git a/tests/kickstart_tests/escrow-cert.sh b/tests/kickstart_tests/escrow-cert.sh
index 503198b..8c4344e 100755
--- a/tests/kickstart_tests/escrow-cert.sh
+++ b/tests/kickstart_tests/escrow-cert.sh
@@ -35,7 +35,7 @@ validate() {
     # 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 -a ${img} -m /dev/sda2 /root/RESULT)
+    result=$(virt-cat -a ${img} -m /dev/fedora/root /root/RESULT)
     if [[ $? != 0 ]]; then
         status=1
         echo '*** /root/RESULT does not exist in VM image.'
diff --git a/tests/kickstart_tests/groups-and-envs-1.ks b/tests/kickstart_tests/groups-and-envs-1.ks
index 3ff575d..4218129 100644
--- a/tests/kickstart_tests/groups-and-envs-1.ks
+++ b/tests/kickstart_tests/groups-and-envs-1.ks
@@ -5,9 +5,7 @@ network --bootproto=dhcp
 bootloader --timeout=1
 zerombr
 clearpart --all
-part --fstype=ext4 --size=4400 /
-part --fstype=ext4 --size=500 /boot
-part --fstype=swap --size=500 swap
+autopart
 
 keyboard us
 lang en
diff --git a/tests/kickstart_tests/groups-and-envs-1.sh b/tests/kickstart_tests/groups-and-envs-1.sh
index e3ed01a..d343712 100755
--- a/tests/kickstart_tests/groups-and-envs-1.sh
+++ b/tests/kickstart_tests/groups-and-envs-1.sh
@@ -34,7 +34,7 @@ validate() {
     # 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 -a ${img} -m /dev/sda2 /root/RESULT)
+    result=$(virt-cat -a ${img} -m /dev/fedora/root sda2 /root/RESULT)
     if [[ $? != 0 ]]; then
         status=1
         echo '*** /root/RESULT does not exist in VM image.'
diff --git a/tests/kickstart_tests/groups-and-envs-2.ks b/tests/kickstart_tests/groups-and-envs-2.ks
index fc87cc6..c745f51 100644
--- a/tests/kickstart_tests/groups-and-envs-2.ks
+++ b/tests/kickstart_tests/groups-and-envs-2.ks
@@ -5,9 +5,7 @@ network --bootproto=dhcp
 bootloader --timeout=1
 zerombr
 clearpart --all
-part --fstype=ext4 --size=4400 /
-part --fstype=ext4 --size=500 /boot
-part --fstype=swap --size=500 swap
+autopart
 
 keyboard us
 lang en
diff --git a/tests/kickstart_tests/groups-and-envs-2.sh b/tests/kickstart_tests/groups-and-envs-2.sh
index 549d07a..02d06c1 100755
--- a/tests/kickstart_tests/groups-and-envs-2.sh
+++ b/tests/kickstart_tests/groups-and-envs-2.sh
@@ -34,7 +34,7 @@ validate() {
     # 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 -a ${img} -m /dev/sda2 /root/RESULT)
+    result=$(virt-cat -a ${img} -m /dev/fedora/root /root/RESULT)
     if [[ $? != 0 ]]; then
         status=1
         echo '*** /root/RESULT does not exist in VM image.'
diff --git a/tests/kickstart_tests/groups-and-envs-3.ks b/tests/kickstart_tests/groups-and-envs-3.ks
index 8f4e60e..68fad9c 100644
--- a/tests/kickstart_tests/groups-and-envs-3.ks
+++ b/tests/kickstart_tests/groups-and-envs-3.ks
@@ -6,9 +6,7 @@ network --bootproto=dhcp
 bootloader --timeout=1
 zerombr
 clearpart --all --initlabel
-part --fstype=ext4 --size=4400 /
-part --fstype=ext4 --size=500 /boot
-part --fstype=swap --size=500 swap
+autopart
 
 keyboard us
 lang en_US.UTF-8
diff --git a/tests/kickstart_tests/groups-and-envs-3.sh b/tests/kickstart_tests/groups-and-envs-3.sh
index 549d07a..02d06c1 100755
--- a/tests/kickstart_tests/groups-and-envs-3.sh
+++ b/tests/kickstart_tests/groups-and-envs-3.sh
@@ -34,7 +34,7 @@ validate() {
     # 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 -a ${img} -m /dev/sda2 /root/RESULT)
+    result=$(virt-cat -a ${img} -m /dev/fedora/root /root/RESULT)
     if [[ $? != 0 ]]; then
         status=1
         echo '*** /root/RESULT does not exist in VM image.'
diff --git a/tests/kickstart_tests/hostname.ks b/tests/kickstart_tests/hostname.ks
index 901a56e..daed077 100644
--- a/tests/kickstart_tests/hostname.ks
+++ b/tests/kickstart_tests/hostname.ks
@@ -7,9 +7,7 @@ network --hostname=testhostname.example.com
 bootloader --timeout=1
 zerombr
 clearpart --all
-part --fstype=ext4 --size=4400 /
-part --fstype=ext4 --size=500 /boot
-part --fstype=swap --size=500 swap
+autopart
 
 keyboard us
 lang en
diff --git a/tests/kickstart_tests/hostname.sh b/tests/kickstart_tests/hostname.sh
index 549d07a..02d06c1 100755
--- a/tests/kickstart_tests/hostname.sh
+++ b/tests/kickstart_tests/hostname.sh
@@ -34,7 +34,7 @@ validate() {
     # 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 -a ${img} -m /dev/sda2 /root/RESULT)
+    result=$(virt-cat -a ${img} -m /dev/fedora/root /root/RESULT)
     if [[ $? != 0 ]]; then
         status=1
         echo '*** /root/RESULT does not exist in VM image.'
diff --git a/tests/kickstart_tests/nfs-repo-and-addon.ks b/tests/kickstart_tests/nfs-repo-and-addon.ks
index 17840bd..9d57b85 100644
--- a/tests/kickstart_tests/nfs-repo-and-addon.ks
+++ b/tests/kickstart_tests/nfs-repo-and-addon.ks
@@ -21,9 +21,7 @@ network --bootproto=dhcp
 bootloader --timeout=1
 zerombr
 clearpart --all
-part --fstype=ext4 --size=4400 /
-part --fstype=ext4 --size=500 /boot
-part --fstype=swap --size=500 swap
+autopart
 
 keyboard us
 lang en
diff --git a/tests/kickstart_tests/nfs-repo-and-addon.sh b/tests/kickstart_tests/nfs-repo-and-addon.sh
index a6e35a8..2804d87 100755
--- a/tests/kickstart_tests/nfs-repo-and-addon.sh
+++ b/tests/kickstart_tests/nfs-repo-and-addon.sh
@@ -56,7 +56,7 @@ validate() {
     img=$1
 
     # Check the /root/RESULT file for whether the test succeeded or not
-    result=$(virt-cat -a ${img} -m /dev/sda2 /root/RESULT)
+    result=$(virt-cat -a ${img} -m /dev/fedora/root /root/RESULT)
     if [[ $? != 0 ]]; then
         status=1
         echo '*** /root/RESULT does not exist in VM image.'
diff --git a/tests/kickstart_tests/packages-and-groups-1.ks b/tests/kickstart_tests/packages-and-groups-1.ks
index 3e56042..f406c09 100644
--- a/tests/kickstart_tests/packages-and-groups-1.ks
+++ b/tests/kickstart_tests/packages-and-groups-1.ks
@@ -5,9 +5,7 @@ network --bootproto=dhcp
 bootloader --timeout=1
 zerombr
 clearpart --all
-part --fstype=ext4 --size=6500 /
-part --fstype=ext4 --size=500 /boot
-part --fstype=swap --size=500 swap
+autopart
 
 keyboard us
 lang en
diff --git a/tests/kickstart_tests/packages-and-groups-1.sh b/tests/kickstart_tests/packages-and-groups-1.sh
index 549d07a..02d06c1 100755
--- a/tests/kickstart_tests/packages-and-groups-1.sh
+++ b/tests/kickstart_tests/packages-and-groups-1.sh
@@ -34,7 +34,7 @@ validate() {
     # 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 -a ${img} -m /dev/sda2 /root/RESULT)
+    result=$(virt-cat -a ${img} -m /dev/fedora/root /root/RESULT)
     if [[ $? != 0 ]]; then
         status=1
         echo '*** /root/RESULT does not exist in VM image.'
diff --git a/tests/kickstart_tests/packages-default.ks b/tests/kickstart_tests/packages-default.ks
index b45fc61..cf29fa3 100644
--- a/tests/kickstart_tests/packages-default.ks
+++ b/tests/kickstart_tests/packages-default.ks
@@ -6,9 +6,7 @@ network --bootproto=dhcp
 bootloader --timeout=1
 zerombr
 clearpart --all --initlabel
-part --fstype=ext4 --size=4400 /
-part --fstype=ext4 --size=500 /boot
-part --fstype=swap --size=500 swap
+autopart
 
 keyboard us
 lang en_US.UTF-8
diff --git a/tests/kickstart_tests/packages-default.sh b/tests/kickstart_tests/packages-default.sh
index 549d07a..02d06c1 100755
--- a/tests/kickstart_tests/packages-default.sh
+++ b/tests/kickstart_tests/packages-default.sh
@@ -34,7 +34,7 @@ validate() {
     # 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 -a ${img} -m /dev/sda2 /root/RESULT)
+    result=$(virt-cat -a ${img} -m /dev/fedora/root /root/RESULT)
     if [[ $? != 0 ]]; then
         status=1
         echo '*** /root/RESULT does not exist in VM image.'
diff --git a/tests/kickstart_tests/packages-excludedocs.ks b/tests/kickstart_tests/packages-excludedocs.ks
index e741736..4f12ca7 100644
--- a/tests/kickstart_tests/packages-excludedocs.ks
+++ b/tests/kickstart_tests/packages-excludedocs.ks
@@ -6,9 +6,7 @@ network --bootproto=dhcp
 bootloader --timeout=1
 zerombr
 clearpart --all --initlabel
-part --fstype=ext4 --size=4400 /
-part --fstype=ext4 --size=500 /boot
-part --fstype=swap --size=500 swap
+autopart
 
 keyboard us
 lang en_US.UTF-8
diff --git a/tests/kickstart_tests/packages-excludedocs.sh b/tests/kickstart_tests/packages-excludedocs.sh
index 549d07a..02d06c1 100755
--- a/tests/kickstart_tests/packages-excludedocs.sh
+++ b/tests/kickstart_tests/packages-excludedocs.sh
@@ -34,7 +34,7 @@ validate() {
     # 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 -a ${img} -m /dev/sda2 /root/RESULT)
+    result=$(virt-cat -a ${img} -m /dev/fedora/root /root/RESULT)
     if [[ $? != 0 ]]; then
         status=1
         echo '*** /root/RESULT does not exist in VM image.'
diff --git a/tests/kickstart_tests/packages-multilib.ks b/tests/kickstart_tests/packages-multilib.ks
index e0012a2..ab7e7f8 100644
--- a/tests/kickstart_tests/packages-multilib.ks
+++ b/tests/kickstart_tests/packages-multilib.ks
@@ -6,9 +6,7 @@ network --bootproto=dhcp
 bootloader --timeout=1
 zerombr
 clearpart --all --initlabel
-part --fstype=ext4 --size=4400 /
-part --fstype=ext4 --size=500 /boot
-part --fstype=swap --size=500 swap
+autopart
 
 keyboard us
 lang en_US.UTF-8
diff --git a/tests/kickstart_tests/packages-multilib.sh b/tests/kickstart_tests/packages-multilib.sh
index 549d07a..02d06c1 100755
--- a/tests/kickstart_tests/packages-multilib.sh
+++ b/tests/kickstart_tests/packages-multilib.sh
@@ -34,7 +34,7 @@ validate() {
     # 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 -a ${img} -m /dev/sda2 /root/RESULT)
+    result=$(virt-cat -a ${img} -m /dev/fedora/root /root/RESULT)
     if [[ $? != 0 ]]; then
         status=1
         echo '*** /root/RESULT does not exist in VM image.'
diff --git a/tests/kickstart_tests/proxy-cmdline.ks b/tests/kickstart_tests/proxy-cmdline.ks
index c2ed771..e64c03f 100644
--- a/tests/kickstart_tests/proxy-cmdline.ks
+++ b/tests/kickstart_tests/proxy-cmdline.ks
@@ -43,9 +43,7 @@ network --bootproto=dhcp
 bootloader --timeout=1
 zerombr
 clearpart --all
-part --fstype=ext4 --size=4400 /
-part --fstype=ext4 --size=500 /boot
-part --fstype=swap --size=500 swap
+autopart
 
 keyboard us
 lang en
diff --git a/tests/kickstart_tests/proxy-cmdline.sh b/tests/kickstart_tests/proxy-cmdline.sh
index c8bebaf..9c2dc49 100755
--- a/tests/kickstart_tests/proxy-cmdline.sh
+++ b/tests/kickstart_tests/proxy-cmdline.sh
@@ -34,7 +34,7 @@ validate() {
     # 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 -a ${img} -m /dev/sda2 /root/RESULT)
+    result=$(virt-cat -a ${img} -m /dev/fedora/root /root/RESULT)
     if [[ $? != 0 ]]; then
         status=1
         echo '*** /root/RESULT does not exist in VM image.'
diff --git a/tests/kickstart_tests/proxy-kickstart.ks b/tests/kickstart_tests/proxy-kickstart.ks
index e8cc78d..accce49 100644
--- a/tests/kickstart_tests/proxy-kickstart.ks
+++ b/tests/kickstart_tests/proxy-kickstart.ks
@@ -44,9 +44,7 @@ network --bootproto=dhcp
 bootloader --timeout=1
 zerombr
 clearpart --all
-part --fstype=ext4 --size=4400 /
-part --fstype=ext4 --size=500 /boot
-part --fstype=swap --size=500 swap
+autopart
 
 keyboard us
 lang en
diff --git a/tests/kickstart_tests/proxy-kickstart.sh b/tests/kickstart_tests/proxy-kickstart.sh
index eb892e1..92c4437 100755
--- a/tests/kickstart_tests/proxy-kickstart.sh
+++ b/tests/kickstart_tests/proxy-kickstart.sh
@@ -40,7 +40,7 @@ validate() {
     # 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 -a ${img} -m /dev/sda2 /root/RESULT)
+    result=$(virt-cat -a ${img} -m /dev/fedora/root /root/RESULT)
     if [[ $? != 0 ]]; then
         status=1
         echo '*** /root/RESULT does not exist in VM image.'
diff --git a/tests/kickstart_tests/vlan.ks b/tests/kickstart_tests/vlan.ks
index afffb61..c772ce3 100644
--- a/tests/kickstart_tests/vlan.ks
+++ b/tests/kickstart_tests/vlan.ks
@@ -7,9 +7,7 @@ network --device=link --vlanid=150 --bootproto=dhcp
 bootloader --timeout=1
 zerombr
 clearpart --all
-part --fstype=ext4 --size=4400 /
-part --fstype=ext4 --size=500 /boot
-part --fstype=swap --size=500 swap
+autopart
 
 keyboard us
 lang en
diff --git a/tests/kickstart_tests/vlan.sh b/tests/kickstart_tests/vlan.sh
index 549d07a..02d06c1 100755
--- a/tests/kickstart_tests/vlan.sh
+++ b/tests/kickstart_tests/vlan.sh
@@ -34,7 +34,7 @@ validate() {
     # 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 -a ${img} -m /dev/sda2 /root/RESULT)
+    result=$(virt-cat -a ${img} -m /dev/fedora/root /root/RESULT)
     if [[ $? != 0 ]]; then
         status=1
         echo '*** /root/RESULT does not exist in VM image.'
-- 
2.2.2



More information about the anaconda-patches mailing list