[PATCH] Ignore environment modification warnings in docs/conf.py
by David Shea
---
docs/conf.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/docs/conf.py b/docs/conf.py
index f7ac1c9..1b10fc6 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -25,6 +25,7 @@ sys.path.insert(0, os.path.abspath('..'))
for path in ["../pyanaconda/isys/.libs", "../pyanaconda", "../tests", "../tests/lib", "../dracut", "../widgets"]:
sys.path.append(os.path.abspath(path))
if not 'ANACONDA_INSTALL_CLASSES' in os.environ:
+ # pylint: disable=environment-modify
os.environ['ANACONDA_INSTALL_CLASSES'] = os.path.abspath('../pyanaconda/installclasses')
# -- General configuration -----------------------------------------------------
--
2.5.2
8 years, 8 months
[PATCH 1/5] Move kickstart_test .ks files to .ks.in.
by Chris Lumens
---
tests/Makefile.am | 2 +-
tests/kickstart_tests/basic-ftp.ks | 22 ---
tests/kickstart_tests/basic-ftp.ks.in | 22 +++
tests/kickstart_tests/basic-ostree.ks | 20 ---
tests/kickstart_tests/basic-ostree.ks.in | 20 +++
tests/kickstart_tests/bond.ks | 56 -------
tests/kickstart_tests/bond.ks.in | 56 +++++++
tests/kickstart_tests/btrfs-1.ks | 48 ------
tests/kickstart_tests/btrfs-1.ks.in | 48 ++++++
tests/kickstart_tests/btrfs-2.ks | 59 -------
tests/kickstart_tests/btrfs-2.ks.in | 59 +++++++
tests/kickstart_tests/default-fstype.ks | 38 -----
tests/kickstart_tests/default-fstype.ks.in | 38 +++++
tests/kickstart_tests/driverdisk-disk.ks | 41 -----
tests/kickstart_tests/driverdisk-disk.ks.in | 41 +++++
tests/kickstart_tests/encrypt-device.ks | 32 ----
tests/kickstart_tests/encrypt-device.ks.in | 32 ++++
tests/kickstart_tests/escrow-cert.ks | 108 -------------
tests/kickstart_tests/escrow-cert.ks.in | 108 +++++++++++++
tests/kickstart_tests/firewall.ks | 59 -------
tests/kickstart_tests/firewall.ks.in | 59 +++++++
tests/kickstart_tests/groups-and-envs-1.ks | 36 -----
tests/kickstart_tests/groups-and-envs-1.ks.in | 36 +++++
tests/kickstart_tests/groups-and-envs-2.ks | 80 ----------
tests/kickstart_tests/groups-and-envs-2.ks.in | 80 ++++++++++
tests/kickstart_tests/groups-and-envs-3.ks | 34 ----
tests/kickstart_tests/groups-and-envs-3.ks.in | 34 ++++
tests/kickstart_tests/hostname.ks | 38 -----
tests/kickstart_tests/hostname.ks.in | 38 +++++
tests/kickstart_tests/ignoredisk.ks | 51 ------
tests/kickstart_tests/ignoredisk.ks.in | 51 ++++++
tests/kickstart_tests/keyboard-addtnl.ks | 42 -----
tests/kickstart_tests/keyboard-addtnl.ks.in | 42 +++++
tests/kickstart_tests/keyboard.ks | 33 ----
tests/kickstart_tests/keyboard.ks.in | 33 ++++
tests/kickstart_tests/ks-include.ks | 20 ---
tests/kickstart_tests/ks-include.ks.in | 20 +++
tests/kickstart_tests/lang-2.ks | 43 -----
tests/kickstart_tests/lang-2.ks.in | 43 +++++
tests/kickstart_tests/lang.ks | 33 ----
tests/kickstart_tests/lang.ks.in | 33 ++++
tests/kickstart_tests/liveimg.ks | 28 ----
tests/kickstart_tests/liveimg.ks.in | 28 ++++
tests/kickstart_tests/lvm-1.ks | 77 ---------
tests/kickstart_tests/lvm-1.ks.in | 77 +++++++++
tests/kickstart_tests/lvm-2.ks | 44 ------
tests/kickstart_tests/lvm-2.ks.in | 44 ++++++
tests/kickstart_tests/lvm-cache-1.ks | 173 ---------------------
tests/kickstart_tests/lvm-cache-1.ks.in | 173 +++++++++++++++++++++
tests/kickstart_tests/lvm-cache-2.ks | 158 -------------------
tests/kickstart_tests/lvm-cache-2.ks.in | 158 +++++++++++++++++++
tests/kickstart_tests/lvm-raid-1.ks | 81 ----------
tests/kickstart_tests/lvm-raid-1.ks.in | 81 ++++++++++
tests/kickstart_tests/lvm-thinp-1.ks | 106 -------------
tests/kickstart_tests/lvm-thinp-1.ks.in | 106 +++++++++++++
tests/kickstart_tests/lvm-thinp-2.ks | 114 --------------
tests/kickstart_tests/lvm-thinp-2.ks.in | 114 ++++++++++++++
tests/kickstart_tests/nfs-repo-and-addon.ks | 106 -------------
tests/kickstart_tests/nfs-repo-and-addon.ks.in | 106 +++++++++++++
tests/kickstart_tests/ntp-pools.ks | 38 -----
tests/kickstart_tests/ntp-pools.ks.in | 38 +++++
tests/kickstart_tests/packages-and-groups-1.ks | 73 ---------
tests/kickstart_tests/packages-and-groups-1.ks.in | 73 +++++++++
tests/kickstart_tests/packages-default.ks | 27 ----
tests/kickstart_tests/packages-default.ks.in | 27 ++++
tests/kickstart_tests/packages-excludedocs.ks | 48 ------
tests/kickstart_tests/packages-excludedocs.ks.in | 48 ++++++
tests/kickstart_tests/packages-ignoremissing.ks | 24 ---
tests/kickstart_tests/packages-ignoremissing.ks.in | 24 +++
tests/kickstart_tests/packages-multilib.ks | 34 ----
tests/kickstart_tests/packages-multilib.ks.in | 34 ++++
tests/kickstart_tests/pre-install.ks | 64 --------
tests/kickstart_tests/pre-install.ks.in | 64 ++++++++
tests/kickstart_tests/proxy-auth.ks | 87 -----------
tests/kickstart_tests/proxy-auth.ks.in | 87 +++++++++++
tests/kickstart_tests/proxy-cmdline.ks | 41 -----
tests/kickstart_tests/proxy-cmdline.ks.in | 41 +++++
tests/kickstart_tests/proxy-kickstart.ks | 82 ----------
tests/kickstart_tests/proxy-kickstart.ks.in | 82 ++++++++++
tests/kickstart_tests/raid-1.ks | 108 -------------
tests/kickstart_tests/raid-1.ks.in | 108 +++++++++++++
tests/kickstart_tests/reqpart.ks | 41 -----
tests/kickstart_tests/reqpart.ks.in | 41 +++++
tests/kickstart_tests/rootpw.ks | 50 ------
tests/kickstart_tests/rootpw.ks.in | 50 ++++++
tests/kickstart_tests/selinux-disabled.ks | 35 -----
tests/kickstart_tests/selinux-disabled.ks.in | 35 +++++
tests/kickstart_tests/selinux-enforcing.ks | 35 -----
tests/kickstart_tests/selinux-enforcing.ks.in | 35 +++++
tests/kickstart_tests/selinux-permissive.ks | 35 -----
tests/kickstart_tests/selinux-permissive.ks.in | 35 +++++
tests/kickstart_tests/services.ks | 56 -------
tests/kickstart_tests/services.ks.in | 56 +++++++
tests/kickstart_tests/timezoneLOCAL.ks | 39 -----
tests/kickstart_tests/timezoneLOCAL.ks.in | 39 +++++
tests/kickstart_tests/timezoneUTC.ks | 39 -----
tests/kickstart_tests/timezoneUTC.ks.in | 39 +++++
tests/kickstart_tests/tmpfs-fixed_size.ks | 49 ------
tests/kickstart_tests/tmpfs-fixed_size.ks.in | 49 ++++++
tests/kickstart_tests/user.ks | 113 --------------
tests/kickstart_tests/user.ks.in | 113 ++++++++++++++
tests/kickstart_tests/vlan.ks | 57 -------
tests/kickstart_tests/vlan.ks.in | 57 +++++++
103 files changed, 2956 insertions(+), 2956 deletions(-)
delete mode 100644 tests/kickstart_tests/basic-ftp.ks
create mode 100644 tests/kickstart_tests/basic-ftp.ks.in
delete mode 100644 tests/kickstart_tests/basic-ostree.ks
create mode 100644 tests/kickstart_tests/basic-ostree.ks.in
delete mode 100644 tests/kickstart_tests/bond.ks
create mode 100644 tests/kickstart_tests/bond.ks.in
delete mode 100644 tests/kickstart_tests/btrfs-1.ks
create mode 100644 tests/kickstart_tests/btrfs-1.ks.in
delete mode 100644 tests/kickstart_tests/btrfs-2.ks
create mode 100644 tests/kickstart_tests/btrfs-2.ks.in
delete mode 100644 tests/kickstart_tests/default-fstype.ks
create mode 100644 tests/kickstart_tests/default-fstype.ks.in
delete mode 100644 tests/kickstart_tests/driverdisk-disk.ks
create mode 100644 tests/kickstart_tests/driverdisk-disk.ks.in
delete mode 100644 tests/kickstart_tests/encrypt-device.ks
create mode 100644 tests/kickstart_tests/encrypt-device.ks.in
delete mode 100644 tests/kickstart_tests/escrow-cert.ks
create mode 100644 tests/kickstart_tests/escrow-cert.ks.in
delete mode 100644 tests/kickstart_tests/firewall.ks
create mode 100644 tests/kickstart_tests/firewall.ks.in
delete mode 100644 tests/kickstart_tests/groups-and-envs-1.ks
create mode 100644 tests/kickstart_tests/groups-and-envs-1.ks.in
delete mode 100644 tests/kickstart_tests/groups-and-envs-2.ks
create mode 100644 tests/kickstart_tests/groups-and-envs-2.ks.in
delete mode 100644 tests/kickstart_tests/groups-and-envs-3.ks
create mode 100644 tests/kickstart_tests/groups-and-envs-3.ks.in
delete mode 100644 tests/kickstart_tests/hostname.ks
create mode 100644 tests/kickstart_tests/hostname.ks.in
delete mode 100644 tests/kickstart_tests/ignoredisk.ks
create mode 100644 tests/kickstart_tests/ignoredisk.ks.in
delete mode 100644 tests/kickstart_tests/keyboard-addtnl.ks
create mode 100644 tests/kickstart_tests/keyboard-addtnl.ks.in
delete mode 100644 tests/kickstart_tests/keyboard.ks
create mode 100644 tests/kickstart_tests/keyboard.ks.in
delete mode 100644 tests/kickstart_tests/ks-include.ks
create mode 100644 tests/kickstart_tests/ks-include.ks.in
delete mode 100644 tests/kickstart_tests/lang-2.ks
create mode 100644 tests/kickstart_tests/lang-2.ks.in
delete mode 100644 tests/kickstart_tests/lang.ks
create mode 100644 tests/kickstart_tests/lang.ks.in
delete mode 100644 tests/kickstart_tests/liveimg.ks
create mode 100644 tests/kickstart_tests/liveimg.ks.in
delete mode 100644 tests/kickstart_tests/lvm-1.ks
create mode 100644 tests/kickstart_tests/lvm-1.ks.in
delete mode 100644 tests/kickstart_tests/lvm-2.ks
create mode 100644 tests/kickstart_tests/lvm-2.ks.in
delete mode 100644 tests/kickstart_tests/lvm-cache-1.ks
create mode 100644 tests/kickstart_tests/lvm-cache-1.ks.in
delete mode 100644 tests/kickstart_tests/lvm-cache-2.ks
create mode 100644 tests/kickstart_tests/lvm-cache-2.ks.in
delete mode 100644 tests/kickstart_tests/lvm-raid-1.ks
create mode 100644 tests/kickstart_tests/lvm-raid-1.ks.in
delete mode 100644 tests/kickstart_tests/lvm-thinp-1.ks
create mode 100644 tests/kickstart_tests/lvm-thinp-1.ks.in
delete mode 100644 tests/kickstart_tests/lvm-thinp-2.ks
create mode 100644 tests/kickstart_tests/lvm-thinp-2.ks.in
delete mode 100644 tests/kickstart_tests/nfs-repo-and-addon.ks
create mode 100644 tests/kickstart_tests/nfs-repo-and-addon.ks.in
delete mode 100644 tests/kickstart_tests/ntp-pools.ks
create mode 100644 tests/kickstart_tests/ntp-pools.ks.in
delete mode 100644 tests/kickstart_tests/packages-and-groups-1.ks
create mode 100644 tests/kickstart_tests/packages-and-groups-1.ks.in
delete mode 100644 tests/kickstart_tests/packages-default.ks
create mode 100644 tests/kickstart_tests/packages-default.ks.in
delete mode 100644 tests/kickstart_tests/packages-excludedocs.ks
create mode 100644 tests/kickstart_tests/packages-excludedocs.ks.in
delete mode 100644 tests/kickstart_tests/packages-ignoremissing.ks
create mode 100644 tests/kickstart_tests/packages-ignoremissing.ks.in
delete mode 100644 tests/kickstart_tests/packages-multilib.ks
create mode 100644 tests/kickstart_tests/packages-multilib.ks.in
delete mode 100644 tests/kickstart_tests/pre-install.ks
create mode 100644 tests/kickstart_tests/pre-install.ks.in
delete mode 100644 tests/kickstart_tests/proxy-auth.ks
create mode 100644 tests/kickstart_tests/proxy-auth.ks.in
delete mode 100644 tests/kickstart_tests/proxy-cmdline.ks
create mode 100644 tests/kickstart_tests/proxy-cmdline.ks.in
delete mode 100644 tests/kickstart_tests/proxy-kickstart.ks
create mode 100644 tests/kickstart_tests/proxy-kickstart.ks.in
delete mode 100644 tests/kickstart_tests/raid-1.ks
create mode 100644 tests/kickstart_tests/raid-1.ks.in
delete mode 100644 tests/kickstart_tests/reqpart.ks
create mode 100644 tests/kickstart_tests/reqpart.ks.in
delete mode 100644 tests/kickstart_tests/rootpw.ks
create mode 100644 tests/kickstart_tests/rootpw.ks.in
delete mode 100644 tests/kickstart_tests/selinux-disabled.ks
create mode 100644 tests/kickstart_tests/selinux-disabled.ks.in
delete mode 100644 tests/kickstart_tests/selinux-enforcing.ks
create mode 100644 tests/kickstart_tests/selinux-enforcing.ks.in
delete mode 100644 tests/kickstart_tests/selinux-permissive.ks
create mode 100644 tests/kickstart_tests/selinux-permissive.ks.in
delete mode 100644 tests/kickstart_tests/services.ks
create mode 100644 tests/kickstart_tests/services.ks.in
delete mode 100644 tests/kickstart_tests/timezoneLOCAL.ks
create mode 100644 tests/kickstart_tests/timezoneLOCAL.ks.in
delete mode 100644 tests/kickstart_tests/timezoneUTC.ks
create mode 100644 tests/kickstart_tests/timezoneUTC.ks.in
delete mode 100644 tests/kickstart_tests/tmpfs-fixed_size.ks
create mode 100644 tests/kickstart_tests/tmpfs-fixed_size.ks.in
delete mode 100644 tests/kickstart_tests/user.ks
create mode 100644 tests/kickstart_tests/user.ks.in
delete mode 100644 tests/kickstart_tests/vlan.ks
create mode 100644 tests/kickstart_tests/vlan.ks.in
diff --git a/tests/Makefile.am b/tests/Makefile.am
index c55e082..eb02b73 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -51,7 +51,7 @@ dist_check_SCRIPTS = $(srcdir)/glade/*.py \
gettext/contexts.py \
storage/run_storage_tests.py \
install/run_install_test.sh \
- $(srcdir)/kickstart_tests/*.ks \
+ $(srcdir)/kickstart_tests/*.ks.in \
$(srcdir)/kickstart_tests/*.sh \
$(srcdir)/kickstart_tests/scripts/* \
$(srcdir)/gui/*.ks \
diff --git a/tests/kickstart_tests/basic-ftp.ks b/tests/kickstart_tests/basic-ftp.ks
deleted file mode 100644
index 100a97e..0000000
--- a/tests/kickstart_tests/basic-ftp.ks
+++ /dev/null
@@ -1,22 +0,0 @@
-url --url=ftp://mirror.utexas.edu/pub/fedora/linux/development/rawhide/$basearch/os/
-install
-network --bootproto=dhcp
-
-bootloader --timeout=1
-zerombr
-clearpart --all
-autopart
-
-keyboard us
-lang en
-timezone America/New_York
-rootpw qweqwe
-shutdown
-
-%packages
-%end
-
-%post
-# If we made it post, that's good enough
-echo SUCCESS > /root/RESULT
-%end
diff --git a/tests/kickstart_tests/basic-ftp.ks.in b/tests/kickstart_tests/basic-ftp.ks.in
new file mode 100644
index 0000000..100a97e
--- /dev/null
+++ b/tests/kickstart_tests/basic-ftp.ks.in
@@ -0,0 +1,22 @@
+url --url=ftp://mirror.utexas.edu/pub/fedora/linux/development/rawhide/$basearch/os/
+install
+network --bootproto=dhcp
+
+bootloader --timeout=1
+zerombr
+clearpart --all
+autopart
+
+keyboard us
+lang en
+timezone America/New_York
+rootpw qweqwe
+shutdown
+
+%packages
+%end
+
+%post
+# If we made it post, that's good enough
+echo SUCCESS > /root/RESULT
+%end
diff --git a/tests/kickstart_tests/basic-ostree.ks b/tests/kickstart_tests/basic-ostree.ks
deleted file mode 100644
index 9fe1509..0000000
--- a/tests/kickstart_tests/basic-ostree.ks
+++ /dev/null
@@ -1,20 +0,0 @@
-# Substitute something in for REPO or this will all come crashing down.
-ostreesetup --nogpg --osname=fedora-atomic --remote=fedora-atomic --url=REPO --ref=fedora-atomic/rawhide/x86_64/base/core
-install
-network --bootproto=dhcp
-
-bootloader --timeout=1
-zerombr
-clearpart --all
-autopart
-
-keyboard us
-lang en
-timezone America/New_York
-rootpw qweqwe
-shutdown
-
-%post --nochroot
-mkdir -p /mnt/sysimage/root/
-echo SUCCESS > /mnt/sysimage/root/RESULT
-%end
diff --git a/tests/kickstart_tests/basic-ostree.ks.in b/tests/kickstart_tests/basic-ostree.ks.in
new file mode 100644
index 0000000..9fe1509
--- /dev/null
+++ b/tests/kickstart_tests/basic-ostree.ks.in
@@ -0,0 +1,20 @@
+# Substitute something in for REPO or this will all come crashing down.
+ostreesetup --nogpg --osname=fedora-atomic --remote=fedora-atomic --url=REPO --ref=fedora-atomic/rawhide/x86_64/base/core
+install
+network --bootproto=dhcp
+
+bootloader --timeout=1
+zerombr
+clearpart --all
+autopart
+
+keyboard us
+lang en
+timezone America/New_York
+rootpw qweqwe
+shutdown
+
+%post --nochroot
+mkdir -p /mnt/sysimage/root/
+echo SUCCESS > /mnt/sysimage/root/RESULT
+%end
diff --git a/tests/kickstart_tests/bond.ks b/tests/kickstart_tests/bond.ks
deleted file mode 100644
index e73566d..0000000
--- a/tests/kickstart_tests/bond.ks
+++ /dev/null
@@ -1,56 +0,0 @@
-url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
-install
-network --device=link --bootproto=dhcp
-
-# Create testing bond interface
-network --device=bond0 --bootproto=dhcp --bondslaves=link --activate
-
-bootloader --timeout=1
-zerombr
-clearpart --all
-autopart
-
-keyboard us
-lang en
-timezone America/New_York
-rootpw qweqwe
-shutdown
-
-%packages
-%end
-
-%post
-IF_FILE='/etc/sysconfig/network-scripts/ifcfg-bond0'
-
-if [[ -e $IF_FILE ]]; then
- cp $IF_FILE /root/
-else
- echo '*** ifcfg file for bond interface missing' >> /root/RESULT
- exit 0
-fi
-
-grep -q '^DEVICE=bond0$' $IF_FILE
-if [[ $? -ne 0 ]]; then
- echo '*** DEVICE is not present' >> /root/RESULT
-fi
-
-grep -q '^TYPE=Bond$' $IF_FILE
-if [[ $? -ne 0 ]]; then
- echo '*** TYPE is not present' >> /root/RESULT
-fi
-
-grep -q '^ONBOOT=yes$' $IF_FILE
-if [[ $? -ne 0 ]]; then
- echo '*** ONBOOT is not present' >> /root/RESULT
-fi
-
-grep -q '^BOOTPROTO=dhcp$' $IF_FILE
-if [[ $? -ne 0 ]]; then
- echo '*** BOOTPROTO is not present' >> /root/RESULT
-fi
-
-# No error was written to /root/RESULT file, everything is OK
-if [[ ! -e /root/RESULT ]]; then
- echo SUCCESS > /root/RESULT
-fi
-%end
diff --git a/tests/kickstart_tests/bond.ks.in b/tests/kickstart_tests/bond.ks.in
new file mode 100644
index 0000000..e73566d
--- /dev/null
+++ b/tests/kickstart_tests/bond.ks.in
@@ -0,0 +1,56 @@
+url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
+install
+network --device=link --bootproto=dhcp
+
+# Create testing bond interface
+network --device=bond0 --bootproto=dhcp --bondslaves=link --activate
+
+bootloader --timeout=1
+zerombr
+clearpart --all
+autopart
+
+keyboard us
+lang en
+timezone America/New_York
+rootpw qweqwe
+shutdown
+
+%packages
+%end
+
+%post
+IF_FILE='/etc/sysconfig/network-scripts/ifcfg-bond0'
+
+if [[ -e $IF_FILE ]]; then
+ cp $IF_FILE /root/
+else
+ echo '*** ifcfg file for bond interface missing' >> /root/RESULT
+ exit 0
+fi
+
+grep -q '^DEVICE=bond0$' $IF_FILE
+if [[ $? -ne 0 ]]; then
+ echo '*** DEVICE is not present' >> /root/RESULT
+fi
+
+grep -q '^TYPE=Bond$' $IF_FILE
+if [[ $? -ne 0 ]]; then
+ echo '*** TYPE is not present' >> /root/RESULT
+fi
+
+grep -q '^ONBOOT=yes$' $IF_FILE
+if [[ $? -ne 0 ]]; then
+ echo '*** ONBOOT is not present' >> /root/RESULT
+fi
+
+grep -q '^BOOTPROTO=dhcp$' $IF_FILE
+if [[ $? -ne 0 ]]; then
+ echo '*** BOOTPROTO is not present' >> /root/RESULT
+fi
+
+# No error was written to /root/RESULT file, everything is OK
+if [[ ! -e /root/RESULT ]]; then
+ echo SUCCESS > /root/RESULT
+fi
+%end
diff --git a/tests/kickstart_tests/btrfs-1.ks b/tests/kickstart_tests/btrfs-1.ks
deleted file mode 100644
index 95dff97..0000000
--- a/tests/kickstart_tests/btrfs-1.ks
+++ /dev/null
@@ -1,48 +0,0 @@
-url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
-install
-network --bootproto=dhcp
-
-bootloader --timeout=1
-zerombr
-clearpart --all
-
-part --fstype=ext4 --size=500 /boot
-part --fstype=swap --size=500 swap
-part btrfs.10 --fstype="btrfs" --size=4400
-
-btrfs none --label=fedora-btrfs btrfs.10
-
-btrfs / --subvol --name=root fedora-btrfs
-btrfs /home --subvol --name=home fedora-btrfs
-
-keyboard us
-lang en
-timezone America/New_York
-rootpw qweqwe
-shutdown
-
-%packages
-@core
-%end
-
-%post
-btrfs filesystem show fedora-btrfs
-if [[ $? != 0 ]]; then
- echo "*** btrfs volume 'fedora-btrfs' was not found" >> /root/RESULT
-fi
-
-grep "\s/\s" /etc/fstab | grep "subvol=root"
-if [[ $? != 0 ]]; then
- echo "*** root subvol is not mounted at /" >> /root/RESULT
-fi
-
-grep "\s/home\s" /etc/fstab | grep "subvol=home"
-if [[ $? != 0 ]]; then
- echo "*** home subvol is not mounted at /home" >> /root/RESULT
-fi
-
-# No error was written to /root/RESULT file, everything is OK
-if [[ ! -e /root/RESULT ]]; then
- echo SUCCESS > /root/RESULT
-fi
-%end
diff --git a/tests/kickstart_tests/btrfs-1.ks.in b/tests/kickstart_tests/btrfs-1.ks.in
new file mode 100644
index 0000000..95dff97
--- /dev/null
+++ b/tests/kickstart_tests/btrfs-1.ks.in
@@ -0,0 +1,48 @@
+url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
+install
+network --bootproto=dhcp
+
+bootloader --timeout=1
+zerombr
+clearpart --all
+
+part --fstype=ext4 --size=500 /boot
+part --fstype=swap --size=500 swap
+part btrfs.10 --fstype="btrfs" --size=4400
+
+btrfs none --label=fedora-btrfs btrfs.10
+
+btrfs / --subvol --name=root fedora-btrfs
+btrfs /home --subvol --name=home fedora-btrfs
+
+keyboard us
+lang en
+timezone America/New_York
+rootpw qweqwe
+shutdown
+
+%packages
+@core
+%end
+
+%post
+btrfs filesystem show fedora-btrfs
+if [[ $? != 0 ]]; then
+ echo "*** btrfs volume 'fedora-btrfs' was not found" >> /root/RESULT
+fi
+
+grep "\s/\s" /etc/fstab | grep "subvol=root"
+if [[ $? != 0 ]]; then
+ echo "*** root subvol is not mounted at /" >> /root/RESULT
+fi
+
+grep "\s/home\s" /etc/fstab | grep "subvol=home"
+if [[ $? != 0 ]]; then
+ echo "*** home subvol is not mounted at /home" >> /root/RESULT
+fi
+
+# No error was written to /root/RESULT file, everything is OK
+if [[ ! -e /root/RESULT ]]; then
+ echo SUCCESS > /root/RESULT
+fi
+%end
diff --git a/tests/kickstart_tests/btrfs-2.ks b/tests/kickstart_tests/btrfs-2.ks
deleted file mode 100644
index bdec709..0000000
--- a/tests/kickstart_tests/btrfs-2.ks
+++ /dev/null
@@ -1,59 +0,0 @@
-url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
-install
-network --bootproto=dhcp
-
-bootloader --timeout=1
-zerombr
-clearpart --all
-
-part --fstype=ext4 --size=500 /boot
-part --fstype=swap --size=500 swap
-part btrfs.10 --fstype="btrfs" --size=2200
-part btrfs.12 --fstype="btrfs" --size=2200
-
-btrfs none --data=raid0 --metadata=raid1 --label=fedora-btrfs btrfs.10 btrfs.12
-
-btrfs / --subvol --name=root fedora-btrfs
-btrfs /home --subvol --name=home fedora-btrfs
-
-keyboard us
-lang en
-timezone America/New_York
-rootpw qweqwe
-shutdown
-
-%packages
-@core
-%end
-
-%post
-btrfs filesystem show fedora-btrfs
-if [[ $? != 0 ]]; then
- echo "*** btrfs volume 'fedora-btrfs' was not found" >> /root/RESULT
-fi
-
-btrfs fi df / | grep "Data,\sRAID0"
-if [[ $? != 0 ]]; then
- echo "*** btrfs volume data RAID level is not RAID0" >> /root/RESULT
-fi
-
-btrfs fi df / | grep "Metadata,\sRAID1"
-if [[ $? != 0 ]]; then
- echo "*** btrfs volume metadata RAID level is not RAID1" >> /root/RESULT
-fi
-
-grep "\s/\s" /etc/fstab | grep "subvol=root"
-if [[ $? != 0 ]]; then
- echo "*** root subvol is not mounted at /" >> /root/RESULT
-fi
-
-grep "\s/home\s" /etc/fstab | grep "subvol=home"
-if [[ $? != 0 ]]; then
- echo "*** home subvol is not mounted at /home" >> /root/RESULT
-fi
-
-# No error was written to /root/RESULT file, everything is OK
-if [[ ! -e /root/RESULT ]]; then
- echo SUCCESS > /root/RESULT
-fi
-%end
diff --git a/tests/kickstart_tests/btrfs-2.ks.in b/tests/kickstart_tests/btrfs-2.ks.in
new file mode 100644
index 0000000..bdec709
--- /dev/null
+++ b/tests/kickstart_tests/btrfs-2.ks.in
@@ -0,0 +1,59 @@
+url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
+install
+network --bootproto=dhcp
+
+bootloader --timeout=1
+zerombr
+clearpart --all
+
+part --fstype=ext4 --size=500 /boot
+part --fstype=swap --size=500 swap
+part btrfs.10 --fstype="btrfs" --size=2200
+part btrfs.12 --fstype="btrfs" --size=2200
+
+btrfs none --data=raid0 --metadata=raid1 --label=fedora-btrfs btrfs.10 btrfs.12
+
+btrfs / --subvol --name=root fedora-btrfs
+btrfs /home --subvol --name=home fedora-btrfs
+
+keyboard us
+lang en
+timezone America/New_York
+rootpw qweqwe
+shutdown
+
+%packages
+@core
+%end
+
+%post
+btrfs filesystem show fedora-btrfs
+if [[ $? != 0 ]]; then
+ echo "*** btrfs volume 'fedora-btrfs' was not found" >> /root/RESULT
+fi
+
+btrfs fi df / | grep "Data,\sRAID0"
+if [[ $? != 0 ]]; then
+ echo "*** btrfs volume data RAID level is not RAID0" >> /root/RESULT
+fi
+
+btrfs fi df / | grep "Metadata,\sRAID1"
+if [[ $? != 0 ]]; then
+ echo "*** btrfs volume metadata RAID level is not RAID1" >> /root/RESULT
+fi
+
+grep "\s/\s" /etc/fstab | grep "subvol=root"
+if [[ $? != 0 ]]; then
+ echo "*** root subvol is not mounted at /" >> /root/RESULT
+fi
+
+grep "\s/home\s" /etc/fstab | grep "subvol=home"
+if [[ $? != 0 ]]; then
+ echo "*** home subvol is not mounted at /home" >> /root/RESULT
+fi
+
+# No error was written to /root/RESULT file, everything is OK
+if [[ ! -e /root/RESULT ]]; then
+ echo SUCCESS > /root/RESULT
+fi
+%end
diff --git a/tests/kickstart_tests/default-fstype.ks b/tests/kickstart_tests/default-fstype.ks
deleted file mode 100644
index e554685..0000000
--- a/tests/kickstart_tests/default-fstype.ks
+++ /dev/null
@@ -1,38 +0,0 @@
-#version=DEVEL
-url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
-install
-network --bootproto=dhcp
-
-bootloader --timeout=1
-zerombr
-clearpart --all --initlabel
-part /boot --size=500 --label=boot
-part pv.1 --fstype=lvmpv --size=4504
-volgroup fedora pv.1
-logvol swap --name=swap --vgname=fedora --size=500 --fstype=swap
-logvol / --name=root --vgname=fedora --size=4000 --label=root
-
-keyboard us
-lang en_US.UTF-8
-timezone America/New_York --utc
-rootpw testcase
-shutdown
-
-%packages
-%end
-
-%post
-root_fstype=$(blkid -o value -t LABEL=root -s TYPE)
-if [ $root_fstype != "ext4" ]; then
- echo "default fstype is incorrect (got $root_fstype; expected ext4)" >> /root/RESULT
-fi
-
-boot_fstype=$(blkid -o value -t LABEL=boot -s TYPE)
-if [ $boot_fstype != "ext4" ]; then
- echo "default boot fstype is incorrect (got $boot_fstype; expected ext4)" >> /root/RESULT
-fi
-
-if [ ! -e /root/RESULT ]; then
- echo SUCCESS > /root/RESULT
-fi
-%end
diff --git a/tests/kickstart_tests/default-fstype.ks.in b/tests/kickstart_tests/default-fstype.ks.in
new file mode 100644
index 0000000..e554685
--- /dev/null
+++ b/tests/kickstart_tests/default-fstype.ks.in
@@ -0,0 +1,38 @@
+#version=DEVEL
+url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
+install
+network --bootproto=dhcp
+
+bootloader --timeout=1
+zerombr
+clearpart --all --initlabel
+part /boot --size=500 --label=boot
+part pv.1 --fstype=lvmpv --size=4504
+volgroup fedora pv.1
+logvol swap --name=swap --vgname=fedora --size=500 --fstype=swap
+logvol / --name=root --vgname=fedora --size=4000 --label=root
+
+keyboard us
+lang en_US.UTF-8
+timezone America/New_York --utc
+rootpw testcase
+shutdown
+
+%packages
+%end
+
+%post
+root_fstype=$(blkid -o value -t LABEL=root -s TYPE)
+if [ $root_fstype != "ext4" ]; then
+ echo "default fstype is incorrect (got $root_fstype; expected ext4)" >> /root/RESULT
+fi
+
+boot_fstype=$(blkid -o value -t LABEL=boot -s TYPE)
+if [ $boot_fstype != "ext4" ]; then
+ echo "default boot fstype is incorrect (got $boot_fstype; expected ext4)" >> /root/RESULT
+fi
+
+if [ ! -e /root/RESULT ]; then
+ echo SUCCESS > /root/RESULT
+fi
+%end
diff --git a/tests/kickstart_tests/driverdisk-disk.ks b/tests/kickstart_tests/driverdisk-disk.ks
deleted file mode 100644
index 7d4d057..0000000
--- a/tests/kickstart_tests/driverdisk-disk.ks
+++ /dev/null
@@ -1,41 +0,0 @@
-#version=DEVEL
-url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
-install
-network --bootproto=dhcp
-
-keyboard us
-lang en_US.UTF-8
-timezone America/New_York --utc
-rootpw testcase
-shutdown
-
-bootloader --timeout=1
-zerombr
-clearpart --all
-autopart
-
-driverdisk /dev/disk/by-label/TEST_DD
-
-%packages
-@core
-%end
-
-%post --nochroot
-SYSROOT=${ANA_INSTALL_PATH:-/mnt/sysimage}
-RESULTFILE=$SYSROOT/root/RESULT
-fail() { echo "*** $*" >> $RESULTFILE; }
-
-# check the installer environment
-[ -f /lib/modules/`uname -r`/updates/fake-dd.ko ] || fail "kmod not loaded"
-[ -f /usr/bin/fake-dd-bin ] || fail "installer-enhancement not loaded"
-
-# check the installed system
-[ -f $SYSROOT/root/fake-dd-2.ko ] || fail "kmod rpm not installed"
-[ ! -f $SYSROOT/usr/bin/fake-dd-bin ] || \
- fail "installer-enhancement package installed to target system"
-
-# write successful result if nothing failed
-if [[ ! -e $RESULTFILE ]]; then
- echo SUCCESS > $RESULTFILE
-fi
-%end
diff --git a/tests/kickstart_tests/driverdisk-disk.ks.in b/tests/kickstart_tests/driverdisk-disk.ks.in
new file mode 100644
index 0000000..7d4d057
--- /dev/null
+++ b/tests/kickstart_tests/driverdisk-disk.ks.in
@@ -0,0 +1,41 @@
+#version=DEVEL
+url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
+install
+network --bootproto=dhcp
+
+keyboard us
+lang en_US.UTF-8
+timezone America/New_York --utc
+rootpw testcase
+shutdown
+
+bootloader --timeout=1
+zerombr
+clearpart --all
+autopart
+
+driverdisk /dev/disk/by-label/TEST_DD
+
+%packages
+@core
+%end
+
+%post --nochroot
+SYSROOT=${ANA_INSTALL_PATH:-/mnt/sysimage}
+RESULTFILE=$SYSROOT/root/RESULT
+fail() { echo "*** $*" >> $RESULTFILE; }
+
+# check the installer environment
+[ -f /lib/modules/`uname -r`/updates/fake-dd.ko ] || fail "kmod not loaded"
+[ -f /usr/bin/fake-dd-bin ] || fail "installer-enhancement not loaded"
+
+# check the installed system
+[ -f $SYSROOT/root/fake-dd-2.ko ] || fail "kmod rpm not installed"
+[ ! -f $SYSROOT/usr/bin/fake-dd-bin ] || \
+ fail "installer-enhancement package installed to target system"
+
+# write successful result if nothing failed
+if [[ ! -e $RESULTFILE ]]; then
+ echo SUCCESS > $RESULTFILE
+fi
+%end
diff --git a/tests/kickstart_tests/encrypt-device.ks b/tests/kickstart_tests/encrypt-device.ks
deleted file mode 100644
index afebb71..0000000
--- a/tests/kickstart_tests/encrypt-device.ks
+++ /dev/null
@@ -1,32 +0,0 @@
-url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
-install
-network --bootproto=dhcp
-
-bootloader --timeout=1
-zerombr
-clearpart --all --initlabel
-part pv.68 --asprimary --fstype="lvmpv" --ondisk=sda --size=7691
-part /boot --asprimary --fstype="ext4" --ondisk=sda --size=500
-volgroup vg01 --pesize=4096 pv.68
-logvol / --fstype="ext4" --size=5000 --encrypted --name=root_lv --vgname=vg01 --passphrase=OntarioIsAProvince --label=root
-logvol /var --fstype="ext4" --size=1000 --name=var_lv --vgname=vg01
-logvol swap --fstype="swap" --size=1024 --name=swap_lv --vgname=vg01
-logvol /home --fstype="ext4" --grow --size=1 --name=home_lv --vgname=vg01
-
-keyboard us
-lang en_US.UTF-8
-timezone America/New_York --utc
-rootpw testcase
-shutdown
-
-%packages --default
-%end
-
-%post
-root_lv_type=$(blkid -ovalue -sTYPE /dev/mapper/vg01-root_lv)
-if [ "$root_lv_type" != "crypto_LUKS" ]; then
- echo "root LV is not encrypted" > /home/RESULT
-else
- echo SUCCESS > /home/RESULT
-fi
-%end
diff --git a/tests/kickstart_tests/encrypt-device.ks.in b/tests/kickstart_tests/encrypt-device.ks.in
new file mode 100644
index 0000000..afebb71
--- /dev/null
+++ b/tests/kickstart_tests/encrypt-device.ks.in
@@ -0,0 +1,32 @@
+url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
+install
+network --bootproto=dhcp
+
+bootloader --timeout=1
+zerombr
+clearpart --all --initlabel
+part pv.68 --asprimary --fstype="lvmpv" --ondisk=sda --size=7691
+part /boot --asprimary --fstype="ext4" --ondisk=sda --size=500
+volgroup vg01 --pesize=4096 pv.68
+logvol / --fstype="ext4" --size=5000 --encrypted --name=root_lv --vgname=vg01 --passphrase=OntarioIsAProvince --label=root
+logvol /var --fstype="ext4" --size=1000 --name=var_lv --vgname=vg01
+logvol swap --fstype="swap" --size=1024 --name=swap_lv --vgname=vg01
+logvol /home --fstype="ext4" --grow --size=1 --name=home_lv --vgname=vg01
+
+keyboard us
+lang en_US.UTF-8
+timezone America/New_York --utc
+rootpw testcase
+shutdown
+
+%packages --default
+%end
+
+%post
+root_lv_type=$(blkid -ovalue -sTYPE /dev/mapper/vg01-root_lv)
+if [ "$root_lv_type" != "crypto_LUKS" ]; then
+ echo "root LV is not encrypted" > /home/RESULT
+else
+ echo SUCCESS > /home/RESULT
+fi
+%end
diff --git a/tests/kickstart_tests/escrow-cert.ks b/tests/kickstart_tests/escrow-cert.ks
deleted file mode 100644
index e878deb..0000000
--- a/tests/kickstart_tests/escrow-cert.ks
+++ /dev/null
@@ -1,108 +0,0 @@
-url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
-install
-network --bootproto=dhcp
-
-bootloader --timeout=1
-zerombr
-clearpart --all
-part --fstype=ext4 --size=4400 --label=rootfs /
-part --fstype=ext4 --size=500 /boot
-part --fstype=swap --size=500 swap
-
-# Create a partition that's easy to umount and poke at in %post
-# The escrow certificate is created in %pre, below
-part --fstype=ext4 --size=500 --encrypted --passphrase='passphrase' --escrowcert=file:///tmp/escrow_test/escrow.crt --backuppassphrase /home
-
-keyboard us
-lang en
-timezone America/New_York
-rootpw qweqwe
-shutdown
-
-%pre
-# Create an nss database for the escrow certificate
-mkdir -p /tmp/escrow_test/nss
-certutil -d /tmp/escrow_test/nss --empty-password -N
-
-# Create a self-signed certificate
-# certutil waits for input if not provided with entropy data (-z). Use some
-# crappy data from urandom in the hope of leaving some entropy for the LUKS
-# operations to use later.
-dd if=/dev/urandom of=/tmp/escrow_test/entropy bs=20 count=1
-certutil -d /tmp/escrow_test/nss -S -x -n escrow_cert \
- -s 'CN=Escrow Test' -t ',,TC' -z /tmp/escrow_test/entropy
-
-# Export the certificate
-certutil -d /tmp/escrow_test/nss -L -n escrow_cert -a -o /tmp/escrow_test/escrow.crt
-%end
-
-%pre-install
-# Copy the escrow database to the install path so we can use it during %post
-mkdir $ANA_INSTALL_PATH/root
-cp -a /tmp/escrow_test $ANA_INSTALL_PATH/root/
-%end
-
-%packages
-volume_key
-%end
-
-%post
-# First, check that the escrow stuff is there
-ls /root/*-escrow >/dev/null 2>&1
-if [[ $? != 0 ]]; then
- echo '*** escrow packet was not created' > /root/RESULT
- exit 1
-fi
-
-ls /root/*-escrow-backup-passphrase >/dev/null 2>&1
-if [[ $? != 0 ]]; then
- echo '*** backup passphrase was not created' > /root/RESULT
- exit 1
-fi
-
-# Get the LUKS device UUID from the escrow packet filename
-uuid="$(basename /root/*-escrow | sed 's|-escrow$||')"
-
-# umount and close the LUKS device
-umount /home
-cryptsetup close /dev/mapper/luks-$uuid
-
-# Try out the backup passphrase
-backup_passphrase="$(volume_key --secrets -d /root/escrow_test/nss /root/$uuid-escrow-backup-passphrase | sed -n '/^Passphrase:/s|^Passphrase:[[:space:]]*||p')"
-
-if [[ $? != 0 ]] || [[ -z "$backup_passphrase" ]]; then
- echo '*** unable to parse backup passphrase' > /root/RESULT
- exit 1
-fi
-
-echo -n $backup_passphrase | cryptsetup open -q --key-file - --type luks --test-passphrase /dev/disk/by-uuid/$uuid
-if [[ $? != 0 ]]; then
- echo '*** unable to decrypt volume with backup passphrase' > /root/RESULT
- exit 1
-fi
-
-# Restore access to the volume with the escrow packet
-# First, re-encrypt the packet with a passphrase
-echo -n -e 'packet passphrase\0packet passphrase\0' | volume_key --reencrypt -b -d /root/escrow_test/nss /root/$uuid-escrow -o /root/escrow-out
-if [[ $? != 0 ]] || [[ ! -f /root/escrow-out ]]; then
- echo '*** unable to reencrypt escrow packet' > /root/RESULT
- exit 1
-fi
-
-# Use the escrow packet to set a new passphrase on the LUKS volume
-echo -n -e 'packet passphrase\0volume passphrase\0volume passphrase\0' | volume_key --restore -b /dev/disk/by-uuid/$uuid /root/escrow-out
-if [[ $? != 0 ]]; then
- echo '*** unable to restore volume access with escrow packet' > /root/RESULT
- exit 1
-fi
-
-# Make sure the new passphrase actually works
-echo -n 'volume passphrase' | cryptsetup open -q --key-file - --type luks --test-passphrase /dev/disk/by-uuid/$uuid
-if [[ $? != 0 ]]; then
- echo '*** unable to open volume with restored passphrase' > /root/RESULT
- exit 1
-fi
-
-echo 'SUCCESS' > /root/RESULT
-
-%end
diff --git a/tests/kickstart_tests/escrow-cert.ks.in b/tests/kickstart_tests/escrow-cert.ks.in
new file mode 100644
index 0000000..e878deb
--- /dev/null
+++ b/tests/kickstart_tests/escrow-cert.ks.in
@@ -0,0 +1,108 @@
+url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
+install
+network --bootproto=dhcp
+
+bootloader --timeout=1
+zerombr
+clearpart --all
+part --fstype=ext4 --size=4400 --label=rootfs /
+part --fstype=ext4 --size=500 /boot
+part --fstype=swap --size=500 swap
+
+# Create a partition that's easy to umount and poke at in %post
+# The escrow certificate is created in %pre, below
+part --fstype=ext4 --size=500 --encrypted --passphrase='passphrase' --escrowcert=file:///tmp/escrow_test/escrow.crt --backuppassphrase /home
+
+keyboard us
+lang en
+timezone America/New_York
+rootpw qweqwe
+shutdown
+
+%pre
+# Create an nss database for the escrow certificate
+mkdir -p /tmp/escrow_test/nss
+certutil -d /tmp/escrow_test/nss --empty-password -N
+
+# Create a self-signed certificate
+# certutil waits for input if not provided with entropy data (-z). Use some
+# crappy data from urandom in the hope of leaving some entropy for the LUKS
+# operations to use later.
+dd if=/dev/urandom of=/tmp/escrow_test/entropy bs=20 count=1
+certutil -d /tmp/escrow_test/nss -S -x -n escrow_cert \
+ -s 'CN=Escrow Test' -t ',,TC' -z /tmp/escrow_test/entropy
+
+# Export the certificate
+certutil -d /tmp/escrow_test/nss -L -n escrow_cert -a -o /tmp/escrow_test/escrow.crt
+%end
+
+%pre-install
+# Copy the escrow database to the install path so we can use it during %post
+mkdir $ANA_INSTALL_PATH/root
+cp -a /tmp/escrow_test $ANA_INSTALL_PATH/root/
+%end
+
+%packages
+volume_key
+%end
+
+%post
+# First, check that the escrow stuff is there
+ls /root/*-escrow >/dev/null 2>&1
+if [[ $? != 0 ]]; then
+ echo '*** escrow packet was not created' > /root/RESULT
+ exit 1
+fi
+
+ls /root/*-escrow-backup-passphrase >/dev/null 2>&1
+if [[ $? != 0 ]]; then
+ echo '*** backup passphrase was not created' > /root/RESULT
+ exit 1
+fi
+
+# Get the LUKS device UUID from the escrow packet filename
+uuid="$(basename /root/*-escrow | sed 's|-escrow$||')"
+
+# umount and close the LUKS device
+umount /home
+cryptsetup close /dev/mapper/luks-$uuid
+
+# Try out the backup passphrase
+backup_passphrase="$(volume_key --secrets -d /root/escrow_test/nss /root/$uuid-escrow-backup-passphrase | sed -n '/^Passphrase:/s|^Passphrase:[[:space:]]*||p')"
+
+if [[ $? != 0 ]] || [[ -z "$backup_passphrase" ]]; then
+ echo '*** unable to parse backup passphrase' > /root/RESULT
+ exit 1
+fi
+
+echo -n $backup_passphrase | cryptsetup open -q --key-file - --type luks --test-passphrase /dev/disk/by-uuid/$uuid
+if [[ $? != 0 ]]; then
+ echo '*** unable to decrypt volume with backup passphrase' > /root/RESULT
+ exit 1
+fi
+
+# Restore access to the volume with the escrow packet
+# First, re-encrypt the packet with a passphrase
+echo -n -e 'packet passphrase\0packet passphrase\0' | volume_key --reencrypt -b -d /root/escrow_test/nss /root/$uuid-escrow -o /root/escrow-out
+if [[ $? != 0 ]] || [[ ! -f /root/escrow-out ]]; then
+ echo '*** unable to reencrypt escrow packet' > /root/RESULT
+ exit 1
+fi
+
+# Use the escrow packet to set a new passphrase on the LUKS volume
+echo -n -e 'packet passphrase\0volume passphrase\0volume passphrase\0' | volume_key --restore -b /dev/disk/by-uuid/$uuid /root/escrow-out
+if [[ $? != 0 ]]; then
+ echo '*** unable to restore volume access with escrow packet' > /root/RESULT
+ exit 1
+fi
+
+# Make sure the new passphrase actually works
+echo -n 'volume passphrase' | cryptsetup open -q --key-file - --type luks --test-passphrase /dev/disk/by-uuid/$uuid
+if [[ $? != 0 ]]; then
+ echo '*** unable to open volume with restored passphrase' > /root/RESULT
+ exit 1
+fi
+
+echo 'SUCCESS' > /root/RESULT
+
+%end
diff --git a/tests/kickstart_tests/firewall.ks b/tests/kickstart_tests/firewall.ks
deleted file mode 100644
index ba8aafa..0000000
--- a/tests/kickstart_tests/firewall.ks
+++ /dev/null
@@ -1,59 +0,0 @@
-#version=DEVEL
-url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
-install
-network --bootproto=dhcp
-
-bootloader --timeout=1
-zerombr
-clearpart --all --initlabel
-autopart
-
-keyboard en
-lang en
-timezone America/New_York --utc
-rootpw testcase
-shutdown
-
-# TEST: firewall
-firewall --enable --port=22001:tcp,6400:udp --service=tftp,smtp
-
-%packages
-%end
-
-%post
-
-## TEST PROCEDURE
-# Test for 22001/TCP
-firewall-offline-cmd --list-ports | grep 22001/tcp
-if [[ $? -ne 0 ]]; then
- echo "*** Firewall config for 22001/tcp" >> /root/RESULT
-fi
-
-# Test for 6400/UDP
-firewall-offline-cmd --list-ports | grep 6400/udp
-if [[ $? -ne 0 ]]; then
- echo "*** Firewall config for 6400/udp failed" >> /root/RESULT
-fi
-
-# Test for service tftp
-firewall-offline-cmd --list-services | grep tftp
-if [[ $? -ne 0 ]]; then
- echo "*** Firewall service tftp not assigned" >> /root/RESULT
-fi
-
-# Test for service smtp
-firewall-offline-cmd --list-services | grep smtp
-if [[ $? -ne 0 ]]; then
- echo "*** Firewall service smtp not assigned" >> /root/RESULT
-fi
-
-# Test for service sane (disabled)
-firewall-offline-cmd --list-services | grep sane
-if [[ $? -ne 1 ]]; then
- echo "*** Firewall service sane enabled, should be disabled" >> /root/RESULT
-fi
-
-if [[ ! -e /root/RESULT ]]; then
- echo SUCCESS > /root/RESULT
-fi
-%end
diff --git a/tests/kickstart_tests/firewall.ks.in b/tests/kickstart_tests/firewall.ks.in
new file mode 100644
index 0000000..ba8aafa
--- /dev/null
+++ b/tests/kickstart_tests/firewall.ks.in
@@ -0,0 +1,59 @@
+#version=DEVEL
+url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
+install
+network --bootproto=dhcp
+
+bootloader --timeout=1
+zerombr
+clearpart --all --initlabel
+autopart
+
+keyboard en
+lang en
+timezone America/New_York --utc
+rootpw testcase
+shutdown
+
+# TEST: firewall
+firewall --enable --port=22001:tcp,6400:udp --service=tftp,smtp
+
+%packages
+%end
+
+%post
+
+## TEST PROCEDURE
+# Test for 22001/TCP
+firewall-offline-cmd --list-ports | grep 22001/tcp
+if [[ $? -ne 0 ]]; then
+ echo "*** Firewall config for 22001/tcp" >> /root/RESULT
+fi
+
+# Test for 6400/UDP
+firewall-offline-cmd --list-ports | grep 6400/udp
+if [[ $? -ne 0 ]]; then
+ echo "*** Firewall config for 6400/udp failed" >> /root/RESULT
+fi
+
+# Test for service tftp
+firewall-offline-cmd --list-services | grep tftp
+if [[ $? -ne 0 ]]; then
+ echo "*** Firewall service tftp not assigned" >> /root/RESULT
+fi
+
+# Test for service smtp
+firewall-offline-cmd --list-services | grep smtp
+if [[ $? -ne 0 ]]; then
+ echo "*** Firewall service smtp not assigned" >> /root/RESULT
+fi
+
+# Test for service sane (disabled)
+firewall-offline-cmd --list-services | grep sane
+if [[ $? -ne 1 ]]; then
+ echo "*** Firewall service sane enabled, should be disabled" >> /root/RESULT
+fi
+
+if [[ ! -e /root/RESULT ]]; then
+ echo SUCCESS > /root/RESULT
+fi
+%end
diff --git a/tests/kickstart_tests/groups-and-envs-1.ks b/tests/kickstart_tests/groups-and-envs-1.ks
deleted file mode 100644
index 93b2c74..0000000
--- a/tests/kickstart_tests/groups-and-envs-1.ks
+++ /dev/null
@@ -1,36 +0,0 @@
-url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
-install
-network --bootproto=dhcp
-
-bootloader --timeout=1
-zerombr
-clearpart --all
-autopart
-
-keyboard us
-lang en
-timezone America/New_York
-rootpw qweqwe
-shutdown
-
-%packages
-@core
-@c-development
-@^web-server-environment
-%end
-
-%post
-# We don't have a way of determining if a group/env is installed or not.
-# These sentinel packages will have to do.
-rpm -q httpd
-if [[ $? != 0 ]]; then
- echo '*** web-server-environment was not installed' > /root/RESULT
-else
- rpm -q gcc
- if [[ $? != 0 ]]; then
- echo '*** c-development was not installed' > /root/RESULT
- else
- echo SUCCESS > /root/RESULT
- fi
-fi
-%end
diff --git a/tests/kickstart_tests/groups-and-envs-1.ks.in b/tests/kickstart_tests/groups-and-envs-1.ks.in
new file mode 100644
index 0000000..93b2c74
--- /dev/null
+++ b/tests/kickstart_tests/groups-and-envs-1.ks.in
@@ -0,0 +1,36 @@
+url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
+install
+network --bootproto=dhcp
+
+bootloader --timeout=1
+zerombr
+clearpart --all
+autopart
+
+keyboard us
+lang en
+timezone America/New_York
+rootpw qweqwe
+shutdown
+
+%packages
+@core
+@c-development
+@^web-server-environment
+%end
+
+%post
+# We don't have a way of determining if a group/env is installed or not.
+# These sentinel packages will have to do.
+rpm -q httpd
+if [[ $? != 0 ]]; then
+ echo '*** web-server-environment was not installed' > /root/RESULT
+else
+ rpm -q gcc
+ if [[ $? != 0 ]]; then
+ echo '*** c-development was not installed' > /root/RESULT
+ else
+ echo SUCCESS > /root/RESULT
+ fi
+fi
+%end
diff --git a/tests/kickstart_tests/groups-and-envs-2.ks b/tests/kickstart_tests/groups-and-envs-2.ks
deleted file mode 100644
index 9cc8686..0000000
--- a/tests/kickstart_tests/groups-and-envs-2.ks
+++ /dev/null
@@ -1,80 +0,0 @@
-url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
-install
-network --bootproto=dhcp
-
-bootloader --timeout=1
-zerombr
-clearpart --all
-autopart
-
-keyboard us
-lang en
-timezone America/New_York
-rootpw qweqwe
-shutdown
-
-%packages
-# (1) Test that you can remove a group that's part of an environment.
-@^xfce-desktop-environment
--@dial-up
-
-# (2) Test that you can add and then remove a group.
-@3d-printing
--@3d-printing
-
-# (3) Test that --optional works.
-@container-management --optional
-
-# (4) Test that --nodefaults works.
-@rpm-development-tools --nodefaults
-%end
-
-%post
-# We don't have a way of determining if a group/env is installed or not.
-# These sentinel packages will have to do.
-
-# Testing #1 - lrzsz is only part of dial-up, and should not be installed.
-rpm -q lrzsz
-if [[ $? == 0 ]]; then
- echo '*** dial-up group should not have been installed' > /root/RESULT
- exit 1
-fi
-
-# Testing #2 - RepetierHost is only part of 3d-printing, and should not
-# be installed.
-rpm -q RepetierHost
-if [[ $? == 0 ]]; then
- echo '*** 3d-printing group should not have been installed' > /root/RESULT
- exit 1
-fi
-
-# Testing #3 - docker-registry is only part of container-management, where
-# it is optional, so it should be installed.
-rpm -q docker-registry
-if [[ $? != 0 ]]; then
- echo '*** docker-registry was not installed' > /root/RESULT
- exit 1
-fi
-
-# Testing #4 - rpm-build is mandatory so it should be installed. rpmdevtools is
-# default so it should not. rpmlint is optional so it should not.
-rpm -q rpm-build
-if [[ $? != 0 ]]; then
- echo '*** Mandatory package from rpm-development-tools was not installed' > /root/RESULT
- exit 1
-else
- rpm -q rpmdevtools
- if [[ $? == 0 ]]; then
- echo '*** Default package from rpm-development-tools should not have been installed' > /root/RESULT
- exit 1
- else
- rpm -q rpmlint
- if [[ $? == 0 ]]; then
- echo '*** Optional package from rpm-development-tools should not have been installed' > /root/RESULT
- exit 1
- fi
- fi
-fi
-
-echo SUCCESS > /root/RESULT
-%end
diff --git a/tests/kickstart_tests/groups-and-envs-2.ks.in b/tests/kickstart_tests/groups-and-envs-2.ks.in
new file mode 100644
index 0000000..9cc8686
--- /dev/null
+++ b/tests/kickstart_tests/groups-and-envs-2.ks.in
@@ -0,0 +1,80 @@
+url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
+install
+network --bootproto=dhcp
+
+bootloader --timeout=1
+zerombr
+clearpart --all
+autopart
+
+keyboard us
+lang en
+timezone America/New_York
+rootpw qweqwe
+shutdown
+
+%packages
+# (1) Test that you can remove a group that's part of an environment.
+@^xfce-desktop-environment
+-@dial-up
+
+# (2) Test that you can add and then remove a group.
+@3d-printing
+-@3d-printing
+
+# (3) Test that --optional works.
+@container-management --optional
+
+# (4) Test that --nodefaults works.
+@rpm-development-tools --nodefaults
+%end
+
+%post
+# We don't have a way of determining if a group/env is installed or not.
+# These sentinel packages will have to do.
+
+# Testing #1 - lrzsz is only part of dial-up, and should not be installed.
+rpm -q lrzsz
+if [[ $? == 0 ]]; then
+ echo '*** dial-up group should not have been installed' > /root/RESULT
+ exit 1
+fi
+
+# Testing #2 - RepetierHost is only part of 3d-printing, and should not
+# be installed.
+rpm -q RepetierHost
+if [[ $? == 0 ]]; then
+ echo '*** 3d-printing group should not have been installed' > /root/RESULT
+ exit 1
+fi
+
+# Testing #3 - docker-registry is only part of container-management, where
+# it is optional, so it should be installed.
+rpm -q docker-registry
+if [[ $? != 0 ]]; then
+ echo '*** docker-registry was not installed' > /root/RESULT
+ exit 1
+fi
+
+# Testing #4 - rpm-build is mandatory so it should be installed. rpmdevtools is
+# default so it should not. rpmlint is optional so it should not.
+rpm -q rpm-build
+if [[ $? != 0 ]]; then
+ echo '*** Mandatory package from rpm-development-tools was not installed' > /root/RESULT
+ exit 1
+else
+ rpm -q rpmdevtools
+ if [[ $? == 0 ]]; then
+ echo '*** Default package from rpm-development-tools should not have been installed' > /root/RESULT
+ exit 1
+ else
+ rpm -q rpmlint
+ if [[ $? == 0 ]]; then
+ echo '*** Optional package from rpm-development-tools should not have been installed' > /root/RESULT
+ exit 1
+ fi
+ fi
+fi
+
+echo SUCCESS > /root/RESULT
+%end
diff --git a/tests/kickstart_tests/groups-and-envs-3.ks b/tests/kickstart_tests/groups-and-envs-3.ks
deleted file mode 100644
index c512375..0000000
--- a/tests/kickstart_tests/groups-and-envs-3.ks
+++ /dev/null
@@ -1,34 +0,0 @@
-#version=DEVEL
-url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
-install
-network --bootproto=dhcp
-
-bootloader --timeout=1
-zerombr
-clearpart --all --initlabel
-autopart
-
-keyboard us
-lang en_US.UTF-8
-timezone America/New_York --utc
-rootpw testcase
-shutdown
-
-%packages
-@container-management
-@core
-@domain-client
-@hardware-support
-@headless-management
-@server-product
-@standard
-%end
-
-%post
-rpm -q fedora-release-server
-if [ $? -eq 0 ]; then
- echo SUCCESS > /root/RESULT
-else
- echo '*** Fedora Server default environment was not installed' > /root/RESULT
-fi
-%end
diff --git a/tests/kickstart_tests/groups-and-envs-3.ks.in b/tests/kickstart_tests/groups-and-envs-3.ks.in
new file mode 100644
index 0000000..c512375
--- /dev/null
+++ b/tests/kickstart_tests/groups-and-envs-3.ks.in
@@ -0,0 +1,34 @@
+#version=DEVEL
+url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
+install
+network --bootproto=dhcp
+
+bootloader --timeout=1
+zerombr
+clearpart --all --initlabel
+autopart
+
+keyboard us
+lang en_US.UTF-8
+timezone America/New_York --utc
+rootpw testcase
+shutdown
+
+%packages
+@container-management
+@core
+@domain-client
+@hardware-support
+@headless-management
+@server-product
+@standard
+%end
+
+%post
+rpm -q fedora-release-server
+if [ $? -eq 0 ]; then
+ echo SUCCESS > /root/RESULT
+else
+ echo '*** Fedora Server default environment was not installed' > /root/RESULT
+fi
+%end
diff --git a/tests/kickstart_tests/hostname.ks b/tests/kickstart_tests/hostname.ks
deleted file mode 100644
index ccf69d1..0000000
--- a/tests/kickstart_tests/hostname.ks
+++ /dev/null
@@ -1,38 +0,0 @@
-url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
-install
-network --bootproto=dhcp
-# Set hostname for testing
-network --hostname=testhostname.example.com
-
-bootloader --timeout=1
-zerombr
-clearpart --all
-autopart
-
-keyboard us
-lang en
-timezone America/New_York
-rootpw qweqwe
-shutdown
-
-%packages
-%end
-
-%post
-HOSTNAME="testhostname.example.com"
-
-# Check if hostname is set to the system
-grep -q "^${HOSTNAME}$" /etc/hostname
-if [[ $? -ne 0 ]]; then
- echo '*** hostname is not set to /etc/hostname' >> /root/RESULT
-fi
-
-hostnamectl --static | grep -q "^${HOSTNAME}$"
-if [[ $? -ne 0 ]]; then
- echo '*** hostnamectl --static does not return correct hostname' >> /root/RESULT
-fi
-
-if [[ ! -e /root/RESULT ]]; then
- echo SUCCESS > /root/RESULT
-fi
-%end
diff --git a/tests/kickstart_tests/hostname.ks.in b/tests/kickstart_tests/hostname.ks.in
new file mode 100644
index 0000000..ccf69d1
--- /dev/null
+++ b/tests/kickstart_tests/hostname.ks.in
@@ -0,0 +1,38 @@
+url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
+install
+network --bootproto=dhcp
+# Set hostname for testing
+network --hostname=testhostname.example.com
+
+bootloader --timeout=1
+zerombr
+clearpart --all
+autopart
+
+keyboard us
+lang en
+timezone America/New_York
+rootpw qweqwe
+shutdown
+
+%packages
+%end
+
+%post
+HOSTNAME="testhostname.example.com"
+
+# Check if hostname is set to the system
+grep -q "^${HOSTNAME}$" /etc/hostname
+if [[ $? -ne 0 ]]; then
+ echo '*** hostname is not set to /etc/hostname' >> /root/RESULT
+fi
+
+hostnamectl --static | grep -q "^${HOSTNAME}$"
+if [[ $? -ne 0 ]]; then
+ echo '*** hostnamectl --static does not return correct hostname' >> /root/RESULT
+fi
+
+if [[ ! -e /root/RESULT ]]; then
+ echo SUCCESS > /root/RESULT
+fi
+%end
diff --git a/tests/kickstart_tests/ignoredisk.ks b/tests/kickstart_tests/ignoredisk.ks
deleted file mode 100644
index b395b48..0000000
--- a/tests/kickstart_tests/ignoredisk.ks
+++ /dev/null
@@ -1,51 +0,0 @@
-#version=DEVEL
-url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
-install
-network --bootproto=dhcp
-
-bootloader --timeout=1
-clearpart --all --initlabel
-ignoredisk --drives=sdb
-autopart
-
-keyboard us
-lang en_US.UTF-8
-timezone America/New_York --utc
-rootpw testcase
-shutdown
-
-%packages
-%end
-
-%pre
-# Doing all this here is a lot easier than trying to make virt tools do
-# what I want on the outside. Also this'll run before storage.
-parted /dev/sdb mklabel msdos
-parted --align=none /dev/sdb mkpart primary 0 1G
-mkfs.ext4 /dev/sdb1
-mkdir /sdb
-mount /dev/sdb1 /sdb
-echo TEST > /sdb/sentinel
-umount /sdb
-rmdir /sdb
-%end
-
-%post
-mkdir /sdb
-mount /dev/sdb1 /sdb
-if [[ $? != 0 ]]; then
- echo "*** could not mount /dev/sdb1" >> /root/RESULT
-else
- if [[ ! -f /sdb/sentinel ]]; then
- echo "*** /sdb/sentinel no longer exists" >> /root/RESULT
- elif [[ "$(cat /sdb/sentinel)" != "TEST" ]]; then
- echo "*** /sdb/sentinel has changed contents" >> /root/RESULT
- fi
-
- umount /sdb
-fi
-
-if [ ! -e /root/RESULT ]; then
- echo SUCCESS > /root/RESULT
-fi
-%end
diff --git a/tests/kickstart_tests/ignoredisk.ks.in b/tests/kickstart_tests/ignoredisk.ks.in
new file mode 100644
index 0000000..b395b48
--- /dev/null
+++ b/tests/kickstart_tests/ignoredisk.ks.in
@@ -0,0 +1,51 @@
+#version=DEVEL
+url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
+install
+network --bootproto=dhcp
+
+bootloader --timeout=1
+clearpart --all --initlabel
+ignoredisk --drives=sdb
+autopart
+
+keyboard us
+lang en_US.UTF-8
+timezone America/New_York --utc
+rootpw testcase
+shutdown
+
+%packages
+%end
+
+%pre
+# Doing all this here is a lot easier than trying to make virt tools do
+# what I want on the outside. Also this'll run before storage.
+parted /dev/sdb mklabel msdos
+parted --align=none /dev/sdb mkpart primary 0 1G
+mkfs.ext4 /dev/sdb1
+mkdir /sdb
+mount /dev/sdb1 /sdb
+echo TEST > /sdb/sentinel
+umount /sdb
+rmdir /sdb
+%end
+
+%post
+mkdir /sdb
+mount /dev/sdb1 /sdb
+if [[ $? != 0 ]]; then
+ echo "*** could not mount /dev/sdb1" >> /root/RESULT
+else
+ if [[ ! -f /sdb/sentinel ]]; then
+ echo "*** /sdb/sentinel no longer exists" >> /root/RESULT
+ elif [[ "$(cat /sdb/sentinel)" != "TEST" ]]; then
+ echo "*** /sdb/sentinel has changed contents" >> /root/RESULT
+ fi
+
+ umount /sdb
+fi
+
+if [ ! -e /root/RESULT ]; then
+ echo SUCCESS > /root/RESULT
+fi
+%end
diff --git a/tests/kickstart_tests/keyboard-addtnl.ks b/tests/kickstart_tests/keyboard-addtnl.ks
deleted file mode 100644
index 5d1dd3c..0000000
--- a/tests/kickstart_tests/keyboard-addtnl.ks
+++ /dev/null
@@ -1,42 +0,0 @@
-#version=DEVEL
-url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
-install
-network --bootproto=dhcp
-
-bootloader --timeout=1
-zerombr
-clearpart --all --initlabel
-autopart
-
-keyboard --vckeymap cz --xlayouts=cz,fi
-lang cs_CZ.UTF-8
-timezone America/New_York --utc
-rootpw testcase
-shutdown
-
-%packages
-@core
-%end
-
-%post
-VCKBD="cz"
-XKBD="cz,fi"
-
-KBD=`grep KEYMAP /etc/vconsole.conf | awk -F\" '{ print $2 }'`
-echo "$KBD"
-
-if [[ "$KBD" != "$VCKBD" ]]; then
- echo '*** specified vconsole keyboard was not set' >> /root/RESULT
-fi
-
-ADDTNL=`grep XkbLayout /etc/X11/xorg.conf.d/00-keyboard.conf | awk -F\" '{ print $4 }'`
-echo "$ADDTNL"
-
-if [[ "$ADDTNL" != "$XKBD" ]]; then
- echo '*** specified xlayout(s) not set' >> /root/RESULT
-fi
-
-if [[ ! -e /root/RESULT ]]; then
- echo SUCCESS > /root/RESULT
-fi
-%end
diff --git a/tests/kickstart_tests/keyboard-addtnl.ks.in b/tests/kickstart_tests/keyboard-addtnl.ks.in
new file mode 100644
index 0000000..5d1dd3c
--- /dev/null
+++ b/tests/kickstart_tests/keyboard-addtnl.ks.in
@@ -0,0 +1,42 @@
+#version=DEVEL
+url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
+install
+network --bootproto=dhcp
+
+bootloader --timeout=1
+zerombr
+clearpart --all --initlabel
+autopart
+
+keyboard --vckeymap cz --xlayouts=cz,fi
+lang cs_CZ.UTF-8
+timezone America/New_York --utc
+rootpw testcase
+shutdown
+
+%packages
+@core
+%end
+
+%post
+VCKBD="cz"
+XKBD="cz,fi"
+
+KBD=`grep KEYMAP /etc/vconsole.conf | awk -F\" '{ print $2 }'`
+echo "$KBD"
+
+if [[ "$KBD" != "$VCKBD" ]]; then
+ echo '*** specified vconsole keyboard was not set' >> /root/RESULT
+fi
+
+ADDTNL=`grep XkbLayout /etc/X11/xorg.conf.d/00-keyboard.conf | awk -F\" '{ print $4 }'`
+echo "$ADDTNL"
+
+if [[ "$ADDTNL" != "$XKBD" ]]; then
+ echo '*** specified xlayout(s) not set' >> /root/RESULT
+fi
+
+if [[ ! -e /root/RESULT ]]; then
+ echo SUCCESS > /root/RESULT
+fi
+%end
diff --git a/tests/kickstart_tests/keyboard.ks b/tests/kickstart_tests/keyboard.ks
deleted file mode 100644
index 2a5a902..0000000
--- a/tests/kickstart_tests/keyboard.ks
+++ /dev/null
@@ -1,33 +0,0 @@
-#version=DEVEL
-url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
-install
-network --bootproto=dhcp
-
-bootloader --timeout=1
-zerombr
-clearpart --all --initlabel
-autopart
-
-keyboard --vckeymap cz --xlayouts=cz
-lang cs_CZ.UTF-8
-timezone America/New_York --utc
-rootpw testcase
-shutdown
-
-%packages
-@core
-%end
-
-%post
-INSTKBD="cz"
-KBD=`grep KEYMAP /etc/vconsole.conf | awk -F\" '{ print $2 }'`
-echo "$KBD"
-
-if [[ "$KBD" != "$INSTKBD" ]]; then
- echo '*** specified keyboard was not set' >> /root/RESULT
-fi
-
-if [[ ! -e /root/RESULT ]]; then
- echo SUCCESS > /root/RESULT
-fi
-%end
diff --git a/tests/kickstart_tests/keyboard.ks.in b/tests/kickstart_tests/keyboard.ks.in
new file mode 100644
index 0000000..2a5a902
--- /dev/null
+++ b/tests/kickstart_tests/keyboard.ks.in
@@ -0,0 +1,33 @@
+#version=DEVEL
+url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
+install
+network --bootproto=dhcp
+
+bootloader --timeout=1
+zerombr
+clearpart --all --initlabel
+autopart
+
+keyboard --vckeymap cz --xlayouts=cz
+lang cs_CZ.UTF-8
+timezone America/New_York --utc
+rootpw testcase
+shutdown
+
+%packages
+@core
+%end
+
+%post
+INSTKBD="cz"
+KBD=`grep KEYMAP /etc/vconsole.conf | awk -F\" '{ print $2 }'`
+echo "$KBD"
+
+if [[ "$KBD" != "$INSTKBD" ]]; then
+ echo '*** specified keyboard was not set' >> /root/RESULT
+fi
+
+if [[ ! -e /root/RESULT ]]; then
+ echo SUCCESS > /root/RESULT
+fi
+%end
diff --git a/tests/kickstart_tests/ks-include.ks b/tests/kickstart_tests/ks-include.ks
deleted file mode 100644
index 6178a07..0000000
--- a/tests/kickstart_tests/ks-include.ks
+++ /dev/null
@@ -1,20 +0,0 @@
-url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
-install
-network --bootproto=dhcp
-
-bootloader --timeout=1
-zerombr
-clearpart --all
-autopart
-
-keyboard us
-lang en
-timezone America/New_York
-rootpw qweqwe
-shutdown
-
-%packages
-%end
-
-# Include a kickstart that contains %post
-%include KS-TEST-INCLUDE
diff --git a/tests/kickstart_tests/ks-include.ks.in b/tests/kickstart_tests/ks-include.ks.in
new file mode 100644
index 0000000..6178a07
--- /dev/null
+++ b/tests/kickstart_tests/ks-include.ks.in
@@ -0,0 +1,20 @@
+url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
+install
+network --bootproto=dhcp
+
+bootloader --timeout=1
+zerombr
+clearpart --all
+autopart
+
+keyboard us
+lang en
+timezone America/New_York
+rootpw qweqwe
+shutdown
+
+%packages
+%end
+
+# Include a kickstart that contains %post
+%include KS-TEST-INCLUDE
diff --git a/tests/kickstart_tests/lang-2.ks b/tests/kickstart_tests/lang-2.ks
deleted file mode 100644
index 4b92f37..0000000
--- a/tests/kickstart_tests/lang-2.ks
+++ /dev/null
@@ -1,43 +0,0 @@
-#version=DEVEL
-url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
-install
-network --bootproto=dhcp
-
-bootloader --timeout=1
-zerombr
-clearpart --all --initlabel
-autopart
-
-keyboard ara
-lang ar_EG.UTF-8
-timezone America/New_York --utc
-rootpw testcase
-shutdown
-
-%packages
-@^xfce-desktop-environment
-%end
-
-%post
-count=$(rpm -qa kacst\* | wc -l)
-if [[ $count -lt 5 ]]; then
- echo '*** kacst packages were not installed' >> /root/RESULT
- exit 1
-fi
-
-LANG="ar_EG.UTF-8"
-
-INSTLANG=`cat /etc/locale.conf | awk -F\" '{ print $2 }'`
-
-if [[ "$INSTLANG" != "$LANG" ]]; then
- echo '*** specified language was not set' >> /root/RESULT
-fi
-
-if ! grep -q "langpack_locales=$LANG" /etc/dnf/plugins/langpacks.conf; then
- echo '*** /etc/dnf/plugins/langpacks.conf was not set up' >> /root/RESULT
-fi
-
-if [[ ! -e /root/RESULT ]]; then
- echo SUCCESS > /root/RESULT
-fi
-%end
diff --git a/tests/kickstart_tests/lang-2.ks.in b/tests/kickstart_tests/lang-2.ks.in
new file mode 100644
index 0000000..4b92f37
--- /dev/null
+++ b/tests/kickstart_tests/lang-2.ks.in
@@ -0,0 +1,43 @@
+#version=DEVEL
+url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
+install
+network --bootproto=dhcp
+
+bootloader --timeout=1
+zerombr
+clearpart --all --initlabel
+autopart
+
+keyboard ara
+lang ar_EG.UTF-8
+timezone America/New_York --utc
+rootpw testcase
+shutdown
+
+%packages
+@^xfce-desktop-environment
+%end
+
+%post
+count=$(rpm -qa kacst\* | wc -l)
+if [[ $count -lt 5 ]]; then
+ echo '*** kacst packages were not installed' >> /root/RESULT
+ exit 1
+fi
+
+LANG="ar_EG.UTF-8"
+
+INSTLANG=`cat /etc/locale.conf | awk -F\" '{ print $2 }'`
+
+if [[ "$INSTLANG" != "$LANG" ]]; then
+ echo '*** specified language was not set' >> /root/RESULT
+fi
+
+if ! grep -q "langpack_locales=$LANG" /etc/dnf/plugins/langpacks.conf; then
+ echo '*** /etc/dnf/plugins/langpacks.conf was not set up' >> /root/RESULT
+fi
+
+if [[ ! -e /root/RESULT ]]; then
+ echo SUCCESS > /root/RESULT
+fi
+%end
diff --git a/tests/kickstart_tests/lang.ks b/tests/kickstart_tests/lang.ks
deleted file mode 100644
index c2b0a31..0000000
--- a/tests/kickstart_tests/lang.ks
+++ /dev/null
@@ -1,33 +0,0 @@
-#version=DEVEL
-url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
-install
-network --bootproto=dhcp
-
-bootloader --timeout=1
-zerombr
-clearpart --all --initlabel
-autopart
-
-keyboard us
-lang cs_CZ.UTF-8
-timezone America/New_York --utc
-rootpw testcase
-shutdown
-
-%packages
-@core
-%end
-
-%post
-LANG="cs_CZ.UTF-8"
-
-INSTLANG=`cat /etc/locale.conf | awk -F\" '{ print $2 }'`
-
-if [[ "$INSTLANG" != "$LANG" ]]; then
- echo '*** specified language was not set' >> /root/RESULT
-fi
-
-if [[ ! -e /root/RESULT ]]; then
- echo SUCCESS > /root/RESULT
-fi
-%end
diff --git a/tests/kickstart_tests/lang.ks.in b/tests/kickstart_tests/lang.ks.in
new file mode 100644
index 0000000..c2b0a31
--- /dev/null
+++ b/tests/kickstart_tests/lang.ks.in
@@ -0,0 +1,33 @@
+#version=DEVEL
+url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
+install
+network --bootproto=dhcp
+
+bootloader --timeout=1
+zerombr
+clearpart --all --initlabel
+autopart
+
+keyboard us
+lang cs_CZ.UTF-8
+timezone America/New_York --utc
+rootpw testcase
+shutdown
+
+%packages
+@core
+%end
+
+%post
+LANG="cs_CZ.UTF-8"
+
+INSTLANG=`cat /etc/locale.conf | awk -F\" '{ print $2 }'`
+
+if [[ "$INSTLANG" != "$LANG" ]]; then
+ echo '*** specified language was not set' >> /root/RESULT
+fi
+
+if [[ ! -e /root/RESULT ]]; then
+ echo SUCCESS > /root/RESULT
+fi
+%end
diff --git a/tests/kickstart_tests/liveimg.ks b/tests/kickstart_tests/liveimg.ks
deleted file mode 100644
index 20c78fa..0000000
--- a/tests/kickstart_tests/liveimg.ks
+++ /dev/null
@@ -1,28 +0,0 @@
-install
-liveimg --url=LIVEIMG_URL --checksum=LIVEIMG_CHECKSUM
-
-network --bootproto=dhcp
-
-bootloader --timeout=1
-zerombr
-
-clearpart --all --initlabel
-autopart
-
-keyboard us
-lang en
-timezone America/New_York
-
-rootpw qweqwe
-shutdown
-
-%post
-if [[ ! -e /etc/passwd ]]; then
- echo "*** liveimg installation failed ***" > /root/RESULT
-fi
-
-# Final check
-if [[ ! -e /root/RESULT ]]; then
- echo SUCCESS > /root/RESULT
-fi
-%end
diff --git a/tests/kickstart_tests/liveimg.ks.in b/tests/kickstart_tests/liveimg.ks.in
new file mode 100644
index 0000000..20c78fa
--- /dev/null
+++ b/tests/kickstart_tests/liveimg.ks.in
@@ -0,0 +1,28 @@
+install
+liveimg --url=LIVEIMG_URL --checksum=LIVEIMG_CHECKSUM
+
+network --bootproto=dhcp
+
+bootloader --timeout=1
+zerombr
+
+clearpart --all --initlabel
+autopart
+
+keyboard us
+lang en
+timezone America/New_York
+
+rootpw qweqwe
+shutdown
+
+%post
+if [[ ! -e /etc/passwd ]]; then
+ echo "*** liveimg installation failed ***" > /root/RESULT
+fi
+
+# Final check
+if [[ ! -e /root/RESULT ]]; then
+ echo SUCCESS > /root/RESULT
+fi
+%end
diff --git a/tests/kickstart_tests/lvm-1.ks b/tests/kickstart_tests/lvm-1.ks
deleted file mode 100644
index e780244..0000000
--- a/tests/kickstart_tests/lvm-1.ks
+++ /dev/null
@@ -1,77 +0,0 @@
-#version=DEVEL
-url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
-install
-network --bootproto=dhcp
-
-bootloader --timeout=1
-zerombr
-clearpart --all --initlabel
-part /boot --fstype=ext4 --size=500
-part pv.1 --fstype=lvmpv --size=4504
-volgroup fedora pv.1
-logvol swap --name=swap --vgname=fedora --size=500 --fstype=swap
-logvol / --name=root --vgname=fedora --size=4000 --fstype=ext4
-
-keyboard us
-lang en_US.UTF-8
-timezone America/New_York --utc
-rootpw testcase
-shutdown
-
-%packages
-%end
-
-%post
-root_lv="/dev/mapper/fedora-root"
-root_uuid="UUID=$(blkid -o value -s UUID $root_lv)"
-
-# verify root lv is mounted at /mnt/sysimage
-root_mount="$(grep ^$root_lv\\s/\\s /proc/mounts)"
-if [ -z "$root_mount" ]; then
- echo "*** lvm lv 'fedora-root' is not mounted at /" >> /root/RESULT
-fi
-
-root_fstype="$(echo $root_mount | cut -d' ' -f3)"
-if [ $root_fstype != "ext4" ]; then
- echo "*** lvm lv 'fedora-root' does not contain an ext4 fs" >> /root/RESULT
-fi
-
-# verify root entry in /etc/fstab is correct
-root_lv_entry="$(grep ^$root_lv\\s/\\s /etc/fstab)"
-root_uuid_entry="$(grep ^$root_uuid\\s/\\s /etc/fstab)"
-if [ -z "$root_lv_entry" -a -z "$root_uuid_entry" ] ; then
- echo "*** root lv is not the root entry in /etc/fstab" >> /root/RESULT
-fi
-
-# verify size of root lv
-root_lv_size=$(lvs --noheadings -o size --unit=m --nosuffix fedora/root)
-if [ $root_lv_size != "4000.00" ]; then
- echo "*** root lv has incorrect size" >> /root/RESULT
-fi
-
-# verify swap on lvm is active
-swap_lv="/dev/mapper/fedora-swap"
-swap_uuid="UUID=$(blkid -o value -s UUID $swap_lv)"
-swap_dm="$(basename $(readlink $swap_lv))"
-if ! grep -q $swap_dm /proc/swaps ; then
- echo "*** lvm lv 'fedora-swap' is not active as swap space" >> /root/RESULT
-fi
-
-# verify swap entry in /etc/fstab is correct
-swap_lv_entry="$(grep ^$swap_lv\\sswap\\s /etc/fstab)"
-swap_uuid_entry="$(grep ^$swap_uuid\\sswap\\s /etc/fstab)"
-if [ -z "$swap_lv_entry" -a -z "$swap_uuid_entry" ] ; then
- echo "*** swap lv is not in /etc/fstab" >> /root/RESULT
-fi
-
-# verify size of swap lv
-swap_lv_size=$(lvs --noheadings -o size --unit=m --nosuffix fedora/swap)
-if [ $swap_lv_size != "500.00" ]; then
- echo "*** swap lv has incorrect size" >> /root/RESULT
-fi
-
-if [ ! -e /root/RESULT ]; then
- echo SUCCESS > /root/RESULT
-fi
-
-%end
diff --git a/tests/kickstart_tests/lvm-1.ks.in b/tests/kickstart_tests/lvm-1.ks.in
new file mode 100644
index 0000000..e780244
--- /dev/null
+++ b/tests/kickstart_tests/lvm-1.ks.in
@@ -0,0 +1,77 @@
+#version=DEVEL
+url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
+install
+network --bootproto=dhcp
+
+bootloader --timeout=1
+zerombr
+clearpart --all --initlabel
+part /boot --fstype=ext4 --size=500
+part pv.1 --fstype=lvmpv --size=4504
+volgroup fedora pv.1
+logvol swap --name=swap --vgname=fedora --size=500 --fstype=swap
+logvol / --name=root --vgname=fedora --size=4000 --fstype=ext4
+
+keyboard us
+lang en_US.UTF-8
+timezone America/New_York --utc
+rootpw testcase
+shutdown
+
+%packages
+%end
+
+%post
+root_lv="/dev/mapper/fedora-root"
+root_uuid="UUID=$(blkid -o value -s UUID $root_lv)"
+
+# verify root lv is mounted at /mnt/sysimage
+root_mount="$(grep ^$root_lv\\s/\\s /proc/mounts)"
+if [ -z "$root_mount" ]; then
+ echo "*** lvm lv 'fedora-root' is not mounted at /" >> /root/RESULT
+fi
+
+root_fstype="$(echo $root_mount | cut -d' ' -f3)"
+if [ $root_fstype != "ext4" ]; then
+ echo "*** lvm lv 'fedora-root' does not contain an ext4 fs" >> /root/RESULT
+fi
+
+# verify root entry in /etc/fstab is correct
+root_lv_entry="$(grep ^$root_lv\\s/\\s /etc/fstab)"
+root_uuid_entry="$(grep ^$root_uuid\\s/\\s /etc/fstab)"
+if [ -z "$root_lv_entry" -a -z "$root_uuid_entry" ] ; then
+ echo "*** root lv is not the root entry in /etc/fstab" >> /root/RESULT
+fi
+
+# verify size of root lv
+root_lv_size=$(lvs --noheadings -o size --unit=m --nosuffix fedora/root)
+if [ $root_lv_size != "4000.00" ]; then
+ echo "*** root lv has incorrect size" >> /root/RESULT
+fi
+
+# verify swap on lvm is active
+swap_lv="/dev/mapper/fedora-swap"
+swap_uuid="UUID=$(blkid -o value -s UUID $swap_lv)"
+swap_dm="$(basename $(readlink $swap_lv))"
+if ! grep -q $swap_dm /proc/swaps ; then
+ echo "*** lvm lv 'fedora-swap' is not active as swap space" >> /root/RESULT
+fi
+
+# verify swap entry in /etc/fstab is correct
+swap_lv_entry="$(grep ^$swap_lv\\sswap\\s /etc/fstab)"
+swap_uuid_entry="$(grep ^$swap_uuid\\sswap\\s /etc/fstab)"
+if [ -z "$swap_lv_entry" -a -z "$swap_uuid_entry" ] ; then
+ echo "*** swap lv is not in /etc/fstab" >> /root/RESULT
+fi
+
+# verify size of swap lv
+swap_lv_size=$(lvs --noheadings -o size --unit=m --nosuffix fedora/swap)
+if [ $swap_lv_size != "500.00" ]; then
+ echo "*** swap lv has incorrect size" >> /root/RESULT
+fi
+
+if [ ! -e /root/RESULT ]; then
+ echo SUCCESS > /root/RESULT
+fi
+
+%end
diff --git a/tests/kickstart_tests/lvm-2.ks b/tests/kickstart_tests/lvm-2.ks
deleted file mode 100644
index 32049bb..0000000
--- a/tests/kickstart_tests/lvm-2.ks
+++ /dev/null
@@ -1,44 +0,0 @@
-#version=DEVEL
-url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
-install
-network --bootproto=dhcp
-
-bootloader --timeout=1
-zerombr
-clearpart --all --initlabel
-part /boot --fstype=ext4 --size=500
-part pv.1 --fstype=lvmpv --size=5000
-volgroup fedora pv.1
-logvol swap --name=swap --vgname=fedora --percent=10 --fstype=swap
-logvol / --name=root --vgname=fedora --percent=90 --fstype=ext4
-
-keyboard us
-lang en_US.UTF-8
-timezone America/New_York --utc
-rootpw testcase
-shutdown
-
-%packages
-python
-%end
-
-%post
-# verify sizes of lvs match percentages specified
-vg_size=$(vgs --noheadings -o size --unit=m --nosuffix fedora)
-root_lv_size=$(lvs --noheadings -o size --unit=m --nosuffix fedora/root)
-swap_lv_size=$(lvs --noheadings -o size --unit=m --nosuffix fedora/swap)
-root_percentage=$(python -c "print int(round(($root_lv_size*100)/$vg_size))")
-swap_percentage=$(python -c "print int(round(($swap_lv_size*100)/$vg_size))")
-if [ $swap_percentage != "10" ]; then
- echo "*** swap lv size is incorrect ($swap_lv_size MiB, or ${swap_percentage}%)" >> /root/RESULT
-fi
-
-if [ $root_percentage != "90" ]; then
- echo "*** root lv size is incorrect ($root_lv_size MiB, or ${root_percentage}%)" >> /root/RESULT
-fi
-
-if [ ! -e /root/RESULT ]; then
- echo SUCCESS > /root/RESULT
-fi
-
-%end
diff --git a/tests/kickstart_tests/lvm-2.ks.in b/tests/kickstart_tests/lvm-2.ks.in
new file mode 100644
index 0000000..32049bb
--- /dev/null
+++ b/tests/kickstart_tests/lvm-2.ks.in
@@ -0,0 +1,44 @@
+#version=DEVEL
+url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
+install
+network --bootproto=dhcp
+
+bootloader --timeout=1
+zerombr
+clearpart --all --initlabel
+part /boot --fstype=ext4 --size=500
+part pv.1 --fstype=lvmpv --size=5000
+volgroup fedora pv.1
+logvol swap --name=swap --vgname=fedora --percent=10 --fstype=swap
+logvol / --name=root --vgname=fedora --percent=90 --fstype=ext4
+
+keyboard us
+lang en_US.UTF-8
+timezone America/New_York --utc
+rootpw testcase
+shutdown
+
+%packages
+python
+%end
+
+%post
+# verify sizes of lvs match percentages specified
+vg_size=$(vgs --noheadings -o size --unit=m --nosuffix fedora)
+root_lv_size=$(lvs --noheadings -o size --unit=m --nosuffix fedora/root)
+swap_lv_size=$(lvs --noheadings -o size --unit=m --nosuffix fedora/swap)
+root_percentage=$(python -c "print int(round(($root_lv_size*100)/$vg_size))")
+swap_percentage=$(python -c "print int(round(($swap_lv_size*100)/$vg_size))")
+if [ $swap_percentage != "10" ]; then
+ echo "*** swap lv size is incorrect ($swap_lv_size MiB, or ${swap_percentage}%)" >> /root/RESULT
+fi
+
+if [ $root_percentage != "90" ]; then
+ echo "*** root lv size is incorrect ($root_lv_size MiB, or ${root_percentage}%)" >> /root/RESULT
+fi
+
+if [ ! -e /root/RESULT ]; then
+ echo SUCCESS > /root/RESULT
+fi
+
+%end
diff --git a/tests/kickstart_tests/lvm-cache-1.ks b/tests/kickstart_tests/lvm-cache-1.ks
deleted file mode 100644
index 848a10d..0000000
--- a/tests/kickstart_tests/lvm-cache-1.ks
+++ /dev/null
@@ -1,173 +0,0 @@
-#version=DEVEL
-url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
-install
-network --bootproto=dhcp
-
-bootloader --timeout=1
-zerombr
-clearpart --all --initlabel
-part /boot --fstype=ext4 --size=300
-part pv.1 --fstype=lvmpv --size=6500
-part pv.2 --fstype=lvmpv --size=3100
-
-volgroup fedora pv.1 pv.2
-logvol swap --name=swap --vgname=fedora --size=500 --fstype=swap
-logvol / --name=root --vgname=fedora --size=4000 --fstype=ext4 --cachepvs=pv.2 --cachesize=1500 --cachemode=writethrough
-logvol /home --name=home --vgname=fedora --size=2000 --fstype=ext4 --cachepvs=pv.2 --cachesize=1500 --cachemode=writeback
-
-keyboard us
-lang en_US.UTF-8
-timezone America/New_York --utc
-rootpw testcase
-shutdown
-
-%packages
-%end
-
-%post
-root_lv="/dev/mapper/fedora-root"
-root_uuid="UUID=$(blkid -o value -s UUID "$root_lv")"
-home_lv="/dev/mapper/fedora-home"
-home_uuid="UUID=$(blkid -o value -s UUID "$home_lv")"
-
-# verify root LV is mounted at /mnt/sysimage
-root_mount=$(grep ^$root_lv\\s/\\s /proc/mounts)
-if [ -z "$root_mount" ]; then
- echo "*** lvm lv 'fedora-root' is not mounted at /" >> /root/RESULT
-fi
-
-root_fstype=$(echo "$root_mount" | cut -d' ' -f3)
-if [ "$root_fstype" != "ext4" ]; then
- echo "*** lvm lv 'fedora-root' does not contain an ext4 fs" >> /root/RESULT
-fi
-
-# verify root entry in /etc/fstab is correct
-root_lv_entry=$(grep ^$root_lv\\s/\\s /etc/fstab)
-root_uuid_entry=$(grep ^$root_uuid\\s/\\s /etc/fstab)
-if [ -z "$root_lv_entry" -a -z "$root_uuid_entry" ] ; then
- echo "*** root LV is not the root entry in /etc/fstab" >> /root/RESULT
-fi
-
-# verify size of root LV
-root_lv_size=$(lvs --noheadings -o size --unit=m --nosuffix fedora/root|sed -r 's/\s*//')
-if [ "$root_lv_size" != "4000.00" ]; then
- echo "*** root LV has incorrect size" >> /root/RESULT
-fi
-
-# verify home entry in /etc/fstab is correct
-home_lv_entry=$(grep ^$home_lv\\s/home\\s /etc/fstab)
-home_uuid_entry=$(grep ^$home_uuid\\s/home\\s /etc/fstab)
-if [ -z "$home_lv_entry" -a -z "$home_uuid_entry" ] ; then
- echo "*** home LV is not the home entry in /etc/fstab" >> /root/RESULT
-fi
-
-# verify size of home LV
-home_lv_size=$(lvs --noheadings -o size --unit=m --nosuffix fedora/home|sed -r 's/\s*//')
-if [ "$home_lv_size" != "2000.00" ]; then
- echo "*** home LV has incorrect size" >> /root/RESULT
-fi
-
-# verify swap on lvm is active
-swap_lv="/dev/mapper/fedora-swap"
-swap_uuid="UUID=$(blkid -o value -s UUID "$swap_lv")"
-swap_dm=$(basename $(readlink "$swap_lv"))
-if ! grep -q "$swap_dm" /proc/swaps ; then
- echo "*** lvm lv 'fedora-swap' is not active as swap space" >> /root/RESULT
-fi
-
-# verify swap entry in /etc/fstab is correct
-swap_lv_entry=$(grep ^$swap_lv\\sswap\\s /etc/fstab)
-swap_uuid_entry=$(grep ^$swap_uuid\\sswap\\s /etc/fstab)
-if [ -z "$swap_lv_entry" -a -z "$swap_uuid_entry" ] ; then
- echo "*** swap lv is not in /etc/fstab" >> /root/RESULT
-fi
-
-# verify size of swap lv
-swap_lv_size=$(lvs --noheadings -o size --unit=m --nosuffix fedora/swap|sed -r 's/\s*//')
-if [ "$swap_lv_size" != "500.00" ]; then
- echo "*** swap lv has incorrect size" >> /root/RESULT
-fi
-
-## cache-specific checks
-# verify that root and home LVs are cached
-lvs -o lv_attr --noheadings fedora/root|grep -q '^\s\+C'
-if [ $? != 0 ]; then
- echo "*** root LV is not cached" >> /root/RESULT
-fi
-lvs -o lv_attr --noheadings fedora/home|grep -q '^\s\+C'
-if [ $? != 0 ]; then
- echo "*** home LV is not cached" >> /root/RESULT
-fi
-
-# verify size of root LV's cache
-root_cache_size=$(lvs --noheadings -o size --unit=m --nosuffix fedora/root_cache | sed -r 's/\s*([0-9]+)\..*/\1/')
-root_cache_md_size=$(lvs --noheadings -o size --unit=m --nosuffix fedora/root_cache_cmeta | sed -r 's/\s*([0-9]+)\..*/\1/')
-root_cache_all=$(($root_cache_size + $root_cache_md_size))
-if [ "$root_cache_all" != "1500" ]; then
- echo "*** root LV's cache has incorrect size" >> /root/RESULT
-fi
-
-# verify size of home LV's cache
-home_cache_size=$(lvs --noheadings -o size --unit=m --nosuffix fedora/home_cache | sed -r 's/\s*([0-9]+)\..*/\1/')
-home_cache_md_size=$(lvs --noheadings -o size --unit=m --nosuffix fedora/home_cache_cmeta | sed -r 's/\s*([0-9]+)\..*/\1/')
-home_cache_all=$(($home_cache_size + $home_cache_md_size))
-if [ "$home_cache_all" != "1500" ]; then
- echo "*** home LV's cache has incorrect size" >> /root/RESULT
-fi
-
-# verify mode of root LV's cache
-root_cache_mode=$(lvs --noheadings -o cachemode fedora/root|sed -r 's/\s*//')
-if [ "$root_cache_mode" != "writethrough" ]; then
- echo "*** root LV's cache has wrong mode" >> /root/RESULT
-fi
-
-# verify mode of home LV's cache
-home_cache_mode=$(lvs --noheadings -o cachemode fedora/home|sed -r 's/\s*//')
-if [ "$home_cache_mode" != "writeback" ]; then
- echo "*** home LV's cache has wrong mode" >> /root/RESULT
-fi
-
-# verify caches are using (only) the right (aka "faster") PV for both data and metadata
-fast_pv=$(pvs --noheadings -o name,size --unit m --nosuffix|egrep '3[0-9]{3}'|sed -r 's/\s+(\S+)\s+.*/\1/')
-
-root_cache_num_pvs=$(lvs -a --noheadings -o devices fedora/root_cache_cdata|wc -l)
-if [ "$root_cache_num_pvs" != "1" ]; then
- echo "*** root LV's cache is using multiple PVs" >> /root/RESULT
-fi
-home_cache_num_pvs=$(lvs -a --noheadings -o devices fedora/home_cache_cdata|wc -l)
-if [ "$home_cache_num_pvs" != "1" ]; then
- echo "*** home LV's cache is using multiple PVs" >> /root/RESULT
-fi
-
-root_cache_num_pvs=$(lvs -a --noheadings -o devices fedora/root_cache_cmeta|wc -l)
-if [ "$root_cache_num_pvs" != "1" ]; then
- echo "*** root LV's cache (meta) is using multiple PVs" >> /root/RESULT
-fi
-home_cache_num_pvs=$(lvs -a --noheadings -o devices fedora/home_cache_cmeta|wc -l)
-if [ "$home_cache_num_pvs" != "1" ]; then
- echo "*** home LV's cache (meta) is using multiple PVs" >> /root/RESULT
-fi
-
-root_cache_pv=$(lvs -a --noheadings -o devices fedora/root_cache_cdata|sed -r 's/\s*([^(]+)\(.*/\1/')
-if [ "$root_cache_pv" != "$fast_pv" ]; then
- echo "*** root LV's cache is using wrong PV" >> /root/RESULT
-fi
-home_cache_pv=$(lvs -a --noheadings -o devices fedora/home_cache_cdata|sed -r 's/\s*([^(]+)\(.*/\1/')
-if [ "$home_cache_pv" != "$fast_pv" ]; then
- echo "*** home LV's cache is using wrong PV" >> /root/RESULT
-fi
-
-root_cache_pv=$(lvs -a --noheadings -o devices fedora/root_cache_cmeta|sed -r 's/\s*([^(]+)\(.*/\1/')
-if [ "$root_cache_pv" != "$fast_pv" ]; then
- echo "*** root LV's cache (meta) is using wrong PV" >> /root/RESULT
-fi
-home_cache_pv=$(lvs -a --noheadings -o devices fedora/home_cache_cmeta|sed -r 's/\s*([^(]+)\(.*/\1/')
-if [ "$home_cache_pv" != "$fast_pv" ]; then
- echo "*** home LV's cache (meta) is using wrong PV" >> /root/RESULT
-fi
-
-if [ ! -e /root/RESULT ]; then
- echo SUCCESS > /root/RESULT
-fi
-
-%end
diff --git a/tests/kickstart_tests/lvm-cache-1.ks.in b/tests/kickstart_tests/lvm-cache-1.ks.in
new file mode 100644
index 0000000..848a10d
--- /dev/null
+++ b/tests/kickstart_tests/lvm-cache-1.ks.in
@@ -0,0 +1,173 @@
+#version=DEVEL
+url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
+install
+network --bootproto=dhcp
+
+bootloader --timeout=1
+zerombr
+clearpart --all --initlabel
+part /boot --fstype=ext4 --size=300
+part pv.1 --fstype=lvmpv --size=6500
+part pv.2 --fstype=lvmpv --size=3100
+
+volgroup fedora pv.1 pv.2
+logvol swap --name=swap --vgname=fedora --size=500 --fstype=swap
+logvol / --name=root --vgname=fedora --size=4000 --fstype=ext4 --cachepvs=pv.2 --cachesize=1500 --cachemode=writethrough
+logvol /home --name=home --vgname=fedora --size=2000 --fstype=ext4 --cachepvs=pv.2 --cachesize=1500 --cachemode=writeback
+
+keyboard us
+lang en_US.UTF-8
+timezone America/New_York --utc
+rootpw testcase
+shutdown
+
+%packages
+%end
+
+%post
+root_lv="/dev/mapper/fedora-root"
+root_uuid="UUID=$(blkid -o value -s UUID "$root_lv")"
+home_lv="/dev/mapper/fedora-home"
+home_uuid="UUID=$(blkid -o value -s UUID "$home_lv")"
+
+# verify root LV is mounted at /mnt/sysimage
+root_mount=$(grep ^$root_lv\\s/\\s /proc/mounts)
+if [ -z "$root_mount" ]; then
+ echo "*** lvm lv 'fedora-root' is not mounted at /" >> /root/RESULT
+fi
+
+root_fstype=$(echo "$root_mount" | cut -d' ' -f3)
+if [ "$root_fstype" != "ext4" ]; then
+ echo "*** lvm lv 'fedora-root' does not contain an ext4 fs" >> /root/RESULT
+fi
+
+# verify root entry in /etc/fstab is correct
+root_lv_entry=$(grep ^$root_lv\\s/\\s /etc/fstab)
+root_uuid_entry=$(grep ^$root_uuid\\s/\\s /etc/fstab)
+if [ -z "$root_lv_entry" -a -z "$root_uuid_entry" ] ; then
+ echo "*** root LV is not the root entry in /etc/fstab" >> /root/RESULT
+fi
+
+# verify size of root LV
+root_lv_size=$(lvs --noheadings -o size --unit=m --nosuffix fedora/root|sed -r 's/\s*//')
+if [ "$root_lv_size" != "4000.00" ]; then
+ echo "*** root LV has incorrect size" >> /root/RESULT
+fi
+
+# verify home entry in /etc/fstab is correct
+home_lv_entry=$(grep ^$home_lv\\s/home\\s /etc/fstab)
+home_uuid_entry=$(grep ^$home_uuid\\s/home\\s /etc/fstab)
+if [ -z "$home_lv_entry" -a -z "$home_uuid_entry" ] ; then
+ echo "*** home LV is not the home entry in /etc/fstab" >> /root/RESULT
+fi
+
+# verify size of home LV
+home_lv_size=$(lvs --noheadings -o size --unit=m --nosuffix fedora/home|sed -r 's/\s*//')
+if [ "$home_lv_size" != "2000.00" ]; then
+ echo "*** home LV has incorrect size" >> /root/RESULT
+fi
+
+# verify swap on lvm is active
+swap_lv="/dev/mapper/fedora-swap"
+swap_uuid="UUID=$(blkid -o value -s UUID "$swap_lv")"
+swap_dm=$(basename $(readlink "$swap_lv"))
+if ! grep -q "$swap_dm" /proc/swaps ; then
+ echo "*** lvm lv 'fedora-swap' is not active as swap space" >> /root/RESULT
+fi
+
+# verify swap entry in /etc/fstab is correct
+swap_lv_entry=$(grep ^$swap_lv\\sswap\\s /etc/fstab)
+swap_uuid_entry=$(grep ^$swap_uuid\\sswap\\s /etc/fstab)
+if [ -z "$swap_lv_entry" -a -z "$swap_uuid_entry" ] ; then
+ echo "*** swap lv is not in /etc/fstab" >> /root/RESULT
+fi
+
+# verify size of swap lv
+swap_lv_size=$(lvs --noheadings -o size --unit=m --nosuffix fedora/swap|sed -r 's/\s*//')
+if [ "$swap_lv_size" != "500.00" ]; then
+ echo "*** swap lv has incorrect size" >> /root/RESULT
+fi
+
+## cache-specific checks
+# verify that root and home LVs are cached
+lvs -o lv_attr --noheadings fedora/root|grep -q '^\s\+C'
+if [ $? != 0 ]; then
+ echo "*** root LV is not cached" >> /root/RESULT
+fi
+lvs -o lv_attr --noheadings fedora/home|grep -q '^\s\+C'
+if [ $? != 0 ]; then
+ echo "*** home LV is not cached" >> /root/RESULT
+fi
+
+# verify size of root LV's cache
+root_cache_size=$(lvs --noheadings -o size --unit=m --nosuffix fedora/root_cache | sed -r 's/\s*([0-9]+)\..*/\1/')
+root_cache_md_size=$(lvs --noheadings -o size --unit=m --nosuffix fedora/root_cache_cmeta | sed -r 's/\s*([0-9]+)\..*/\1/')
+root_cache_all=$(($root_cache_size + $root_cache_md_size))
+if [ "$root_cache_all" != "1500" ]; then
+ echo "*** root LV's cache has incorrect size" >> /root/RESULT
+fi
+
+# verify size of home LV's cache
+home_cache_size=$(lvs --noheadings -o size --unit=m --nosuffix fedora/home_cache | sed -r 's/\s*([0-9]+)\..*/\1/')
+home_cache_md_size=$(lvs --noheadings -o size --unit=m --nosuffix fedora/home_cache_cmeta | sed -r 's/\s*([0-9]+)\..*/\1/')
+home_cache_all=$(($home_cache_size + $home_cache_md_size))
+if [ "$home_cache_all" != "1500" ]; then
+ echo "*** home LV's cache has incorrect size" >> /root/RESULT
+fi
+
+# verify mode of root LV's cache
+root_cache_mode=$(lvs --noheadings -o cachemode fedora/root|sed -r 's/\s*//')
+if [ "$root_cache_mode" != "writethrough" ]; then
+ echo "*** root LV's cache has wrong mode" >> /root/RESULT
+fi
+
+# verify mode of home LV's cache
+home_cache_mode=$(lvs --noheadings -o cachemode fedora/home|sed -r 's/\s*//')
+if [ "$home_cache_mode" != "writeback" ]; then
+ echo "*** home LV's cache has wrong mode" >> /root/RESULT
+fi
+
+# verify caches are using (only) the right (aka "faster") PV for both data and metadata
+fast_pv=$(pvs --noheadings -o name,size --unit m --nosuffix|egrep '3[0-9]{3}'|sed -r 's/\s+(\S+)\s+.*/\1/')
+
+root_cache_num_pvs=$(lvs -a --noheadings -o devices fedora/root_cache_cdata|wc -l)
+if [ "$root_cache_num_pvs" != "1" ]; then
+ echo "*** root LV's cache is using multiple PVs" >> /root/RESULT
+fi
+home_cache_num_pvs=$(lvs -a --noheadings -o devices fedora/home_cache_cdata|wc -l)
+if [ "$home_cache_num_pvs" != "1" ]; then
+ echo "*** home LV's cache is using multiple PVs" >> /root/RESULT
+fi
+
+root_cache_num_pvs=$(lvs -a --noheadings -o devices fedora/root_cache_cmeta|wc -l)
+if [ "$root_cache_num_pvs" != "1" ]; then
+ echo "*** root LV's cache (meta) is using multiple PVs" >> /root/RESULT
+fi
+home_cache_num_pvs=$(lvs -a --noheadings -o devices fedora/home_cache_cmeta|wc -l)
+if [ "$home_cache_num_pvs" != "1" ]; then
+ echo "*** home LV's cache (meta) is using multiple PVs" >> /root/RESULT
+fi
+
+root_cache_pv=$(lvs -a --noheadings -o devices fedora/root_cache_cdata|sed -r 's/\s*([^(]+)\(.*/\1/')
+if [ "$root_cache_pv" != "$fast_pv" ]; then
+ echo "*** root LV's cache is using wrong PV" >> /root/RESULT
+fi
+home_cache_pv=$(lvs -a --noheadings -o devices fedora/home_cache_cdata|sed -r 's/\s*([^(]+)\(.*/\1/')
+if [ "$home_cache_pv" != "$fast_pv" ]; then
+ echo "*** home LV's cache is using wrong PV" >> /root/RESULT
+fi
+
+root_cache_pv=$(lvs -a --noheadings -o devices fedora/root_cache_cmeta|sed -r 's/\s*([^(]+)\(.*/\1/')
+if [ "$root_cache_pv" != "$fast_pv" ]; then
+ echo "*** root LV's cache (meta) is using wrong PV" >> /root/RESULT
+fi
+home_cache_pv=$(lvs -a --noheadings -o devices fedora/home_cache_cmeta|sed -r 's/\s*([^(]+)\(.*/\1/')
+if [ "$home_cache_pv" != "$fast_pv" ]; then
+ echo "*** home LV's cache (meta) is using wrong PV" >> /root/RESULT
+fi
+
+if [ ! -e /root/RESULT ]; then
+ echo SUCCESS > /root/RESULT
+fi
+
+%end
diff --git a/tests/kickstart_tests/lvm-cache-2.ks b/tests/kickstart_tests/lvm-cache-2.ks
deleted file mode 100644
index 9bab78b..0000000
--- a/tests/kickstart_tests/lvm-cache-2.ks
+++ /dev/null
@@ -1,158 +0,0 @@
-#version=DEVEL
-url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
-install
-network --bootproto=dhcp
-
-bootloader --timeout=1
-zerombr
-clearpart --all --initlabel
-part /boot --fstype=ext4 --size=300
-part pv.1 --fstype=lvmpv --size=6600
-part pv.2 --fstype=lvmpv --size=3100
-
-volgroup fedora pv.1 pv.2
-logvol swap --name=swap --vgname=fedora --size=500 --fstype=swap
-logvol / --name=root --vgname=fedora --size=4000 --grow --fstype=ext4 --cachepvs=pv.2 --cachesize=1000 --cachemode=writethrough
-logvol /home --name=home --vgname=fedora --size=1000 --grow --fstype=ext4 --cachepvs=pv.2 --cachesize=1000 --cachemode=writeback
-
-keyboard us
-lang en_US.UTF-8
-timezone America/New_York --utc
-rootpw testcase
-shutdown
-
-%packages
-%end
-
-%post
-root_lv="/dev/mapper/fedora-root"
-root_uuid="UUID=$(blkid -o value -s UUID "$root_lv")"
-home_lv="/dev/mapper/fedora-home"
-home_uuid="UUID=$(blkid -o value -s UUID "$home_lv")"
-
-# verify root LV is mounted at /mnt/sysimage
-root_mount=$(grep ^$root_lv\\s/\\s /proc/mounts)
-if [ -z "$root_mount" ]; then
- echo "*** lvm lv 'fedora-root' is not mounted at /" >> /root/RESULT
-fi
-
-root_fstype=$(echo "$root_mount" | cut -d' ' -f3)
-if [ "$root_fstype" != "ext4" ]; then
- echo "*** lvm lv 'fedora-root' does not contain an ext4 fs" >> /root/RESULT
-fi
-
-# verify root entry in /etc/fstab is correct
-root_lv_entry=$(grep ^$root_lv\\s/\\s /etc/fstab)
-root_uuid_entry=$(grep ^$root_uuid\\s/\\s /etc/fstab)
-if [ -z "$root_lv_entry" -a -z "$root_uuid_entry" ] ; then
- echo "*** root LV is not the root entry in /etc/fstab" >> /root/RESULT
-fi
-
-# verify swap on lvm is active
-swap_lv="/dev/mapper/fedora-swap"
-swap_uuid="UUID=$(blkid -o value -s UUID "$swap_lv")"
-swap_dm=$(basename $(readlink "$swap_lv"))
-if ! grep -q "$swap_dm" /proc/swaps ; then
- echo "*** lvm lv 'fedora-swap' is not active as swap space" >> /root/RESULT
-fi
-
-# verify swap entry in /etc/fstab is correct
-swap_lv_entry=$(grep ^$swap_lv\\sswap\\s /etc/fstab)
-swap_uuid_entry=$(grep ^$swap_uuid\\sswap\\s /etc/fstab)
-if [ -z "$swap_lv_entry" -a -z "$swap_uuid_entry" ] ; then
- echo "*** swap lv is not in /etc/fstab" >> /root/RESULT
-fi
-
-# verify size of swap lv
-# FIXME: this is not true now!
-# swap_lv_size=$(lvs --noheadings -o size --unit=m --nosuffix fedora/swap)
-# if [ "$swap_lv_size" != "500.00" ]; then
-# echo "*** swap lv has incorrect size" >> /root/RESULT
-# fi
-
-# we don't need to check sizes of grown LVs, the fact that the installation
-# reached this point means everything fit into the VG somehow
-
-## cache-specific checks
-# verify that root and home LVs are cached
-lvs -o lv_attr --noheadings fedora/root|grep -q '^\s\+C'
-if [ $? != 0 ]; then
- echo "*** root LV is not cached" >> /root/RESULT
-fi
-lvs -o lv_attr --noheadings fedora/home|grep -q '^\s\+C'
-if [ $? != 0 ]; then
- echo "*** home LV is not cached" >> /root/RESULT
-fi
-
-# verify size of root LV's cache
-root_cache_size=$(lvs --noheadings -o size --unit=m --nosuffix fedora/root_cache | sed -r 's/\s*([0-9]+)\..*/\1/')
-root_cache_md_size=$(lvs --noheadings -o size --unit=m --nosuffix fedora/root_cache_cmeta | sed -r 's/\s*([0-9]+)\..*/\1/')
-root_cache_all=$(($root_cache_size + $root_cache_md_size))
-if [ "$root_cache_all" != "1000" ]; then
- echo "*** root LV's cache has incorrect size" >> /root/RESULT
-fi
-
-# verify size of home LV's cache
-home_cache_size=$(lvs --noheadings -o size --unit=m --nosuffix fedora/home_cache | sed -r 's/\s*([0-9]+)\..*/\1/')
-home_cache_md_size=$(lvs --noheadings -o size --unit=m --nosuffix fedora/home_cache_cmeta | sed -r 's/\s*([0-9]+)\..*/\1/')
-home_cache_all=$(($home_cache_size + $home_cache_md_size))
-if [ "$home_cache_all" != "1000" ]; then
- echo "*** home LV's cache has incorrect size" >> /root/RESULT
-fi
-
-# verify mode of root LV's cache
-root_cache_mode=$(lvs --noheadings -o cachemode fedora/root|sed -r 's/\s*//')
-if [ "$root_cache_mode" != "writethrough" ]; then
- echo "*** root LV's cache has wrong mode" >> /root/RESULT
-fi
-
-# verify mode of home LV's cache
-home_cache_mode=$(lvs --noheadings -o cachemode fedora/home|sed -r 's/\s*//')
-if [ "$home_cache_mode" != "writeback" ]; then
- echo "*** home LV's cache has wrong mode" >> /root/RESULT
-fi
-
-# verify caches are using (only) the right (aka "faster") PV for both data and metadata
-fast_pv=$(pvs --noheadings -o name,size --unit m --nosuffix|egrep '3[0-9]{3}'|sed -r 's/\s+(\S+)\s+.*/\1/')
-
-root_cache_num_pvs=$(lvs -a --noheadings -o devices fedora/root_cache_cdata|wc -l)
-if [ "$root_cache_num_pvs" != "1" ]; then
- echo "*** root LV's cache is using multiple PVs" >> /root/RESULT
-fi
-home_cache_num_pvs=$(lvs -a --noheadings -o devices fedora/home_cache_cdata|wc -l)
-if [ "$home_cache_num_pvs" != "1" ]; then
- echo "*** home LV's cache is using multiple PVs" >> /root/RESULT
-fi
-
-root_cache_num_pvs=$(lvs -a --noheadings -o devices fedora/root_cache_cmeta|wc -l)
-if [ "$root_cache_num_pvs" != "1" ]; then
- echo "*** root LV's cache (meta) is using multiple PVs" >> /root/RESULT
-fi
-home_cache_num_pvs=$(lvs -a --noheadings -o devices fedora/home_cache_cmeta|wc -l)
-if [ "$home_cache_num_pvs" != "1" ]; then
- echo "*** home LV's cache (meta) is using multiple PVs" >> /root/RESULT
-fi
-
-root_cache_pv=$(lvs -a --noheadings -o devices fedora/root_cache_cdata|sed -r 's/\s*([^(]+)\(.*/\1/')
-if [ "$root_cache_pv" != "$fast_pv" ]; then
- echo "*** root LV's cache is using wrong PV" >> /root/RESULT
-fi
-home_cache_pv=$(lvs -a --noheadings -o devices fedora/home_cache_cdata|sed -r 's/\s*([^(]+)\(.*/\1/')
-if [ "$home_cache_pv" != "$fast_pv" ]; then
- echo "*** home LV's cache is using wrong PV" >> /root/RESULT
-fi
-
-root_cache_pv=$(lvs -a --noheadings -o devices fedora/root_cache_cmeta|sed -r 's/\s*([^(]+)\(.*/\1/')
-if [ "$root_cache_pv" != "$fast_pv" ]; then
- echo "*** root LV's cache (meta) is using wrong PV" >> /root/RESULT
-fi
-home_cache_pv=$(lvs -a --noheadings -o devices fedora/home_cache_cmeta|sed -r 's/\s*([^(]+)\(.*/\1/')
-if [ "$home_cache_pv" != "$fast_pv" ]; then
- echo "*** home LV's cache (meta) is using wrong PV" >> /root/RESULT
-fi
-
-if [ ! -e /root/RESULT ]; then
- echo SUCCESS > /root/RESULT
-fi
-
-%end
diff --git a/tests/kickstart_tests/lvm-cache-2.ks.in b/tests/kickstart_tests/lvm-cache-2.ks.in
new file mode 100644
index 0000000..9bab78b
--- /dev/null
+++ b/tests/kickstart_tests/lvm-cache-2.ks.in
@@ -0,0 +1,158 @@
+#version=DEVEL
+url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
+install
+network --bootproto=dhcp
+
+bootloader --timeout=1
+zerombr
+clearpart --all --initlabel
+part /boot --fstype=ext4 --size=300
+part pv.1 --fstype=lvmpv --size=6600
+part pv.2 --fstype=lvmpv --size=3100
+
+volgroup fedora pv.1 pv.2
+logvol swap --name=swap --vgname=fedora --size=500 --fstype=swap
+logvol / --name=root --vgname=fedora --size=4000 --grow --fstype=ext4 --cachepvs=pv.2 --cachesize=1000 --cachemode=writethrough
+logvol /home --name=home --vgname=fedora --size=1000 --grow --fstype=ext4 --cachepvs=pv.2 --cachesize=1000 --cachemode=writeback
+
+keyboard us
+lang en_US.UTF-8
+timezone America/New_York --utc
+rootpw testcase
+shutdown
+
+%packages
+%end
+
+%post
+root_lv="/dev/mapper/fedora-root"
+root_uuid="UUID=$(blkid -o value -s UUID "$root_lv")"
+home_lv="/dev/mapper/fedora-home"
+home_uuid="UUID=$(blkid -o value -s UUID "$home_lv")"
+
+# verify root LV is mounted at /mnt/sysimage
+root_mount=$(grep ^$root_lv\\s/\\s /proc/mounts)
+if [ -z "$root_mount" ]; then
+ echo "*** lvm lv 'fedora-root' is not mounted at /" >> /root/RESULT
+fi
+
+root_fstype=$(echo "$root_mount" | cut -d' ' -f3)
+if [ "$root_fstype" != "ext4" ]; then
+ echo "*** lvm lv 'fedora-root' does not contain an ext4 fs" >> /root/RESULT
+fi
+
+# verify root entry in /etc/fstab is correct
+root_lv_entry=$(grep ^$root_lv\\s/\\s /etc/fstab)
+root_uuid_entry=$(grep ^$root_uuid\\s/\\s /etc/fstab)
+if [ -z "$root_lv_entry" -a -z "$root_uuid_entry" ] ; then
+ echo "*** root LV is not the root entry in /etc/fstab" >> /root/RESULT
+fi
+
+# verify swap on lvm is active
+swap_lv="/dev/mapper/fedora-swap"
+swap_uuid="UUID=$(blkid -o value -s UUID "$swap_lv")"
+swap_dm=$(basename $(readlink "$swap_lv"))
+if ! grep -q "$swap_dm" /proc/swaps ; then
+ echo "*** lvm lv 'fedora-swap' is not active as swap space" >> /root/RESULT
+fi
+
+# verify swap entry in /etc/fstab is correct
+swap_lv_entry=$(grep ^$swap_lv\\sswap\\s /etc/fstab)
+swap_uuid_entry=$(grep ^$swap_uuid\\sswap\\s /etc/fstab)
+if [ -z "$swap_lv_entry" -a -z "$swap_uuid_entry" ] ; then
+ echo "*** swap lv is not in /etc/fstab" >> /root/RESULT
+fi
+
+# verify size of swap lv
+# FIXME: this is not true now!
+# swap_lv_size=$(lvs --noheadings -o size --unit=m --nosuffix fedora/swap)
+# if [ "$swap_lv_size" != "500.00" ]; then
+# echo "*** swap lv has incorrect size" >> /root/RESULT
+# fi
+
+# we don't need to check sizes of grown LVs, the fact that the installation
+# reached this point means everything fit into the VG somehow
+
+## cache-specific checks
+# verify that root and home LVs are cached
+lvs -o lv_attr --noheadings fedora/root|grep -q '^\s\+C'
+if [ $? != 0 ]; then
+ echo "*** root LV is not cached" >> /root/RESULT
+fi
+lvs -o lv_attr --noheadings fedora/home|grep -q '^\s\+C'
+if [ $? != 0 ]; then
+ echo "*** home LV is not cached" >> /root/RESULT
+fi
+
+# verify size of root LV's cache
+root_cache_size=$(lvs --noheadings -o size --unit=m --nosuffix fedora/root_cache | sed -r 's/\s*([0-9]+)\..*/\1/')
+root_cache_md_size=$(lvs --noheadings -o size --unit=m --nosuffix fedora/root_cache_cmeta | sed -r 's/\s*([0-9]+)\..*/\1/')
+root_cache_all=$(($root_cache_size + $root_cache_md_size))
+if [ "$root_cache_all" != "1000" ]; then
+ echo "*** root LV's cache has incorrect size" >> /root/RESULT
+fi
+
+# verify size of home LV's cache
+home_cache_size=$(lvs --noheadings -o size --unit=m --nosuffix fedora/home_cache | sed -r 's/\s*([0-9]+)\..*/\1/')
+home_cache_md_size=$(lvs --noheadings -o size --unit=m --nosuffix fedora/home_cache_cmeta | sed -r 's/\s*([0-9]+)\..*/\1/')
+home_cache_all=$(($home_cache_size + $home_cache_md_size))
+if [ "$home_cache_all" != "1000" ]; then
+ echo "*** home LV's cache has incorrect size" >> /root/RESULT
+fi
+
+# verify mode of root LV's cache
+root_cache_mode=$(lvs --noheadings -o cachemode fedora/root|sed -r 's/\s*//')
+if [ "$root_cache_mode" != "writethrough" ]; then
+ echo "*** root LV's cache has wrong mode" >> /root/RESULT
+fi
+
+# verify mode of home LV's cache
+home_cache_mode=$(lvs --noheadings -o cachemode fedora/home|sed -r 's/\s*//')
+if [ "$home_cache_mode" != "writeback" ]; then
+ echo "*** home LV's cache has wrong mode" >> /root/RESULT
+fi
+
+# verify caches are using (only) the right (aka "faster") PV for both data and metadata
+fast_pv=$(pvs --noheadings -o name,size --unit m --nosuffix|egrep '3[0-9]{3}'|sed -r 's/\s+(\S+)\s+.*/\1/')
+
+root_cache_num_pvs=$(lvs -a --noheadings -o devices fedora/root_cache_cdata|wc -l)
+if [ "$root_cache_num_pvs" != "1" ]; then
+ echo "*** root LV's cache is using multiple PVs" >> /root/RESULT
+fi
+home_cache_num_pvs=$(lvs -a --noheadings -o devices fedora/home_cache_cdata|wc -l)
+if [ "$home_cache_num_pvs" != "1" ]; then
+ echo "*** home LV's cache is using multiple PVs" >> /root/RESULT
+fi
+
+root_cache_num_pvs=$(lvs -a --noheadings -o devices fedora/root_cache_cmeta|wc -l)
+if [ "$root_cache_num_pvs" != "1" ]; then
+ echo "*** root LV's cache (meta) is using multiple PVs" >> /root/RESULT
+fi
+home_cache_num_pvs=$(lvs -a --noheadings -o devices fedora/home_cache_cmeta|wc -l)
+if [ "$home_cache_num_pvs" != "1" ]; then
+ echo "*** home LV's cache (meta) is using multiple PVs" >> /root/RESULT
+fi
+
+root_cache_pv=$(lvs -a --noheadings -o devices fedora/root_cache_cdata|sed -r 's/\s*([^(]+)\(.*/\1/')
+if [ "$root_cache_pv" != "$fast_pv" ]; then
+ echo "*** root LV's cache is using wrong PV" >> /root/RESULT
+fi
+home_cache_pv=$(lvs -a --noheadings -o devices fedora/home_cache_cdata|sed -r 's/\s*([^(]+)\(.*/\1/')
+if [ "$home_cache_pv" != "$fast_pv" ]; then
+ echo "*** home LV's cache is using wrong PV" >> /root/RESULT
+fi
+
+root_cache_pv=$(lvs -a --noheadings -o devices fedora/root_cache_cmeta|sed -r 's/\s*([^(]+)\(.*/\1/')
+if [ "$root_cache_pv" != "$fast_pv" ]; then
+ echo "*** root LV's cache (meta) is using wrong PV" >> /root/RESULT
+fi
+home_cache_pv=$(lvs -a --noheadings -o devices fedora/home_cache_cmeta|sed -r 's/\s*([^(]+)\(.*/\1/')
+if [ "$home_cache_pv" != "$fast_pv" ]; then
+ echo "*** home LV's cache (meta) is using wrong PV" >> /root/RESULT
+fi
+
+if [ ! -e /root/RESULT ]; then
+ echo SUCCESS > /root/RESULT
+fi
+
+%end
diff --git a/tests/kickstart_tests/lvm-raid-1.ks b/tests/kickstart_tests/lvm-raid-1.ks
deleted file mode 100644
index 25e099d..0000000
--- a/tests/kickstart_tests/lvm-raid-1.ks
+++ /dev/null
@@ -1,81 +0,0 @@
-#version=DEVEL
-url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
-install
-network --bootproto=dhcp
-
-bootloader --timeout=1
-zerombr
-clearpart --all --initlabel
-part /boot --fstype=ext4 --size=500
-part raid.01 --size=8000 --ondisk=sda
-part raid.02 --size=8000 --ondisk=sdb
-part raid.03 --size=8000 --ondisk=sdc
-raid pv.01 --level=RAID5 --device=pv.01 raid.01 raid.02 raid.03
-volgroup fedora pv.01
-logvol swap --name=swap --vgname=fedora --size=500 --fstype=swap
-logvol / --name=root --vgname=fedora --grow --size=4000 --fstype=ext4
-
-keyboard us
-lang en_US.UTF-8
-timezone America/New_York --utc
-rootpw testcase
-shutdown
-
-%packages
-%end
-
-%post
-root_lv="/dev/mapper/fedora-root"
-root_uuid="UUID=$(blkid -o value -s UUID $root_lv)"
-
-# verify root lv is mounted at /mnt/sysimage
-root_mount="$(grep ^$root_lv\\s/\\s /proc/mounts)"
-if [ -z "$root_mount" ]; then
- echo "*** lvm lv 'fedora-root' is not mounted at /" >> /root/RESULT
-fi
-
-root_fstype="$(echo $root_mount | cut -d' ' -f3)"
-if [ $root_fstype != "ext4" ]; then
- echo "*** lvm lv 'fedora-root' does not contain an ext4 fs" >> /root/RESULT
-fi
-
-# verify root entry in /etc/fstab is correct
-root_lv_entry="$(grep ^$root_lv\\s/\\s /etc/fstab)"
-root_uuid_entry="$(grep ^$root_uuid\\s/\\s /etc/fstab)"
-if [ -z "$root_lv_entry" -a -z "$root_uuid_entry" ] ; then
- echo "*** root lv is not the root entry in /etc/fstab" >> /root/RESULT
-fi
-
-# verify size of root lv (do not check any particular size, let's just be happy to see the
-# installation succeed and the LV grown somehow, for now)
-root_lv_size=$(lvs --noheadings -o size --unit=m --nosuffix fedora/root | sed -r 's/\s*([0-9]+)\..*/\1/')
-if [ $root_lv_size -le 4000 ]; then
- echo "*** root lv has incorrect size" >> /root/RESULT
-fi
-
-# verify swap on lvm is active
-swap_lv="/dev/mapper/fedora-swap"
-swap_uuid="UUID=$(blkid -o value -s UUID $swap_lv)"
-swap_dm="$(basename $(readlink $swap_lv))"
-if ! grep -q $swap_dm /proc/swaps ; then
- echo "*** lvm lv 'fedora-swap' is not active as swap space" >> /root/RESULT
-fi
-
-# verify swap entry in /etc/fstab is correct
-swap_lv_entry="$(grep ^$swap_lv\\sswap\\s /etc/fstab)"
-swap_uuid_entry="$(grep ^$swap_uuid\\sswap\\s /etc/fstab)"
-if [ -z "$swap_lv_entry" -a -z "$swap_uuid_entry" ] ; then
- echo "*** swap lv is not in /etc/fstab" >> /root/RESULT
-fi
-
-# verify size of swap lv
-swap_lv_size=$(lvs --noheadings -o size --unit=m --nosuffix fedora/swap)
-if [ $swap_lv_size != "500.00" ]; then
- echo "*** swap lv has incorrect size" >> /root/RESULT
-fi
-
-if [ ! -e /root/RESULT ]; then
- echo SUCCESS > /root/RESULT
-fi
-
-%end
diff --git a/tests/kickstart_tests/lvm-raid-1.ks.in b/tests/kickstart_tests/lvm-raid-1.ks.in
new file mode 100644
index 0000000..25e099d
--- /dev/null
+++ b/tests/kickstart_tests/lvm-raid-1.ks.in
@@ -0,0 +1,81 @@
+#version=DEVEL
+url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
+install
+network --bootproto=dhcp
+
+bootloader --timeout=1
+zerombr
+clearpart --all --initlabel
+part /boot --fstype=ext4 --size=500
+part raid.01 --size=8000 --ondisk=sda
+part raid.02 --size=8000 --ondisk=sdb
+part raid.03 --size=8000 --ondisk=sdc
+raid pv.01 --level=RAID5 --device=pv.01 raid.01 raid.02 raid.03
+volgroup fedora pv.01
+logvol swap --name=swap --vgname=fedora --size=500 --fstype=swap
+logvol / --name=root --vgname=fedora --grow --size=4000 --fstype=ext4
+
+keyboard us
+lang en_US.UTF-8
+timezone America/New_York --utc
+rootpw testcase
+shutdown
+
+%packages
+%end
+
+%post
+root_lv="/dev/mapper/fedora-root"
+root_uuid="UUID=$(blkid -o value -s UUID $root_lv)"
+
+# verify root lv is mounted at /mnt/sysimage
+root_mount="$(grep ^$root_lv\\s/\\s /proc/mounts)"
+if [ -z "$root_mount" ]; then
+ echo "*** lvm lv 'fedora-root' is not mounted at /" >> /root/RESULT
+fi
+
+root_fstype="$(echo $root_mount | cut -d' ' -f3)"
+if [ $root_fstype != "ext4" ]; then
+ echo "*** lvm lv 'fedora-root' does not contain an ext4 fs" >> /root/RESULT
+fi
+
+# verify root entry in /etc/fstab is correct
+root_lv_entry="$(grep ^$root_lv\\s/\\s /etc/fstab)"
+root_uuid_entry="$(grep ^$root_uuid\\s/\\s /etc/fstab)"
+if [ -z "$root_lv_entry" -a -z "$root_uuid_entry" ] ; then
+ echo "*** root lv is not the root entry in /etc/fstab" >> /root/RESULT
+fi
+
+# verify size of root lv (do not check any particular size, let's just be happy to see the
+# installation succeed and the LV grown somehow, for now)
+root_lv_size=$(lvs --noheadings -o size --unit=m --nosuffix fedora/root | sed -r 's/\s*([0-9]+)\..*/\1/')
+if [ $root_lv_size -le 4000 ]; then
+ echo "*** root lv has incorrect size" >> /root/RESULT
+fi
+
+# verify swap on lvm is active
+swap_lv="/dev/mapper/fedora-swap"
+swap_uuid="UUID=$(blkid -o value -s UUID $swap_lv)"
+swap_dm="$(basename $(readlink $swap_lv))"
+if ! grep -q $swap_dm /proc/swaps ; then
+ echo "*** lvm lv 'fedora-swap' is not active as swap space" >> /root/RESULT
+fi
+
+# verify swap entry in /etc/fstab is correct
+swap_lv_entry="$(grep ^$swap_lv\\sswap\\s /etc/fstab)"
+swap_uuid_entry="$(grep ^$swap_uuid\\sswap\\s /etc/fstab)"
+if [ -z "$swap_lv_entry" -a -z "$swap_uuid_entry" ] ; then
+ echo "*** swap lv is not in /etc/fstab" >> /root/RESULT
+fi
+
+# verify size of swap lv
+swap_lv_size=$(lvs --noheadings -o size --unit=m --nosuffix fedora/swap)
+if [ $swap_lv_size != "500.00" ]; then
+ echo "*** swap lv has incorrect size" >> /root/RESULT
+fi
+
+if [ ! -e /root/RESULT ]; then
+ echo SUCCESS > /root/RESULT
+fi
+
+%end
diff --git a/tests/kickstart_tests/lvm-thinp-1.ks b/tests/kickstart_tests/lvm-thinp-1.ks
deleted file mode 100644
index 9b470d5..0000000
--- a/tests/kickstart_tests/lvm-thinp-1.ks
+++ /dev/null
@@ -1,106 +0,0 @@
-#version=DEVEL
-url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
-install
-network --bootproto=dhcp
-
-bootloader --timeout=1
-zerombr
-clearpart --all --initlabel
-part /boot --fstype=ext4 --size=500
-part pv.1 --fstype=lvmpv --size=9004
-volgroup fedora pv.1
-logvol swap --name=swap --vgname=fedora --size=500 --fstype=swap
-logvol none --name=pool --vgname=fedora --size=7000 --thinpool
-logvol / --name=root --vgname=fedora --size=6000 --thin --poolname=pool --fstype=ext4
-logvol /home --name=home --vgname=fedora --size=1000 --thin --poolname=pool --fstype=ext4
-
-keyboard us
-lang en_US.UTF-8
-timezone America/New_York --utc
-rootpw testcase
-shutdown
-
-%packages
-%end
-
-%post
-root_lv="/dev/mapper/fedora-root"
-root_uuid="UUID=$(blkid -o value -s UUID $root_lv)"
-
-# verify root lv is mounted at /mnt/sysimage
-root_mount="$(grep ^$root_lv\\s/\\s /proc/mounts)"
-if [ -z "$root_mount" ]; then
- echo "*** lvm lv 'fedora-root' is not mounted at /" >> /root/RESULT
-fi
-
-root_fstype="$(echo $root_mount | cut -d' ' -f3)"
-if [ $root_fstype != "ext4" ]; then
- echo "*** lvm lv 'fedora-root' does not contain an ext4 fs" >> /root/RESULT
-fi
-
-# verify root entry in /etc/fstab is correct
-root_lv_entry="$(grep ^$root_lv\\s/\\s /etc/fstab)"
-root_uuid_entry="$(grep ^$root_uuid\\s/\\s /etc/fstab)"
-if [ -z "$root_lv_entry" -a -z "$root_uuid_entry" ] ; then
- echo "*** root lv is not the root entry in /etc/fstab" >> /root/RESULT
-fi
-
-# verify size of root lv
-root_lv_size=$(lvs --noheadings -o size --unit=m --nosuffix fedora/root)
-if [ $root_lv_size != "6000.00" ]; then
- echo "*** root lv has incorrect size" >> /root/RESULT
-fi
-
-root_lv="/dev/mapper/fedora-root"
-root_uuid="UUID=$(blkid -o value -s UUID $root_lv)"
-
-# verify root lv is mounted at /mnt/sysimage
-root_mount="$(grep ^$root_lv\\s/\\s /proc/mounts)"
-if [ -z "$root_mount" ]; then
- echo "*** lvm lv 'fedora-root' is not mounted at /" >> /root/RESULT
-fi
-
-home_fstype="$(echo $home_mount | cut -d' ' -f3)"
-if [ $home_fstype != "ext4" ]; then
- echo "*** lvm lv 'fedora-home' does not contain an ext4 fs" >> /home/RESULT
-fi
-
-# verify home entry in /etc/fstab is correct
-home_lv_entry="$(grep ^$home_lv\\s/home\\s /etc/fstab)"
-home_uuid_entry="$(grep ^$home_uuid\\s/home\\s /etc/fstab)"
-if [ -z "$home_lv_entry" -a -z "$home_uuid_entry" ] ; then
- echo "*** home lv is not the home entry in /etc/fstab" >> /home/RESULT
-fi
-
-# verify size of home lv
-home_lv_size=$(lvs --noheadings -o size --unit=m --nosuffix fedora/home)
-if [ $home_lv_size != "1000.00" ]; then
- echo "*** home lv has incorrect size" >> /home/RESULT
-fi
-
-# verify swap on lvm is active
-swap_lv="/dev/mapper/fedora-swap"
-swap_uuid="UUID=$(blkid -o value -s UUID $swap_lv)"
-swap_dm="$(basename $(readlink $swap_lv))"
-if ! grep -q $swap_dm /proc/swaps ; then
- echo "*** lvm lv 'fedora-swap' is not active as swap space" >> /root/RESULT
-fi
-
-# verify swap entry in /etc/fstab is correct
-swap_lv_entry="$(grep ^$swap_lv\\sswap\\s /etc/fstab)"
-swap_uuid_entry="$(grep ^$swap_uuid\\sswap\\s /etc/fstab)"
-if [ -z "$swap_lv_entry" -a -z "$swap_uuid_entry" ] ; then
- echo "*** swap lv is not in /etc/fstab" >> /root/RESULT
-fi
-
-# verify size of swap lv
-swap_lv_size=$(lvs --noheadings -o size --unit=m --nosuffix fedora/swap)
-if [ $swap_lv_size != "500.00" ]; then
- echo "*** swap lv has incorrect size" >> /root/RESULT
-fi
-
-if [ ! -e /root/RESULT ]; then
- echo SUCCESS > /root/RESULT
-fi
-
-%end
diff --git a/tests/kickstart_tests/lvm-thinp-1.ks.in b/tests/kickstart_tests/lvm-thinp-1.ks.in
new file mode 100644
index 0000000..9b470d5
--- /dev/null
+++ b/tests/kickstart_tests/lvm-thinp-1.ks.in
@@ -0,0 +1,106 @@
+#version=DEVEL
+url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
+install
+network --bootproto=dhcp
+
+bootloader --timeout=1
+zerombr
+clearpart --all --initlabel
+part /boot --fstype=ext4 --size=500
+part pv.1 --fstype=lvmpv --size=9004
+volgroup fedora pv.1
+logvol swap --name=swap --vgname=fedora --size=500 --fstype=swap
+logvol none --name=pool --vgname=fedora --size=7000 --thinpool
+logvol / --name=root --vgname=fedora --size=6000 --thin --poolname=pool --fstype=ext4
+logvol /home --name=home --vgname=fedora --size=1000 --thin --poolname=pool --fstype=ext4
+
+keyboard us
+lang en_US.UTF-8
+timezone America/New_York --utc
+rootpw testcase
+shutdown
+
+%packages
+%end
+
+%post
+root_lv="/dev/mapper/fedora-root"
+root_uuid="UUID=$(blkid -o value -s UUID $root_lv)"
+
+# verify root lv is mounted at /mnt/sysimage
+root_mount="$(grep ^$root_lv\\s/\\s /proc/mounts)"
+if [ -z "$root_mount" ]; then
+ echo "*** lvm lv 'fedora-root' is not mounted at /" >> /root/RESULT
+fi
+
+root_fstype="$(echo $root_mount | cut -d' ' -f3)"
+if [ $root_fstype != "ext4" ]; then
+ echo "*** lvm lv 'fedora-root' does not contain an ext4 fs" >> /root/RESULT
+fi
+
+# verify root entry in /etc/fstab is correct
+root_lv_entry="$(grep ^$root_lv\\s/\\s /etc/fstab)"
+root_uuid_entry="$(grep ^$root_uuid\\s/\\s /etc/fstab)"
+if [ -z "$root_lv_entry" -a -z "$root_uuid_entry" ] ; then
+ echo "*** root lv is not the root entry in /etc/fstab" >> /root/RESULT
+fi
+
+# verify size of root lv
+root_lv_size=$(lvs --noheadings -o size --unit=m --nosuffix fedora/root)
+if [ $root_lv_size != "6000.00" ]; then
+ echo "*** root lv has incorrect size" >> /root/RESULT
+fi
+
+root_lv="/dev/mapper/fedora-root"
+root_uuid="UUID=$(blkid -o value -s UUID $root_lv)"
+
+# verify root lv is mounted at /mnt/sysimage
+root_mount="$(grep ^$root_lv\\s/\\s /proc/mounts)"
+if [ -z "$root_mount" ]; then
+ echo "*** lvm lv 'fedora-root' is not mounted at /" >> /root/RESULT
+fi
+
+home_fstype="$(echo $home_mount | cut -d' ' -f3)"
+if [ $home_fstype != "ext4" ]; then
+ echo "*** lvm lv 'fedora-home' does not contain an ext4 fs" >> /home/RESULT
+fi
+
+# verify home entry in /etc/fstab is correct
+home_lv_entry="$(grep ^$home_lv\\s/home\\s /etc/fstab)"
+home_uuid_entry="$(grep ^$home_uuid\\s/home\\s /etc/fstab)"
+if [ -z "$home_lv_entry" -a -z "$home_uuid_entry" ] ; then
+ echo "*** home lv is not the home entry in /etc/fstab" >> /home/RESULT
+fi
+
+# verify size of home lv
+home_lv_size=$(lvs --noheadings -o size --unit=m --nosuffix fedora/home)
+if [ $home_lv_size != "1000.00" ]; then
+ echo "*** home lv has incorrect size" >> /home/RESULT
+fi
+
+# verify swap on lvm is active
+swap_lv="/dev/mapper/fedora-swap"
+swap_uuid="UUID=$(blkid -o value -s UUID $swap_lv)"
+swap_dm="$(basename $(readlink $swap_lv))"
+if ! grep -q $swap_dm /proc/swaps ; then
+ echo "*** lvm lv 'fedora-swap' is not active as swap space" >> /root/RESULT
+fi
+
+# verify swap entry in /etc/fstab is correct
+swap_lv_entry="$(grep ^$swap_lv\\sswap\\s /etc/fstab)"
+swap_uuid_entry="$(grep ^$swap_uuid\\sswap\\s /etc/fstab)"
+if [ -z "$swap_lv_entry" -a -z "$swap_uuid_entry" ] ; then
+ echo "*** swap lv is not in /etc/fstab" >> /root/RESULT
+fi
+
+# verify size of swap lv
+swap_lv_size=$(lvs --noheadings -o size --unit=m --nosuffix fedora/swap)
+if [ $swap_lv_size != "500.00" ]; then
+ echo "*** swap lv has incorrect size" >> /root/RESULT
+fi
+
+if [ ! -e /root/RESULT ]; then
+ echo SUCCESS > /root/RESULT
+fi
+
+%end
diff --git a/tests/kickstart_tests/lvm-thinp-2.ks b/tests/kickstart_tests/lvm-thinp-2.ks
deleted file mode 100644
index a17399b..0000000
--- a/tests/kickstart_tests/lvm-thinp-2.ks
+++ /dev/null
@@ -1,114 +0,0 @@
-#version=DEVEL
-url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
-install
-network --bootproto=dhcp
-
-bootloader --timeout=1
-zerombr
-clearpart --all --initlabel
-part /boot --fstype=ext4 --size=500
-part pv.1 --fstype=lvmpv --size=9004
-volgroup fedora pv.1
-logvol swap --name=swap --vgname=fedora --size=500 --fstype=swap
-logvol none --name=pool --vgname=fedora --size=7000 --thinpool --grow
-logvol / --name=root --vgname=fedora --size=6000 --thin --poolname=pool --fstype=ext4
-logvol /home --name=home --vgname=fedora --size=1000 --thin --poolname=pool --fstype=ext4
-
-keyboard us
-lang en_US.UTF-8
-timezone America/New_York --utc
-rootpw testcase
-shutdown
-
-%packages
-%end
-
-%post
-root_lv="/dev/mapper/fedora-root"
-root_uuid="UUID=$(blkid -o value -s UUID $root_lv)"
-
-# verify root lv is mounted at /mnt/sysimage
-root_mount="$(grep ^$root_lv\\s/\\s /proc/mounts)"
-if [ -z "$root_mount" ]; then
- echo "*** lvm lv 'fedora-root' is not mounted at /" >> /root/RESULT
-fi
-
-root_fstype="$(echo $root_mount | cut -d' ' -f3)"
-if [ $root_fstype != "ext4" ]; then
- echo "*** lvm lv 'fedora-root' does not contain an ext4 fs" >> /root/RESULT
-fi
-
-# verify root entry in /etc/fstab is correct
-root_lv_entry="$(grep ^$root_lv\\s/\\s /etc/fstab)"
-root_uuid_entry="$(grep ^$root_uuid\\s/\\s /etc/fstab)"
-if [ -z "$root_lv_entry" -a -z "$root_uuid_entry" ] ; then
- echo "*** root lv is not the root entry in /etc/fstab" >> /root/RESULT
-fi
-
-# verify size of root lv
-root_lv_size=$(lvs --noheadings -o size --unit=m --nosuffix fedora/root)
-if [ $root_lv_size != "6000.00" ]; then
- echo "*** root lv has incorrect size" >> /root/RESULT
-fi
-
-root_lv="/dev/mapper/fedora-root"
-root_uuid="UUID=$(blkid -o value -s UUID $root_lv)"
-
-# verify root lv is mounted at /mnt/sysimage
-root_mount="$(grep ^$root_lv\\s/\\s /proc/mounts)"
-if [ -z "$root_mount" ]; then
- echo "*** lvm lv 'fedora-root' is not mounted at /" >> /root/RESULT
-fi
-
-home_fstype="$(echo $home_mount | cut -d' ' -f3)"
-if [ $home_fstype != "ext4" ]; then
- echo "*** lvm lv 'fedora-home' does not contain an ext4 fs" >> /home/RESULT
-fi
-
-# verify home entry in /etc/fstab is correct
-home_lv_entry="$(grep ^$home_lv\\s/home\\s /etc/fstab)"
-home_uuid_entry="$(grep ^$home_uuid\\s/home\\s /etc/fstab)"
-if [ -z "$home_lv_entry" -a -z "$home_uuid_entry" ] ; then
- echo "*** home lv is not the home entry in /etc/fstab" >> /home/RESULT
-fi
-
-# verify size of home lv
-home_lv_size=$(lvs --noheadings -o size --unit=m --nosuffix fedora/home)
-if [ $home_lv_size != "1000.00" ]; then
- echo "*** home lv has incorrect size" >> /home/RESULT
-fi
-
-# verify swap on lvm is active
-swap_lv="/dev/mapper/fedora-swap"
-swap_uuid="UUID=$(blkid -o value -s UUID $swap_lv)"
-swap_dm="$(basename $(readlink $swap_lv))"
-if ! grep -q $swap_dm /proc/swaps ; then
- echo "*** lvm lv 'fedora-swap' is not active as swap space" >> /root/RESULT
-fi
-
-# verify swap entry in /etc/fstab is correct
-swap_lv_entry="$(grep ^$swap_lv\\sswap\\s /etc/fstab)"
-swap_uuid_entry="$(grep ^$swap_uuid\\sswap\\s /etc/fstab)"
-if [ -z "$swap_lv_entry" -a -z "$swap_uuid_entry" ] ; then
- echo "*** swap lv is not in /etc/fstab" >> /root/RESULT
-fi
-
-# verify size of swap lv
-swap_lv_size=$(lvs --noheadings -o size --unit=m --nosuffix fedora/swap)
-if [ $swap_lv_size != "500.00" ]; then
- echo "*** swap lv has incorrect size" >> /root/RESULT
-fi
-
-# verify that the thin pool grew at least a bit (some space will get reserved in
-# the VG for the pool to grow even further when needed so don't check any exact
-# value)
-pool_lv_size=$(lvs --noheadings -o size --unit=m --nosuffix fedora/pool | sed -r 's/\s*([0-9]+)\..*/\1/')
-if [ $pool_lv_size -le 7000 ]; then
- echo "*** the thin pool didn't grow at all" >> /root/RESULT
-fi
-
-if [ ! -e /root/RESULT ]; then
- echo SUCCESS > /root/RESULT
-fi
-
-%end
diff --git a/tests/kickstart_tests/lvm-thinp-2.ks.in b/tests/kickstart_tests/lvm-thinp-2.ks.in
new file mode 100644
index 0000000..a17399b
--- /dev/null
+++ b/tests/kickstart_tests/lvm-thinp-2.ks.in
@@ -0,0 +1,114 @@
+#version=DEVEL
+url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
+install
+network --bootproto=dhcp
+
+bootloader --timeout=1
+zerombr
+clearpart --all --initlabel
+part /boot --fstype=ext4 --size=500
+part pv.1 --fstype=lvmpv --size=9004
+volgroup fedora pv.1
+logvol swap --name=swap --vgname=fedora --size=500 --fstype=swap
+logvol none --name=pool --vgname=fedora --size=7000 --thinpool --grow
+logvol / --name=root --vgname=fedora --size=6000 --thin --poolname=pool --fstype=ext4
+logvol /home --name=home --vgname=fedora --size=1000 --thin --poolname=pool --fstype=ext4
+
+keyboard us
+lang en_US.UTF-8
+timezone America/New_York --utc
+rootpw testcase
+shutdown
+
+%packages
+%end
+
+%post
+root_lv="/dev/mapper/fedora-root"
+root_uuid="UUID=$(blkid -o value -s UUID $root_lv)"
+
+# verify root lv is mounted at /mnt/sysimage
+root_mount="$(grep ^$root_lv\\s/\\s /proc/mounts)"
+if [ -z "$root_mount" ]; then
+ echo "*** lvm lv 'fedora-root' is not mounted at /" >> /root/RESULT
+fi
+
+root_fstype="$(echo $root_mount | cut -d' ' -f3)"
+if [ $root_fstype != "ext4" ]; then
+ echo "*** lvm lv 'fedora-root' does not contain an ext4 fs" >> /root/RESULT
+fi
+
+# verify root entry in /etc/fstab is correct
+root_lv_entry="$(grep ^$root_lv\\s/\\s /etc/fstab)"
+root_uuid_entry="$(grep ^$root_uuid\\s/\\s /etc/fstab)"
+if [ -z "$root_lv_entry" -a -z "$root_uuid_entry" ] ; then
+ echo "*** root lv is not the root entry in /etc/fstab" >> /root/RESULT
+fi
+
+# verify size of root lv
+root_lv_size=$(lvs --noheadings -o size --unit=m --nosuffix fedora/root)
+if [ $root_lv_size != "6000.00" ]; then
+ echo "*** root lv has incorrect size" >> /root/RESULT
+fi
+
+root_lv="/dev/mapper/fedora-root"
+root_uuid="UUID=$(blkid -o value -s UUID $root_lv)"
+
+# verify root lv is mounted at /mnt/sysimage
+root_mount="$(grep ^$root_lv\\s/\\s /proc/mounts)"
+if [ -z "$root_mount" ]; then
+ echo "*** lvm lv 'fedora-root' is not mounted at /" >> /root/RESULT
+fi
+
+home_fstype="$(echo $home_mount | cut -d' ' -f3)"
+if [ $home_fstype != "ext4" ]; then
+ echo "*** lvm lv 'fedora-home' does not contain an ext4 fs" >> /home/RESULT
+fi
+
+# verify home entry in /etc/fstab is correct
+home_lv_entry="$(grep ^$home_lv\\s/home\\s /etc/fstab)"
+home_uuid_entry="$(grep ^$home_uuid\\s/home\\s /etc/fstab)"
+if [ -z "$home_lv_entry" -a -z "$home_uuid_entry" ] ; then
+ echo "*** home lv is not the home entry in /etc/fstab" >> /home/RESULT
+fi
+
+# verify size of home lv
+home_lv_size=$(lvs --noheadings -o size --unit=m --nosuffix fedora/home)
+if [ $home_lv_size != "1000.00" ]; then
+ echo "*** home lv has incorrect size" >> /home/RESULT
+fi
+
+# verify swap on lvm is active
+swap_lv="/dev/mapper/fedora-swap"
+swap_uuid="UUID=$(blkid -o value -s UUID $swap_lv)"
+swap_dm="$(basename $(readlink $swap_lv))"
+if ! grep -q $swap_dm /proc/swaps ; then
+ echo "*** lvm lv 'fedora-swap' is not active as swap space" >> /root/RESULT
+fi
+
+# verify swap entry in /etc/fstab is correct
+swap_lv_entry="$(grep ^$swap_lv\\sswap\\s /etc/fstab)"
+swap_uuid_entry="$(grep ^$swap_uuid\\sswap\\s /etc/fstab)"
+if [ -z "$swap_lv_entry" -a -z "$swap_uuid_entry" ] ; then
+ echo "*** swap lv is not in /etc/fstab" >> /root/RESULT
+fi
+
+# verify size of swap lv
+swap_lv_size=$(lvs --noheadings -o size --unit=m --nosuffix fedora/swap)
+if [ $swap_lv_size != "500.00" ]; then
+ echo "*** swap lv has incorrect size" >> /root/RESULT
+fi
+
+# verify that the thin pool grew at least a bit (some space will get reserved in
+# the VG for the pool to grow even further when needed so don't check any exact
+# value)
+pool_lv_size=$(lvs --noheadings -o size --unit=m --nosuffix fedora/pool | sed -r 's/\s*([0-9]+)\..*/\1/')
+if [ $pool_lv_size -le 7000 ]; then
+ echo "*** the thin pool didn't grow at all" >> /root/RESULT
+fi
+
+if [ ! -e /root/RESULT ]; then
+ echo SUCCESS > /root/RESULT
+fi
+
+%end
diff --git a/tests/kickstart_tests/nfs-repo-and-addon.ks b/tests/kickstart_tests/nfs-repo-and-addon.ks
deleted file mode 100644
index a37530f..0000000
--- a/tests/kickstart_tests/nfs-repo-and-addon.ks
+++ /dev/null
@@ -1,106 +0,0 @@
-nfs --server=NFS-SERVER --dir=NFS-PATH
-
-# The addon repos are setup with the following packages:
-# NFS:
-# - testpkg-nfs-core, to be installed with @core
-# - testpkg-nfs-addon, to be installed because we ask for it
-# - testpkg-share1, contains a file /usr/share/testpkg-1/nfs. To be installed by excluding
-# the HTTP version, despite http's lower cost.
-# - testpkg-share2, contains a file /usr/share/testpkg-2/nfs. To be excluded via cost
-# HTTP:
-# - testpkg-http-core, to be installed with @core
-# - testpkg-http-addon, to be installed because we ask for it
-# - testpkg-share1, contains a file /usr/share/testpkg-1/http. To be excluded via excludepkgs.
-# - testpkg-share2, contains a file /usr/share/testpkg-2/http. To be included because the cost
-# is lower.
-repo --name=kstest-nfs --baseurl=NFS-ADDON-REPO --cost=50
-repo --name=kstest-http --baseurl=HTTP-ADDON-REPO --cost=25 --excludepkgs=testpkg-share1 --install
-
-install
-network --bootproto=dhcp
-
-bootloader --timeout=1
-zerombr
-clearpart --all
-autopart
-
-keyboard us
-lang en
-timezone America/New_York
-rootpw qweqwe
-shutdown
-
-%packages
-testpkg-nfs-addon
-testpkg-http-addon
-testpkg-share1
-testpkg-share2
-%end
-
-%post
-status=0
-
-# Check that all the packages were installed
-for pkg in testpkg-nfs-core testpkg-nfs-addon testpkg-http-core testpkg-http-addon \
- testpkg-share1 testpkg-share2 ; do
- if ! rpm -q $pkg ; then
- echo "*** package $pkg was not installed" >> /root/RESULT
- status=1
- fi
-done
-
-if [[ "${status}" -eq 0 ]]; then
- # Check that the right packages were installed
- if [[ -e /usr/share/testpkg-1/http ]]; then
- echo "*** wrong version of testpkg-share1 was installed" >> /root/RESULT
- status=1
- fi
-
- if [[ -e /usr/share/testpkg-2/nfs ]]; then
- echo "*** wrong version of testpkg-share2 was installed" >> /root/RESULT
- status=1
- fi
-
- # Double check that the correct marker files are in place
- if [[ ! -e /usr/share/testpkg-1/nfs ]]; then
- echo "*** unable to find marker for testpkg-share1" >> /root/RESULT
- status=1
- fi
-
- if [[ ! -e /usr/share/testpkg-2/http ]]; then
- echo "*** unable to find marker for testpkg-share2" >> /root/RESULT
- status=1
- fi
-fi
-
-repofile=/etc/yum.repos.d/kstest-http.repo
-if [[ "${status}" -eq 0 ]]; then
- # Check that the repo file got installed
- if [[ ! -e $repofile ]]; then
- echo "*** kstest-http.repo was not installed" >> /root/RESULT
- status=1
- # Check that it has all the options
- elif ! grep -q '^baseurl=HTTP-ADDON-REPO$' $repofile ; then
- echo "*** kstest-http.repo is missing the baseurl" >> /root/RESULT
- status=1
- elif ! grep -q '^cost=25$' $repofile; then
- echo "*** kstest-http.repo is missing the cost" >> /root/RESULT
- status=1
- elif ! grep -q '^exclude=testpkg-share1$' $repofile; then
- echo "*** kstest-http.repo is missing the exclude" >> /root/RESULT
- status=1
- fi
-fi
-
-if [[ "${status}" -eq 0 ]]; then
- # Check that the NFS repo file was not installed
- if [[ -e /etc/yum.repos.d/kstest-nfs.repo ]]; then
- echo "*** kstest-nfs.repo was installed with --install" >> /root/RESULT
- status=1
- fi
-fi
-
-if [[ "${status}" -eq 0 ]]; then
- echo SUCCESS > /root/RESULT
-fi
-%end
diff --git a/tests/kickstart_tests/nfs-repo-and-addon.ks.in b/tests/kickstart_tests/nfs-repo-and-addon.ks.in
new file mode 100644
index 0000000..a37530f
--- /dev/null
+++ b/tests/kickstart_tests/nfs-repo-and-addon.ks.in
@@ -0,0 +1,106 @@
+nfs --server=NFS-SERVER --dir=NFS-PATH
+
+# The addon repos are setup with the following packages:
+# NFS:
+# - testpkg-nfs-core, to be installed with @core
+# - testpkg-nfs-addon, to be installed because we ask for it
+# - testpkg-share1, contains a file /usr/share/testpkg-1/nfs. To be installed by excluding
+# the HTTP version, despite http's lower cost.
+# - testpkg-share2, contains a file /usr/share/testpkg-2/nfs. To be excluded via cost
+# HTTP:
+# - testpkg-http-core, to be installed with @core
+# - testpkg-http-addon, to be installed because we ask for it
+# - testpkg-share1, contains a file /usr/share/testpkg-1/http. To be excluded via excludepkgs.
+# - testpkg-share2, contains a file /usr/share/testpkg-2/http. To be included because the cost
+# is lower.
+repo --name=kstest-nfs --baseurl=NFS-ADDON-REPO --cost=50
+repo --name=kstest-http --baseurl=HTTP-ADDON-REPO --cost=25 --excludepkgs=testpkg-share1 --install
+
+install
+network --bootproto=dhcp
+
+bootloader --timeout=1
+zerombr
+clearpart --all
+autopart
+
+keyboard us
+lang en
+timezone America/New_York
+rootpw qweqwe
+shutdown
+
+%packages
+testpkg-nfs-addon
+testpkg-http-addon
+testpkg-share1
+testpkg-share2
+%end
+
+%post
+status=0
+
+# Check that all the packages were installed
+for pkg in testpkg-nfs-core testpkg-nfs-addon testpkg-http-core testpkg-http-addon \
+ testpkg-share1 testpkg-share2 ; do
+ if ! rpm -q $pkg ; then
+ echo "*** package $pkg was not installed" >> /root/RESULT
+ status=1
+ fi
+done
+
+if [[ "${status}" -eq 0 ]]; then
+ # Check that the right packages were installed
+ if [[ -e /usr/share/testpkg-1/http ]]; then
+ echo "*** wrong version of testpkg-share1 was installed" >> /root/RESULT
+ status=1
+ fi
+
+ if [[ -e /usr/share/testpkg-2/nfs ]]; then
+ echo "*** wrong version of testpkg-share2 was installed" >> /root/RESULT
+ status=1
+ fi
+
+ # Double check that the correct marker files are in place
+ if [[ ! -e /usr/share/testpkg-1/nfs ]]; then
+ echo "*** unable to find marker for testpkg-share1" >> /root/RESULT
+ status=1
+ fi
+
+ if [[ ! -e /usr/share/testpkg-2/http ]]; then
+ echo "*** unable to find marker for testpkg-share2" >> /root/RESULT
+ status=1
+ fi
+fi
+
+repofile=/etc/yum.repos.d/kstest-http.repo
+if [[ "${status}" -eq 0 ]]; then
+ # Check that the repo file got installed
+ if [[ ! -e $repofile ]]; then
+ echo "*** kstest-http.repo was not installed" >> /root/RESULT
+ status=1
+ # Check that it has all the options
+ elif ! grep -q '^baseurl=HTTP-ADDON-REPO$' $repofile ; then
+ echo "*** kstest-http.repo is missing the baseurl" >> /root/RESULT
+ status=1
+ elif ! grep -q '^cost=25$' $repofile; then
+ echo "*** kstest-http.repo is missing the cost" >> /root/RESULT
+ status=1
+ elif ! grep -q '^exclude=testpkg-share1$' $repofile; then
+ echo "*** kstest-http.repo is missing the exclude" >> /root/RESULT
+ status=1
+ fi
+fi
+
+if [[ "${status}" -eq 0 ]]; then
+ # Check that the NFS repo file was not installed
+ if [[ -e /etc/yum.repos.d/kstest-nfs.repo ]]; then
+ echo "*** kstest-nfs.repo was installed with --install" >> /root/RESULT
+ status=1
+ fi
+fi
+
+if [[ "${status}" -eq 0 ]]; then
+ echo SUCCESS > /root/RESULT
+fi
+%end
diff --git a/tests/kickstart_tests/ntp-pools.ks b/tests/kickstart_tests/ntp-pools.ks
deleted file mode 100644
index 54f5798..0000000
--- a/tests/kickstart_tests/ntp-pools.ks
+++ /dev/null
@@ -1,38 +0,0 @@
-#version=DEVEL
-url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
-install
-network --bootproto=dhcp
-
-# use ntp.cesnet.cz as an NTP server and 0.pool.ntp.org as an NTP pool
-timezone --utc --ntpservers=ntp.cesnet.cz,0.pool.ntp.org,0.pool.ntp.org,0.pool.ntp.org,0.pool.ntp.org Europe/Prague
-
-bootloader --timeout=1
-zerombr
-clearpart --all --initlabel
-autopart
-
-keyboard us
-lang en_US.UTF-8
-timezone America/New_York --utc
-rootpw testcase
-shutdown
-
-%packages --default
-%end
-
-%post
-# server 0.fedora.pool.ntp.org iburst
-egrep '^\s*server\s*ntp\.cesnet\.cz\s*[a-zA-Z]+\s*$' /etc/chrony.conf
-if [ $? -ne 0 ]; then
- echo '*** ntp.cesnet.cz not configured as an NTP server' >> /root/RESULT
-fi
-
-egrep '^\s*pool\s*0\.pool\.ntp\.org\s*[a-zA-Z]+\s*$' /etc/chrony.conf
-if [ $? -ne 0 ]; then
- echo '*** 0.pool.ntp.org not configured as an NTP pool' >> /root/RESULT
-fi
-
-if [ ! -e /root/RESULT ]; then
- echo SUCCESS > /root/RESULT
-fi
-%end
diff --git a/tests/kickstart_tests/ntp-pools.ks.in b/tests/kickstart_tests/ntp-pools.ks.in
new file mode 100644
index 0000000..54f5798
--- /dev/null
+++ b/tests/kickstart_tests/ntp-pools.ks.in
@@ -0,0 +1,38 @@
+#version=DEVEL
+url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
+install
+network --bootproto=dhcp
+
+# use ntp.cesnet.cz as an NTP server and 0.pool.ntp.org as an NTP pool
+timezone --utc --ntpservers=ntp.cesnet.cz,0.pool.ntp.org,0.pool.ntp.org,0.pool.ntp.org,0.pool.ntp.org Europe/Prague
+
+bootloader --timeout=1
+zerombr
+clearpart --all --initlabel
+autopart
+
+keyboard us
+lang en_US.UTF-8
+timezone America/New_York --utc
+rootpw testcase
+shutdown
+
+%packages --default
+%end
+
+%post
+# server 0.fedora.pool.ntp.org iburst
+egrep '^\s*server\s*ntp\.cesnet\.cz\s*[a-zA-Z]+\s*$' /etc/chrony.conf
+if [ $? -ne 0 ]; then
+ echo '*** ntp.cesnet.cz not configured as an NTP server' >> /root/RESULT
+fi
+
+egrep '^\s*pool\s*0\.pool\.ntp\.org\s*[a-zA-Z]+\s*$' /etc/chrony.conf
+if [ $? -ne 0 ]; then
+ echo '*** 0.pool.ntp.org not configured as an NTP pool' >> /root/RESULT
+fi
+
+if [ ! -e /root/RESULT ]; then
+ echo SUCCESS > /root/RESULT
+fi
+%end
diff --git a/tests/kickstart_tests/packages-and-groups-1.ks b/tests/kickstart_tests/packages-and-groups-1.ks
deleted file mode 100644
index baf36be..0000000
--- a/tests/kickstart_tests/packages-and-groups-1.ks
+++ /dev/null
@@ -1,73 +0,0 @@
-url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
-install
-network --bootproto=dhcp
-
-bootloader --timeout=1
-zerombr
-clearpart --all
-autopart
-
-keyboard us
-lang en
-timezone America/New_York
-rootpw qweqwe
-shutdown
-
-%packages
-@^xfce-desktop-environment
-
-# (1) Test that you can remove a package that's part of a group
-@c-development
--valgrind
-
-# (2) Test that you can add and then remove the same package.
-qemu-kvm
--qemu-kvm
-
-# (3) Test that you can add packages with a glob.
-kacst*
-
-# (4) Test that you can remove packages with a glob.
--ibus*
-%end
-
-%post
-# We don't have a way of determining if a group/env is installed or not.
-# These sentinel packages will have to do.
-
-# Testing #1 - gcc should be installed, but not valgrind
-rpm -q gcc
-if [[ $? != 0 ]]; then
- echo '*** c-development group was not installed' > /root/RESULT
- exit 1
-fi
-
-rpm -q valgrind
-if [[ $? == 0 ]]; then
- echo '*** valgrind package should not have been installed' > /root/RESULT
- exit 1
-fi
-
-# Testing #2 - qemu-kvm should not be installed.
-rpm -q qemu-kvm
-if [[ $? == 0 ]]; then
- echo '*** qemu-kvm package should not have been installed' > /root/RESULT
- exit 1
-fi
-
-# Testing #3 - kacst font stuff should be installed.
-count=$(rpm -qa kacst\* | wc -l)
-if [[ $count -lt 5 ]]; then
- echo '*** kacst glob was not installed' > /root/RESULT
- exit 1
-fi
-
-# Testing #4 - ibus stuff should not be installed.
-count=$(rpm -qa ibus\* | wc -l)
-if [[ $count -gt 0 ]]; then
- echo '*** ibus glob should not have been installed' > /root/RESULT
- exit 1
-fi
-
-echo SUCCESS > /root/RESULT
-%end
diff --git a/tests/kickstart_tests/packages-and-groups-1.ks.in b/tests/kickstart_tests/packages-and-groups-1.ks.in
new file mode 100644
index 0000000..baf36be
--- /dev/null
+++ b/tests/kickstart_tests/packages-and-groups-1.ks.in
@@ -0,0 +1,73 @@
+url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
+install
+network --bootproto=dhcp
+
+bootloader --timeout=1
+zerombr
+clearpart --all
+autopart
+
+keyboard us
+lang en
+timezone America/New_York
+rootpw qweqwe
+shutdown
+
+%packages
+@^xfce-desktop-environment
+
+# (1) Test that you can remove a package that's part of a group
+@c-development
+-valgrind
+
+# (2) Test that you can add and then remove the same package.
+qemu-kvm
+-qemu-kvm
+
+# (3) Test that you can add packages with a glob.
+kacst*
+
+# (4) Test that you can remove packages with a glob.
+-ibus*
+%end
+
+%post
+# We don't have a way of determining if a group/env is installed or not.
+# These sentinel packages will have to do.
+
+# Testing #1 - gcc should be installed, but not valgrind
+rpm -q gcc
+if [[ $? != 0 ]]; then
+ echo '*** c-development group was not installed' > /root/RESULT
+ exit 1
+fi
+
+rpm -q valgrind
+if [[ $? == 0 ]]; then
+ echo '*** valgrind package should not have been installed' > /root/RESULT
+ exit 1
+fi
+
+# Testing #2 - qemu-kvm should not be installed.
+rpm -q qemu-kvm
+if [[ $? == 0 ]]; then
+ echo '*** qemu-kvm package should not have been installed' > /root/RESULT
+ exit 1
+fi
+
+# Testing #3 - kacst font stuff should be installed.
+count=$(rpm -qa kacst\* | wc -l)
+if [[ $count -lt 5 ]]; then
+ echo '*** kacst glob was not installed' > /root/RESULT
+ exit 1
+fi
+
+# Testing #4 - ibus stuff should not be installed.
+count=$(rpm -qa ibus\* | wc -l)
+if [[ $count -gt 0 ]]; then
+ echo '*** ibus glob should not have been installed' > /root/RESULT
+ exit 1
+fi
+
+echo SUCCESS > /root/RESULT
+%end
diff --git a/tests/kickstart_tests/packages-default.ks b/tests/kickstart_tests/packages-default.ks
deleted file mode 100644
index e999464..0000000
--- a/tests/kickstart_tests/packages-default.ks
+++ /dev/null
@@ -1,27 +0,0 @@
-#version=DEVEL
-url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
-install
-network --bootproto=dhcp
-
-bootloader --timeout=1
-zerombr
-clearpart --all --initlabel
-autopart
-
-keyboard us
-lang en_US.UTF-8
-timezone America/New_York --utc
-rootpw testcase
-shutdown
-
-%packages --default
-%end
-
-%post
-rpm -q fedora-release
-if [ $? -eq 0 ]; then
- echo SUCCESS > /root/RESULT
-else
- echo '*** fedora-release package was not installed' > /root/RESULT
-fi
-%end
diff --git a/tests/kickstart_tests/packages-default.ks.in b/tests/kickstart_tests/packages-default.ks.in
new file mode 100644
index 0000000..e999464
--- /dev/null
+++ b/tests/kickstart_tests/packages-default.ks.in
@@ -0,0 +1,27 @@
+#version=DEVEL
+url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
+install
+network --bootproto=dhcp
+
+bootloader --timeout=1
+zerombr
+clearpart --all --initlabel
+autopart
+
+keyboard us
+lang en_US.UTF-8
+timezone America/New_York --utc
+rootpw testcase
+shutdown
+
+%packages --default
+%end
+
+%post
+rpm -q fedora-release
+if [ $? -eq 0 ]; then
+ echo SUCCESS > /root/RESULT
+else
+ echo '*** fedora-release package was not installed' > /root/RESULT
+fi
+%end
diff --git a/tests/kickstart_tests/packages-excludedocs.ks b/tests/kickstart_tests/packages-excludedocs.ks
deleted file mode 100644
index 133164e..0000000
--- a/tests/kickstart_tests/packages-excludedocs.ks
+++ /dev/null
@@ -1,48 +0,0 @@
-#version=DEVEL
-url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
-install
-network --bootproto=dhcp
-
-bootloader --timeout=1
-zerombr
-clearpart --all --initlabel
-autopart
-
-keyboard us
-lang en_US.UTF-8
-timezone America/New_York --utc
-rootpw testcase
-shutdown
-
-%packages --excludedocs
-@container-management
-@core
-@domain-client
-@hardware-support
-@headless-management
-@server-product
-@standard
-%end
-
-%post
-if [ ! -d /usr/share/doc ]; then
- echo SUCCESS > /root/RESULT
-else
- cd /usr/share/doc
- count=$(find . -type f | grep -v -E "^\.$" | wc -l)
-
- if [ $count -eq 0 ]; then
- dirs=$(find . -type d | grep -v -E "^\.$" | wc -l)
-
- if [ $dirs -eq 0 ]; then
- echo SUCCESS > /root/result
- else
- echo "SUCCESS - but directories still exist under /usr/share/doc" > /root/RESULT
- fi
- else
- echo "there are files in /usr/share/doc" > /root/RESULT
- echo >> /root/RESULT
- find /usr/share/doc >> /root/RESULT
- fi
-fi
-%end
diff --git a/tests/kickstart_tests/packages-excludedocs.ks.in b/tests/kickstart_tests/packages-excludedocs.ks.in
new file mode 100644
index 0000000..133164e
--- /dev/null
+++ b/tests/kickstart_tests/packages-excludedocs.ks.in
@@ -0,0 +1,48 @@
+#version=DEVEL
+url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
+install
+network --bootproto=dhcp
+
+bootloader --timeout=1
+zerombr
+clearpart --all --initlabel
+autopart
+
+keyboard us
+lang en_US.UTF-8
+timezone America/New_York --utc
+rootpw testcase
+shutdown
+
+%packages --excludedocs
+@container-management
+@core
+@domain-client
+@hardware-support
+@headless-management
+@server-product
+@standard
+%end
+
+%post
+if [ ! -d /usr/share/doc ]; then
+ echo SUCCESS > /root/RESULT
+else
+ cd /usr/share/doc
+ count=$(find . -type f | grep -v -E "^\.$" | wc -l)
+
+ if [ $count -eq 0 ]; then
+ dirs=$(find . -type d | grep -v -E "^\.$" | wc -l)
+
+ if [ $dirs -eq 0 ]; then
+ echo SUCCESS > /root/result
+ else
+ echo "SUCCESS - but directories still exist under /usr/share/doc" > /root/RESULT
+ fi
+ else
+ echo "there are files in /usr/share/doc" > /root/RESULT
+ echo >> /root/RESULT
+ find /usr/share/doc >> /root/RESULT
+ fi
+fi
+%end
diff --git a/tests/kickstart_tests/packages-ignoremissing.ks b/tests/kickstart_tests/packages-ignoremissing.ks
deleted file mode 100644
index c919793..0000000
--- a/tests/kickstart_tests/packages-ignoremissing.ks
+++ /dev/null
@@ -1,24 +0,0 @@
-#version=DEVEL
-url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
-install
-network --bootproto=dhcp
-
-bootloader --timeout=1
-zerombr
-clearpart --all --initlabel
-autopart
-
-keyboard us
-lang en_US.UTF-8
-timezone America/New_York --utc
-rootpw testcase
-shutdown
-
-%packages --ignoremissing
-fake-package-name
-%end
-
-%post
-# If we made it this far, assume it's a success
-echo SUCCESS > /root/RESULT
-%end
diff --git a/tests/kickstart_tests/packages-ignoremissing.ks.in b/tests/kickstart_tests/packages-ignoremissing.ks.in
new file mode 100644
index 0000000..c919793
--- /dev/null
+++ b/tests/kickstart_tests/packages-ignoremissing.ks.in
@@ -0,0 +1,24 @@
+#version=DEVEL
+url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
+install
+network --bootproto=dhcp
+
+bootloader --timeout=1
+zerombr
+clearpart --all --initlabel
+autopart
+
+keyboard us
+lang en_US.UTF-8
+timezone America/New_York --utc
+rootpw testcase
+shutdown
+
+%packages --ignoremissing
+fake-package-name
+%end
+
+%post
+# If we made it this far, assume it's a success
+echo SUCCESS > /root/RESULT
+%end
diff --git a/tests/kickstart_tests/packages-multilib.ks b/tests/kickstart_tests/packages-multilib.ks
deleted file mode 100644
index 7f1afbf..0000000
--- a/tests/kickstart_tests/packages-multilib.ks
+++ /dev/null
@@ -1,34 +0,0 @@
-#version=DEVEL
-url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
-install
-network --bootproto=dhcp
-
-bootloader --timeout=1
-zerombr
-clearpart --all --initlabel
-autopart
-
-keyboard us
-lang en_US.UTF-8
-timezone America/New_York --utc
-rootpw testcase
-shutdown
-
-%packages --multilib
-@container-management
-@core
-@domain-client
-@hardware-support
-@headless-management
-@server-product
-@standard
-%end
-
-%post
-rpm -q fedora-release
-if [ -e /usr/lib/libc.so.6 ]; then
- echo SUCCESS > /root/RESULT
-else
- echo '*** no 32-bit libc package installed' > /root/RESULT
-fi
-%end
diff --git a/tests/kickstart_tests/packages-multilib.ks.in b/tests/kickstart_tests/packages-multilib.ks.in
new file mode 100644
index 0000000..7f1afbf
--- /dev/null
+++ b/tests/kickstart_tests/packages-multilib.ks.in
@@ -0,0 +1,34 @@
+#version=DEVEL
+url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
+install
+network --bootproto=dhcp
+
+bootloader --timeout=1
+zerombr
+clearpart --all --initlabel
+autopart
+
+keyboard us
+lang en_US.UTF-8
+timezone America/New_York --utc
+rootpw testcase
+shutdown
+
+%packages --multilib
+@container-management
+@core
+@domain-client
+@hardware-support
+@headless-management
+@server-product
+@standard
+%end
+
+%post
+rpm -q fedora-release
+if [ -e /usr/lib/libc.so.6 ]; then
+ echo SUCCESS > /root/RESULT
+else
+ echo '*** no 32-bit libc package installed' > /root/RESULT
+fi
+%end
diff --git a/tests/kickstart_tests/pre-install.ks b/tests/kickstart_tests/pre-install.ks
deleted file mode 100644
index f52d424..0000000
--- a/tests/kickstart_tests/pre-install.ks
+++ /dev/null
@@ -1,64 +0,0 @@
-url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
-
-install
-
-network --bootproto=dhcp
-
-bootloader --timeout=1
-zerombr
-
-clearpart --all --initlabel
-autopart
-
-keyboard us
-lang en
-timezone America/New_York
-
-rootpw qweqwe
-
-shutdown
-
-%pre-install
-# TEST setting up /etc/passwd before package installation
-mkdir $ANA_INSTALL_PATH/etc
-cat > $ANA_INSTALL_PATH/etc/passwd << EOF
-root:x:0:0:root:/root:/bin/bash
-bin:x:1:1:bin:/bin:/sbin/nologin
-daemon:x:2:2:daemon:/sbin:/sbin/nologin
-adm:x:3:4:adm:/var/adm:/sbin/nologin
-lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin
-sync:x:5:0:sync:/sbin:/bin/sync
-shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown
-halt:x:7:0:halt:/sbin:/sbin/halt
-mail:x:8:12:mail:/var/spool/mail:/sbin/nologin
-operator:x:11:0:operator:/root:/sbin/nologin
-games:x:12:100:games:/usr/games:/sbin/nologin
-ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin
-nobody:x:99:99:Nobody:/:/sbin/nologin
-polipo:x:600:600:Polipo Web Proxy:/var/cache/polipo:/sbin/nologin
-lighttpd:x:601:601:lighttpd web server:/var/www/lighttpd:/sbin/nologin
-EOF
-%end
-
-%packages
-polipo
-lighttpd
-%end
-
-%post
-## TEST pre-install
-grep "polipo:x:600:600" /etc/passwd
-if [[ $? -ne 0 ]]; then
- echo "*** pre-install failed, wrong polipo entry ***" >> /root/RESULT
-fi
-
-grep "lighttpd:x:601:601" /etc/passwd
-if [[ $? -ne 0 ]]; then
- echo "*** pre-install failed, wrong lighttpd entry ***" >> /root/RESULT
-fi
-
-# Final check
-if [[ ! -e /root/RESULT ]]; then
- echo SUCCESS > /root/RESULT
-fi
-%end
diff --git a/tests/kickstart_tests/pre-install.ks.in b/tests/kickstart_tests/pre-install.ks.in
new file mode 100644
index 0000000..f52d424
--- /dev/null
+++ b/tests/kickstart_tests/pre-install.ks.in
@@ -0,0 +1,64 @@
+url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
+
+install
+
+network --bootproto=dhcp
+
+bootloader --timeout=1
+zerombr
+
+clearpart --all --initlabel
+autopart
+
+keyboard us
+lang en
+timezone America/New_York
+
+rootpw qweqwe
+
+shutdown
+
+%pre-install
+# TEST setting up /etc/passwd before package installation
+mkdir $ANA_INSTALL_PATH/etc
+cat > $ANA_INSTALL_PATH/etc/passwd << EOF
+root:x:0:0:root:/root:/bin/bash
+bin:x:1:1:bin:/bin:/sbin/nologin
+daemon:x:2:2:daemon:/sbin:/sbin/nologin
+adm:x:3:4:adm:/var/adm:/sbin/nologin
+lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin
+sync:x:5:0:sync:/sbin:/bin/sync
+shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown
+halt:x:7:0:halt:/sbin:/sbin/halt
+mail:x:8:12:mail:/var/spool/mail:/sbin/nologin
+operator:x:11:0:operator:/root:/sbin/nologin
+games:x:12:100:games:/usr/games:/sbin/nologin
+ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin
+nobody:x:99:99:Nobody:/:/sbin/nologin
+polipo:x:600:600:Polipo Web Proxy:/var/cache/polipo:/sbin/nologin
+lighttpd:x:601:601:lighttpd web server:/var/www/lighttpd:/sbin/nologin
+EOF
+%end
+
+%packages
+polipo
+lighttpd
+%end
+
+%post
+## TEST pre-install
+grep "polipo:x:600:600" /etc/passwd
+if [[ $? -ne 0 ]]; then
+ echo "*** pre-install failed, wrong polipo entry ***" >> /root/RESULT
+fi
+
+grep "lighttpd:x:601:601" /etc/passwd
+if [[ $? -ne 0 ]]; then
+ echo "*** pre-install failed, wrong lighttpd entry ***" >> /root/RESULT
+fi
+
+# Final check
+if [[ ! -e /root/RESULT ]]; then
+ echo SUCCESS > /root/RESULT
+fi
+%end
diff --git a/tests/kickstart_tests/proxy-auth.ks b/tests/kickstart_tests/proxy-auth.ks
deleted file mode 100644
index 874dd45..0000000
--- a/tests/kickstart_tests/proxy-auth.ks
+++ /dev/null
@@ -1,87 +0,0 @@
-url --url=http://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/$basearch/os/ --proxy=http://anaconda:qweqwe@127.0.0.1:8080
-repo --name=kstest-http --baseurl=HTTP-ADDON-REPO --proxy=http://anaconda:qweqwe@127.0.0.1:8080 --install
-install
-network --bootproto=dhcp
-
-bootloader --timeout=1
-zerombr
-clearpart --all
-autopart
-
-keyboard us
-lang en
-timezone America/New_York
-rootpw qweqwe
-shutdown
-
-# Install @core, which will also pull in testpkg-http-core from the addon repo
-%packages
-%end
-
-# Start the proxy server
-%include scripts/proxy-common.ks
-
-# Set a password on the proxy server
-%pre
-echo 'anaconda:qweqwe' > /tmp/proxy.password
-%end
-
-%post --nochroot
-# Look for the following as evidence that a proxy was used:
-# a .treeinfo request
-grep -q '\.treeinfo$' /tmp/proxy.log
-if [[ $? -ne 0 ]]; then
- echo '.treeinfo request was not proxied' >> $ANA_INSTALL_PATH/root/RESULT
-fi
-
-# primary.xml from the repodata
-grep -q 'repodata/.*primary.xml' /tmp/proxy.log
-if [[ $? -ne 0 ]]; then
- echo 'repodata requests were not provxied' >> $ANA_INSTALL_PATH/root/RESULT
-fi
-
-# the kernel package from the Fedora repo
-grep -q 'kernel-.*\.rpm' /tmp/proxy.log
-if [[ $? -ne 0 ]]; then
- echo 'base repo package requests were not proxied' >> $ANA_INSTALL_PATH/root/RESULT
-fi
-
-# testpkg-http-core from the addon repo
-grep -q 'testpkg-http-core.*\.rpm' /tmp/proxy.log
-if [[ $? -ne 0 ]]; then
- echo 'addon repo package requests were not proxied' >> $ANA_INSTALL_PATH/root/RESULT
-fi
-
-# Check that the addon repo file was installed
-if [[ ! -f $ANA_INSTALL_PATH/etc/yum.repos.d/kstest-http.repo ]]; then
- echo 'kstest-http.repo does not exist' >> $ANA_INSTALL_PATH/root/RESULT
-fi
-
-# Check that the proxy configuration was written to the repo file
-grep -q 'proxy=http://anaconda:qweqwe@127.0.0.1:8080' $ANA_INSTALL_PATH/etc/yum.repos.d/kstest-http.repo
-if [[ $? -ne 0 ]]; then
- echo 'kstest-http.repo does not contain proxy information' >> $ANA_INSTALL_PATH/root/RESULT
-fi
-
-# Check that the installed repo file is usable
-# dnf exits with 0 even if something goes wrong, so do a repoquery and look for
-# the package in the output
-chroot $ANA_INSTALL_PATH \
- dnf --disablerepo=\* --enablerepo=kstest-http --quiet repoquery testpkg-http-core 2>/dev/null | \
- grep -q 'testpkg-http-core'
-if [[ $? -ne 0 ]]; then
- echo 'unable to query kstest-http repo' >> $ANA_INSTALL_PATH/root/RESULT
-fi
-
-# Finally, check that the repoquery used the proxy
-tail -1 /tmp/proxy.log | grep -q repodata
-if [[ $? -ne 0 ]]; then
- echo 'repoquery on installed system was not proxied' >> $ANA_INSTALL_PATH/root/RESULT
-fi
-
-# If nothing was written to RESULT, it worked
-if [[ ! -f $ANA_INSTALL_PATH/root/RESULT ]]; then
- echo 'SUCCESS' > $ANA_INSTALL_PATH/root/RESULT
-fi
-
-%end
diff --git a/tests/kickstart_tests/proxy-auth.ks.in b/tests/kickstart_tests/proxy-auth.ks.in
new file mode 100644
index 0000000..874dd45
--- /dev/null
+++ b/tests/kickstart_tests/proxy-auth.ks.in
@@ -0,0 +1,87 @@
+url --url=http://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/$basearch/os/ --proxy=http://anaconda:qweqwe@127.0.0.1:8080
+repo --name=kstest-http --baseurl=HTTP-ADDON-REPO --proxy=http://anaconda:qweqwe@127.0.0.1:8080 --install
+install
+network --bootproto=dhcp
+
+bootloader --timeout=1
+zerombr
+clearpart --all
+autopart
+
+keyboard us
+lang en
+timezone America/New_York
+rootpw qweqwe
+shutdown
+
+# Install @core, which will also pull in testpkg-http-core from the addon repo
+%packages
+%end
+
+# Start the proxy server
+%include scripts/proxy-common.ks
+
+# Set a password on the proxy server
+%pre
+echo 'anaconda:qweqwe' > /tmp/proxy.password
+%end
+
+%post --nochroot
+# Look for the following as evidence that a proxy was used:
+# a .treeinfo request
+grep -q '\.treeinfo$' /tmp/proxy.log
+if [[ $? -ne 0 ]]; then
+ echo '.treeinfo request was not proxied' >> $ANA_INSTALL_PATH/root/RESULT
+fi
+
+# primary.xml from the repodata
+grep -q 'repodata/.*primary.xml' /tmp/proxy.log
+if [[ $? -ne 0 ]]; then
+ echo 'repodata requests were not provxied' >> $ANA_INSTALL_PATH/root/RESULT
+fi
+
+# the kernel package from the Fedora repo
+grep -q 'kernel-.*\.rpm' /tmp/proxy.log
+if [[ $? -ne 0 ]]; then
+ echo 'base repo package requests were not proxied' >> $ANA_INSTALL_PATH/root/RESULT
+fi
+
+# testpkg-http-core from the addon repo
+grep -q 'testpkg-http-core.*\.rpm' /tmp/proxy.log
+if [[ $? -ne 0 ]]; then
+ echo 'addon repo package requests were not proxied' >> $ANA_INSTALL_PATH/root/RESULT
+fi
+
+# Check that the addon repo file was installed
+if [[ ! -f $ANA_INSTALL_PATH/etc/yum.repos.d/kstest-http.repo ]]; then
+ echo 'kstest-http.repo does not exist' >> $ANA_INSTALL_PATH/root/RESULT
+fi
+
+# Check that the proxy configuration was written to the repo file
+grep -q 'proxy=http://anaconda:qweqwe@127.0.0.1:8080' $ANA_INSTALL_PATH/etc/yum.repos.d/kstest-http.repo
+if [[ $? -ne 0 ]]; then
+ echo 'kstest-http.repo does not contain proxy information' >> $ANA_INSTALL_PATH/root/RESULT
+fi
+
+# Check that the installed repo file is usable
+# dnf exits with 0 even if something goes wrong, so do a repoquery and look for
+# the package in the output
+chroot $ANA_INSTALL_PATH \
+ dnf --disablerepo=\* --enablerepo=kstest-http --quiet repoquery testpkg-http-core 2>/dev/null | \
+ grep -q 'testpkg-http-core'
+if [[ $? -ne 0 ]]; then
+ echo 'unable to query kstest-http repo' >> $ANA_INSTALL_PATH/root/RESULT
+fi
+
+# Finally, check that the repoquery used the proxy
+tail -1 /tmp/proxy.log | grep -q repodata
+if [[ $? -ne 0 ]]; then
+ echo 'repoquery on installed system was not proxied' >> $ANA_INSTALL_PATH/root/RESULT
+fi
+
+# If nothing was written to RESULT, it worked
+if [[ ! -f $ANA_INSTALL_PATH/root/RESULT ]]; then
+ echo 'SUCCESS' > $ANA_INSTALL_PATH/root/RESULT
+fi
+
+%end
diff --git a/tests/kickstart_tests/proxy-cmdline.ks b/tests/kickstart_tests/proxy-cmdline.ks
deleted file mode 100644
index 7519724..0000000
--- a/tests/kickstart_tests/proxy-cmdline.ks
+++ /dev/null
@@ -1,41 +0,0 @@
-url --url=http://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/$basearch/os/
-install
-network --bootproto=dhcp
-
-bootloader --timeout=1
-zerombr
-clearpart --all
-autopart
-
-keyboard us
-lang en
-timezone America/New_York
-rootpw qweqwe
-shutdown
-
-# Just install @core
-%packages
-%end
-
-# Run the proxy
-%include scripts/proxy-common.ks
-
-%post --nochroot
-# Look for the following as evidence that a proxy was used:
-# a .treeinfo request
-# primary.xml from the repodata
-# a package. Let's say kernel, there should definitely have been a kernel
-
-if ! grep -q '\.treeinfo$' /tmp/proxy.log; then
- result='.treeinfo request was not proxied'
-elif ! grep -q 'repodata/.*primary.xml' /tmp/proxy.log; then
- result='repodata requests were not proxied'
-elif ! grep -q 'kernel-.*\.rpm' /tmp/proxy.log; then
- result='package requests were not proxied'
-else
- result='SUCCESS'
-fi
-
-# Write the result to the installed /root
-echo "$result" > $ANA_INSTALL_PATH/root/RESULT
-%end
diff --git a/tests/kickstart_tests/proxy-cmdline.ks.in b/tests/kickstart_tests/proxy-cmdline.ks.in
new file mode 100644
index 0000000..7519724
--- /dev/null
+++ b/tests/kickstart_tests/proxy-cmdline.ks.in
@@ -0,0 +1,41 @@
+url --url=http://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/$basearch/os/
+install
+network --bootproto=dhcp
+
+bootloader --timeout=1
+zerombr
+clearpart --all
+autopart
+
+keyboard us
+lang en
+timezone America/New_York
+rootpw qweqwe
+shutdown
+
+# Just install @core
+%packages
+%end
+
+# Run the proxy
+%include scripts/proxy-common.ks
+
+%post --nochroot
+# Look for the following as evidence that a proxy was used:
+# a .treeinfo request
+# primary.xml from the repodata
+# a package. Let's say kernel, there should definitely have been a kernel
+
+if ! grep -q '\.treeinfo$' /tmp/proxy.log; then
+ result='.treeinfo request was not proxied'
+elif ! grep -q 'repodata/.*primary.xml' /tmp/proxy.log; then
+ result='repodata requests were not proxied'
+elif ! grep -q 'kernel-.*\.rpm' /tmp/proxy.log; then
+ result='package requests were not proxied'
+else
+ result='SUCCESS'
+fi
+
+# Write the result to the installed /root
+echo "$result" > $ANA_INSTALL_PATH/root/RESULT
+%end
diff --git a/tests/kickstart_tests/proxy-kickstart.ks b/tests/kickstart_tests/proxy-kickstart.ks
deleted file mode 100644
index 6708c88..0000000
--- a/tests/kickstart_tests/proxy-kickstart.ks
+++ /dev/null
@@ -1,82 +0,0 @@
-url --url=http://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/$basearch/os/ --proxy=127.0.0.1:8080
-repo --name=kstest-http --baseurl=HTTP-ADDON-REPO --proxy=127.0.0.1:8080 --install
-install
-network --bootproto=dhcp
-
-bootloader --timeout=1
-zerombr
-clearpart --all
-autopart
-
-keyboard us
-lang en
-timezone America/New_York
-rootpw qweqwe
-shutdown
-
-# Install @core, which will also pull in testpkg-http-core from the addon repo
-%packages
-%end
-
-# Start the proxy server
-%include scripts/proxy-common.ks
-
-%post --nochroot
-# Look for the following as evidence that a proxy was used:
-# a .treeinfo request
-grep -q '\.treeinfo$' /tmp/proxy.log
-if [[ $? -ne 0 ]]; then
- echo '.treeinfo request was not proxied' >> $ANA_INSTALL_PATH/root/RESULT
-fi
-
-# primary.xml from the repodata
-grep -q 'repodata/.*primary.xml' /tmp/proxy.log
-if [[ $? -ne 0 ]]; then
- echo 'repodata requests were not provxied' >> $ANA_INSTALL_PATH/root/RESULT
-fi
-
-# the kernel package from the Fedora repo
-grep -q 'kernel-.*\.rpm' /tmp/proxy.log
-if [[ $? -ne 0 ]]; then
- echo 'base repo package requests were not proxied' >> $ANA_INSTALL_PATH/root/RESULT
-fi
-
-# testpkg-http-core from the addon repo
-grep -q 'testpkg-http-core.*\.rpm' /tmp/proxy.log
-if [[ $? -ne 0 ]]; then
- echo 'addon repo package requests were not proxied' >> $ANA_INSTALL_PATH/root/RESULT
-fi
-
-# Check that the addon repo file was installed
-if [[ ! -f $ANA_INSTALL_PATH/etc/yum.repos.d/kstest-http.repo ]]; then
- echo 'kstest-http.repo does not exist' >> $ANA_INSTALL_PATH/root/RESULT
-fi
-
-# Check that the proxy configuration was written to the repo file
-grep -q 'proxy=http://127.0.0.1:8080' $ANA_INSTALL_PATH/etc/yum.repos.d/kstest-http.repo
-if [[ $? -ne 0 ]]; then
- echo 'kstest-http.repo does not contain proxy information' >> $ANA_INSTALL_PATH/root/RESULT
-fi
-
-# Check that the installed repo file is usable
-# dnf exits with 0 even if something goes wrong, so do a repoquery and look for
-# the package in the output
-chroot $ANA_INSTALL_PATH \
- dnf --disablerepo=\* --enablerepo=kstest-http --quiet repoquery testpkg-http-core 2>/dev/null | \
- grep -q 'testpkg-http-core'
-if [[ $? -ne 0 ]]; then
- echo 'unable to query kstest-http repo' >> $ANA_INSTALL_PATH/root/RESULT
-fi
-
-# Finally, check that the repoquery used the proxy
-tail -1 /tmp/proxy.log | grep -q repodata
-if [[ $? -ne 0 ]]; then
- echo 'repoquery on installed system was not proxied' >> $ANA_INSTALL_PATH/root/RESULT
-fi
-
-# If nothing was written to RESULT, it worked
-if [[ ! -f $ANA_INSTALL_PATH/root/RESULT ]]; then
- echo 'SUCCESS' > $ANA_INSTALL_PATH/root/RESULT
-fi
-
-%end
diff --git a/tests/kickstart_tests/proxy-kickstart.ks.in b/tests/kickstart_tests/proxy-kickstart.ks.in
new file mode 100644
index 0000000..6708c88
--- /dev/null
+++ b/tests/kickstart_tests/proxy-kickstart.ks.in
@@ -0,0 +1,82 @@
+url --url=http://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/$basearch/os/ --proxy=127.0.0.1:8080
+repo --name=kstest-http --baseurl=HTTP-ADDON-REPO --proxy=127.0.0.1:8080 --install
+install
+network --bootproto=dhcp
+
+bootloader --timeout=1
+zerombr
+clearpart --all
+autopart
+
+keyboard us
+lang en
+timezone America/New_York
+rootpw qweqwe
+shutdown
+
+# Install @core, which will also pull in testpkg-http-core from the addon repo
+%packages
+%end
+
+# Start the proxy server
+%include scripts/proxy-common.ks
+
+%post --nochroot
+# Look for the following as evidence that a proxy was used:
+# a .treeinfo request
+grep -q '\.treeinfo$' /tmp/proxy.log
+if [[ $? -ne 0 ]]; then
+ echo '.treeinfo request was not proxied' >> $ANA_INSTALL_PATH/root/RESULT
+fi
+
+# primary.xml from the repodata
+grep -q 'repodata/.*primary.xml' /tmp/proxy.log
+if [[ $? -ne 0 ]]; then
+ echo 'repodata requests were not provxied' >> $ANA_INSTALL_PATH/root/RESULT
+fi
+
+# the kernel package from the Fedora repo
+grep -q 'kernel-.*\.rpm' /tmp/proxy.log
+if [[ $? -ne 0 ]]; then
+ echo 'base repo package requests were not proxied' >> $ANA_INSTALL_PATH/root/RESULT
+fi
+
+# testpkg-http-core from the addon repo
+grep -q 'testpkg-http-core.*\.rpm' /tmp/proxy.log
+if [[ $? -ne 0 ]]; then
+ echo 'addon repo package requests were not proxied' >> $ANA_INSTALL_PATH/root/RESULT
+fi
+
+# Check that the addon repo file was installed
+if [[ ! -f $ANA_INSTALL_PATH/etc/yum.repos.d/kstest-http.repo ]]; then
+ echo 'kstest-http.repo does not exist' >> $ANA_INSTALL_PATH/root/RESULT
+fi
+
+# Check that the proxy configuration was written to the repo file
+grep -q 'proxy=http://127.0.0.1:8080' $ANA_INSTALL_PATH/etc/yum.repos.d/kstest-http.repo
+if [[ $? -ne 0 ]]; then
+ echo 'kstest-http.repo does not contain proxy information' >> $ANA_INSTALL_PATH/root/RESULT
+fi
+
+# Check that the installed repo file is usable
+# dnf exits with 0 even if something goes wrong, so do a repoquery and look for
+# the package in the output
+chroot $ANA_INSTALL_PATH \
+ dnf --disablerepo=\* --enablerepo=kstest-http --quiet repoquery testpkg-http-core 2>/dev/null | \
+ grep -q 'testpkg-http-core'
+if [[ $? -ne 0 ]]; then
+ echo 'unable to query kstest-http repo' >> $ANA_INSTALL_PATH/root/RESULT
+fi
+
+# Finally, check that the repoquery used the proxy
+tail -1 /tmp/proxy.log | grep -q repodata
+if [[ $? -ne 0 ]]; then
+ echo 'repoquery on installed system was not proxied' >> $ANA_INSTALL_PATH/root/RESULT
+fi
+
+# If nothing was written to RESULT, it worked
+if [[ ! -f $ANA_INSTALL_PATH/root/RESULT ]]; then
+ echo 'SUCCESS' > $ANA_INSTALL_PATH/root/RESULT
+fi
+
+%end
diff --git a/tests/kickstart_tests/raid-1.ks b/tests/kickstart_tests/raid-1.ks
deleted file mode 100644
index 1271526..0000000
--- a/tests/kickstart_tests/raid-1.ks
+++ /dev/null
@@ -1,108 +0,0 @@
-#version=DEVEL
-url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
-install
-network --bootproto=dhcp
-
-bootloader --timeout=1
-clearpart --all --initlabel
-
-part raid.01 --size=500 --ondisk=sda --asprimary
-part raid.02 --size=500 --ondisk=sdb --asprimary
-part raid.11 --size=4000 --ondisk=sda
-part raid.12 --size=4000 --ondisk=sdb
-part raid.21 --size=1024 --ondisk=sda
-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 --label=rootfs raid.11 raid.12
-
-keyboard us
-lang en_US.UTF-8
-timezone America/New_York --utc
-rootpw testcase
-shutdown
-
-%packages
-%end
-
-%post
-# Verify the / raid level
-root_raidlevel="$(grep ^md2.*active\\sraid1 /proc/mdstat)"
-if [ -z "$root_raidlevel" ]; then
- echo "*** mdraid 'root' is not a RAID1" >> /root/RESULT
-fi
-
-root_md="/dev/md2"
-root_uuid="UUID=$(blkid -o value -s UUID $root_md)"
-
-# verify root md is mounted at /mnt/sysimage
-root_mount="$(grep ^$root_md\\s/\\s /proc/mounts)"
-if [ -z "$root_mount" ]; then
- echo "*** mdraid 'root' is not mounted at /" >> /root/RESULT
-fi
-
-root_fstype="$(echo $root_mount | cut -d' ' -f3)"
-if [ $root_fstype != "ext4" ]; then
- echo "*** mdraid 'root' does not contain an ext4 fs" >> /root/RESULT
-fi
-
-# verify root entry in /etc/fstab is correct
-root_md_entry="$(grep ^$root_md\\s/\\s /etc/fstab)"
-root_uuid_entry="$(grep ^$root_uuid\\s/\\s /etc/fstab)"
-if [ -z "$root_md_entry" -a -z "$root_uuid_entry" ] ; then
- echo "*** root md is not the root entry in /etc/fstab" >> /root/RESULT
-fi
-
-# Verify the swap raid level
-swap_raidlevel="$(grep ^md1.*active\\sraid1 /proc/mdstat)"
-if [ -z "$swap_raidlevel" ]; then
- echo "*** mdraid 'swap' is not a RAID1" >> /root/RESULT
-fi
-
-# verify swap on md is active
-swap_md="/dev/md1"
-swap_uuid="UUID=$(blkid -o value -s UUID $swap_md)"
-if ! grep -q $swap_md /proc/swaps ; then
- echo "*** mdraid 'swap' is not active as swap space" >> /root/RESULT
-fi
-
-# verify swap entry in /etc/fstab is correct
-swap_md_entry="$(grep ^$swap_md\\sswap\\s /etc/fstab)"
-swap_uuid_entry="$(grep ^$swap_uuid\\sswap\\s /etc/fstab)"
-if [ -z "$swap_md_entry" -a -z "$swap_uuid_entry" ] ; then
- echo "*** swap md is not in /etc/fstab" >> /root/RESULT
-fi
-
-# Verify the boot raid level
-boot_raidlevel="$(grep ^md0.*active\\sraid1 /proc/mdstat)"
-if [ -z "$boot_raidlevel" ]; then
- echo "*** mdraid 'boot' is not a RAID1" >> /root/RESULT
-fi
-
-boot_md="/dev/md0"
-boot_uuid="UUID=$(blkid -o value -s UUID $boot_md)"
-
-# verify boot md is mounted at /mnt/sysimage/boot
-boot_mount="$(grep ^$boot_md\\s/boot\\s /proc/mounts)"
-if [ -z "$boot_mount" ]; then
- echo "*** mdraid 'boot' is not mounted at /boot" >> /root/RESULT
-fi
-
-boot_fstype="$(echo $boot_mount | cut -d' ' -f3)"
-if [ $boot_fstype != "ext4" ]; then
- echo "*** mdraid 'boot' does not contain an ext4 fs" >> /root/RESULT
-fi
-
-# verify boot entry in /etc/fstab is correct
-boot_md_entry="$(grep ^$boot_md\\s/boot\\s /etc/fstab)"
-boot_uuid_entry="$(grep ^$boot_uuid\\s/boot\\s /etc/fstab)"
-if [ -z "$boot_md_entry" -a -z "$boot_uuid_entry" ] ; then
- echo "*** boot md is not the root entry in /etc/fstab" >> /root/RESULT
-fi
-
-if [ ! -e /root/RESULT ]; then
- echo SUCCESS > /root/RESULT
-fi
-%end
diff --git a/tests/kickstart_tests/raid-1.ks.in b/tests/kickstart_tests/raid-1.ks.in
new file mode 100644
index 0000000..1271526
--- /dev/null
+++ b/tests/kickstart_tests/raid-1.ks.in
@@ -0,0 +1,108 @@
+#version=DEVEL
+url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
+install
+network --bootproto=dhcp
+
+bootloader --timeout=1
+clearpart --all --initlabel
+
+part raid.01 --size=500 --ondisk=sda --asprimary
+part raid.02 --size=500 --ondisk=sdb --asprimary
+part raid.11 --size=4000 --ondisk=sda
+part raid.12 --size=4000 --ondisk=sdb
+part raid.21 --size=1024 --ondisk=sda
+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 --label=rootfs raid.11 raid.12
+
+keyboard us
+lang en_US.UTF-8
+timezone America/New_York --utc
+rootpw testcase
+shutdown
+
+%packages
+%end
+
+%post
+# Verify the / raid level
+root_raidlevel="$(grep ^md2.*active\\sraid1 /proc/mdstat)"
+if [ -z "$root_raidlevel" ]; then
+ echo "*** mdraid 'root' is not a RAID1" >> /root/RESULT
+fi
+
+root_md="/dev/md2"
+root_uuid="UUID=$(blkid -o value -s UUID $root_md)"
+
+# verify root md is mounted at /mnt/sysimage
+root_mount="$(grep ^$root_md\\s/\\s /proc/mounts)"
+if [ -z "$root_mount" ]; then
+ echo "*** mdraid 'root' is not mounted at /" >> /root/RESULT
+fi
+
+root_fstype="$(echo $root_mount | cut -d' ' -f3)"
+if [ $root_fstype != "ext4" ]; then
+ echo "*** mdraid 'root' does not contain an ext4 fs" >> /root/RESULT
+fi
+
+# verify root entry in /etc/fstab is correct
+root_md_entry="$(grep ^$root_md\\s/\\s /etc/fstab)"
+root_uuid_entry="$(grep ^$root_uuid\\s/\\s /etc/fstab)"
+if [ -z "$root_md_entry" -a -z "$root_uuid_entry" ] ; then
+ echo "*** root md is not the root entry in /etc/fstab" >> /root/RESULT
+fi
+
+# Verify the swap raid level
+swap_raidlevel="$(grep ^md1.*active\\sraid1 /proc/mdstat)"
+if [ -z "$swap_raidlevel" ]; then
+ echo "*** mdraid 'swap' is not a RAID1" >> /root/RESULT
+fi
+
+# verify swap on md is active
+swap_md="/dev/md1"
+swap_uuid="UUID=$(blkid -o value -s UUID $swap_md)"
+if ! grep -q $swap_md /proc/swaps ; then
+ echo "*** mdraid 'swap' is not active as swap space" >> /root/RESULT
+fi
+
+# verify swap entry in /etc/fstab is correct
+swap_md_entry="$(grep ^$swap_md\\sswap\\s /etc/fstab)"
+swap_uuid_entry="$(grep ^$swap_uuid\\sswap\\s /etc/fstab)"
+if [ -z "$swap_md_entry" -a -z "$swap_uuid_entry" ] ; then
+ echo "*** swap md is not in /etc/fstab" >> /root/RESULT
+fi
+
+# Verify the boot raid level
+boot_raidlevel="$(grep ^md0.*active\\sraid1 /proc/mdstat)"
+if [ -z "$boot_raidlevel" ]; then
+ echo "*** mdraid 'boot' is not a RAID1" >> /root/RESULT
+fi
+
+boot_md="/dev/md0"
+boot_uuid="UUID=$(blkid -o value -s UUID $boot_md)"
+
+# verify boot md is mounted at /mnt/sysimage/boot
+boot_mount="$(grep ^$boot_md\\s/boot\\s /proc/mounts)"
+if [ -z "$boot_mount" ]; then
+ echo "*** mdraid 'boot' is not mounted at /boot" >> /root/RESULT
+fi
+
+boot_fstype="$(echo $boot_mount | cut -d' ' -f3)"
+if [ $boot_fstype != "ext4" ]; then
+ echo "*** mdraid 'boot' does not contain an ext4 fs" >> /root/RESULT
+fi
+
+# verify boot entry in /etc/fstab is correct
+boot_md_entry="$(grep ^$boot_md\\s/boot\\s /etc/fstab)"
+boot_uuid_entry="$(grep ^$boot_uuid\\s/boot\\s /etc/fstab)"
+if [ -z "$boot_md_entry" -a -z "$boot_uuid_entry" ] ; then
+ echo "*** boot md is not the root entry in /etc/fstab" >> /root/RESULT
+fi
+
+if [ ! -e /root/RESULT ]; then
+ echo SUCCESS > /root/RESULT
+fi
+%end
diff --git a/tests/kickstart_tests/reqpart.ks b/tests/kickstart_tests/reqpart.ks
deleted file mode 100644
index 393d809..0000000
--- a/tests/kickstart_tests/reqpart.ks
+++ /dev/null
@@ -1,41 +0,0 @@
-#version=DEVEL
-url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
-install
-network --bootproto=dhcp
-
-bootloader --timeout=1
-zerombr
-clearpart --all --initlabel
-
-reqpart --add-boot
-part pv.1 --fstype=lvmpv --size=4504
-volgroup fedora pv.1
-logvol swap --name=swap --vgname=fedora --size=500 --fstype=swap
-logvol / --name=root --vgname=fedora --size=4000 --label=root
-
-keyboard us
-lang en_US.UTF-8
-timezone America/New_York --utc
-rootpw testcase
-shutdown
-
-%packages
-%end
-
-%post
-# FIXME: This will need to test for other things one day when we support tests on other arches
-boot_mount="$(grep /mnt/sysimage/boot /proc/mounts)"
-if [ -z "${boot_mount}" ]; then
- echo "*** no /boot mount point was created by reqpart" >> /root/RESULT
-fi
-
-# Also verify the partitions we explicitly asked for got made.
-root_fstype=$(blkid -o value -t LABEL=root -s TYPE)
-if [ "${root_fstype}" != "ext4" ]; then
- echo "default fstype is incorrect (got $root_fstype; expected ext4)" >> /root/RESULT
-fi
-
-if [ ! -e /root/RESULT ]; then
- echo SUCCESS > /root/RESULT
-fi
-%end
diff --git a/tests/kickstart_tests/reqpart.ks.in b/tests/kickstart_tests/reqpart.ks.in
new file mode 100644
index 0000000..393d809
--- /dev/null
+++ b/tests/kickstart_tests/reqpart.ks.in
@@ -0,0 +1,41 @@
+#version=DEVEL
+url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
+install
+network --bootproto=dhcp
+
+bootloader --timeout=1
+zerombr
+clearpart --all --initlabel
+
+reqpart --add-boot
+part pv.1 --fstype=lvmpv --size=4504
+volgroup fedora pv.1
+logvol swap --name=swap --vgname=fedora --size=500 --fstype=swap
+logvol / --name=root --vgname=fedora --size=4000 --label=root
+
+keyboard us
+lang en_US.UTF-8
+timezone America/New_York --utc
+rootpw testcase
+shutdown
+
+%packages
+%end
+
+%post
+# FIXME: This will need to test for other things one day when we support tests on other arches
+boot_mount="$(grep /mnt/sysimage/boot /proc/mounts)"
+if [ -z "${boot_mount}" ]; then
+ echo "*** no /boot mount point was created by reqpart" >> /root/RESULT
+fi
+
+# Also verify the partitions we explicitly asked for got made.
+root_fstype=$(blkid -o value -t LABEL=root -s TYPE)
+if [ "${root_fstype}" != "ext4" ]; then
+ echo "default fstype is incorrect (got $root_fstype; expected ext4)" >> /root/RESULT
+fi
+
+if [ ! -e /root/RESULT ]; then
+ echo SUCCESS > /root/RESULT
+fi
+%end
diff --git a/tests/kickstart_tests/rootpw.ks b/tests/kickstart_tests/rootpw.ks
deleted file mode 100644
index 2317f01..0000000
--- a/tests/kickstart_tests/rootpw.ks
+++ /dev/null
@@ -1,50 +0,0 @@
-url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
-
-install
-
-network --bootproto=dhcp
-
-bootloader --timeout=1
-zerombr
-
-clearpart --all --initlabel
-autopart
-
-keyboard us
-lang en
-timezone America/New_York
-
-rootpw qweqwe
-
-shutdown
-
-# Something ought to pull in python for %post, but ask for it just in case
-%packages
-python3
-%end
-
-%post --interpreter=/usr/bin/python3
-import sys
-import crypt
-
-with open("/root/RESULT", "w") as result:
- # Test that the root password is what we expect it to be
- with open("/etc/shadow", "r") as f:
- for line in f:
- if line.startswith("root:"):
- shadow_fields = line.strip().split(":")
- break
- else:
- print("Unable to find root password", file=result)
- sys.exit(0)
-
- if crypt.crypt("qweqwe", shadow_fields[1]) != shadow_fields[1]:
- print("Root password is not correct: %s" % shadow_fields[1], file=result)
- sys.exit(0)
-
- if shadow_fields[2] != "":
- print("Date of last password change is not empty: %s" % shadow_fields[2], file=result)
- sys.exit(0)
-
- print("SUCCESS", file=result)
-%end
diff --git a/tests/kickstart_tests/rootpw.ks.in b/tests/kickstart_tests/rootpw.ks.in
new file mode 100644
index 0000000..2317f01
--- /dev/null
+++ b/tests/kickstart_tests/rootpw.ks.in
@@ -0,0 +1,50 @@
+url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
+
+install
+
+network --bootproto=dhcp
+
+bootloader --timeout=1
+zerombr
+
+clearpart --all --initlabel
+autopart
+
+keyboard us
+lang en
+timezone America/New_York
+
+rootpw qweqwe
+
+shutdown
+
+# Something ought to pull in python for %post, but ask for it just in case
+%packages
+python3
+%end
+
+%post --interpreter=/usr/bin/python3
+import sys
+import crypt
+
+with open("/root/RESULT", "w") as result:
+ # Test that the root password is what we expect it to be
+ with open("/etc/shadow", "r") as f:
+ for line in f:
+ if line.startswith("root:"):
+ shadow_fields = line.strip().split(":")
+ break
+ else:
+ print("Unable to find root password", file=result)
+ sys.exit(0)
+
+ if crypt.crypt("qweqwe", shadow_fields[1]) != shadow_fields[1]:
+ print("Root password is not correct: %s" % shadow_fields[1], file=result)
+ sys.exit(0)
+
+ if shadow_fields[2] != "":
+ print("Date of last password change is not empty: %s" % shadow_fields[2], file=result)
+ sys.exit(0)
+
+ print("SUCCESS", file=result)
+%end
diff --git a/tests/kickstart_tests/selinux-disabled.ks b/tests/kickstart_tests/selinux-disabled.ks
deleted file mode 100644
index 7dbc3ef..0000000
--- a/tests/kickstart_tests/selinux-disabled.ks
+++ /dev/null
@@ -1,35 +0,0 @@
-#version=DEVEL
-url --url="http://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/$basearc..."
-install
-network --bootproto=dhcp
-
-bootloader --timeout=1
-zerombr
-clearpart --all --initlabel
-autopart
-
-keyboard --vckeymap cz --xlayouts=cz
-lang cs_CZ.UTF-8
-timezone America/New_York --utc
-rootpw testcase
-
-# SeLinux test
-selinux --disabled
-
-shutdown
-
-%packages
-%end
-
-%post
-
-# Test disabled
-cat /etc/selinux/config | grep SELINUX=disabled
-if [[ $? -ne 0 ]]; then
- echo "*** SELinux not disabled" >> /root/RESULT
-fi
-
-if [[ ! -e /root/RESULT ]]; then
- echo SUCCESS > /root/RESULT
-fi
-%end
diff --git a/tests/kickstart_tests/selinux-disabled.ks.in b/tests/kickstart_tests/selinux-disabled.ks.in
new file mode 100644
index 0000000..7dbc3ef
--- /dev/null
+++ b/tests/kickstart_tests/selinux-disabled.ks.in
@@ -0,0 +1,35 @@
+#version=DEVEL
+url --url="http://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/$basearc..."
+install
+network --bootproto=dhcp
+
+bootloader --timeout=1
+zerombr
+clearpart --all --initlabel
+autopart
+
+keyboard --vckeymap cz --xlayouts=cz
+lang cs_CZ.UTF-8
+timezone America/New_York --utc
+rootpw testcase
+
+# SeLinux test
+selinux --disabled
+
+shutdown
+
+%packages
+%end
+
+%post
+
+# Test disabled
+cat /etc/selinux/config | grep SELINUX=disabled
+if [[ $? -ne 0 ]]; then
+ echo "*** SELinux not disabled" >> /root/RESULT
+fi
+
+if [[ ! -e /root/RESULT ]]; then
+ echo SUCCESS > /root/RESULT
+fi
+%end
diff --git a/tests/kickstart_tests/selinux-enforcing.ks b/tests/kickstart_tests/selinux-enforcing.ks
deleted file mode 100644
index 4526214..0000000
--- a/tests/kickstart_tests/selinux-enforcing.ks
+++ /dev/null
@@ -1,35 +0,0 @@
-#version=DEVEL
-url --url="http://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/$basearc..."
-install
-network --bootproto=dhcp
-
-bootloader --timeout=1
-zerombr
-clearpart --all --initlabel
-autopart
-
-keyboard --vckeymap cz --xlayouts=cz
-lang cs_CZ.UTF-8
-timezone America/New_York --utc
-rootpw testcase
-
-# SeLinux test
-selinux --enforcing
-
-shutdown
-
-%packages
-%end
-
-%post
-
-# Test enforcing
-cat /etc/selinux/config | grep SELINUX=enforcing
-if [[ $? -ne 0 ]]; then
- echo "*** SELinux not in enforcing mode" >> /root/RESULT
-fi
-
-if [[ ! -e /root/RESULT ]]; then
- echo SUCCESS > /root/RESULT
-fi
-%end
diff --git a/tests/kickstart_tests/selinux-enforcing.ks.in b/tests/kickstart_tests/selinux-enforcing.ks.in
new file mode 100644
index 0000000..4526214
--- /dev/null
+++ b/tests/kickstart_tests/selinux-enforcing.ks.in
@@ -0,0 +1,35 @@
+#version=DEVEL
+url --url="http://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/$basearc..."
+install
+network --bootproto=dhcp
+
+bootloader --timeout=1
+zerombr
+clearpart --all --initlabel
+autopart
+
+keyboard --vckeymap cz --xlayouts=cz
+lang cs_CZ.UTF-8
+timezone America/New_York --utc
+rootpw testcase
+
+# SeLinux test
+selinux --enforcing
+
+shutdown
+
+%packages
+%end
+
+%post
+
+# Test enforcing
+cat /etc/selinux/config | grep SELINUX=enforcing
+if [[ $? -ne 0 ]]; then
+ echo "*** SELinux not in enforcing mode" >> /root/RESULT
+fi
+
+if [[ ! -e /root/RESULT ]]; then
+ echo SUCCESS > /root/RESULT
+fi
+%end
diff --git a/tests/kickstart_tests/selinux-permissive.ks b/tests/kickstart_tests/selinux-permissive.ks
deleted file mode 100644
index b792ff9..0000000
--- a/tests/kickstart_tests/selinux-permissive.ks
+++ /dev/null
@@ -1,35 +0,0 @@
-#version=DEVEL
-url --url="http://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/$basearc..."
-install
-network --bootproto=dhcp
-
-bootloader --timeout=1
-zerombr
-clearpart --all --initlabel
-autopart
-
-keyboard --vckeymap cz --xlayouts=cz
-lang cs_CZ.UTF-8
-timezone America/New_York --utc
-rootpw testcase
-
-# SeLinux test
-selinux --permissive
-
-shutdown
-
-%packages
-%end
-
-%post
-
-# Test permissive
-cat /etc/selinux/config | grep SELINUX=permissive
-if [[ $? -ne 0 ]]; then
- echo "*** SELinux not in permissive mode" >> /root/RESULT
-fi
-
-if [[ ! -e /root/RESULT ]]; then
- echo SUCCESS > /root/RESULT
-fi
-%end
diff --git a/tests/kickstart_tests/selinux-permissive.ks.in b/tests/kickstart_tests/selinux-permissive.ks.in
new file mode 100644
index 0000000..b792ff9
--- /dev/null
+++ b/tests/kickstart_tests/selinux-permissive.ks.in
@@ -0,0 +1,35 @@
+#version=DEVEL
+url --url="http://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/$basearc..."
+install
+network --bootproto=dhcp
+
+bootloader --timeout=1
+zerombr
+clearpart --all --initlabel
+autopart
+
+keyboard --vckeymap cz --xlayouts=cz
+lang cs_CZ.UTF-8
+timezone America/New_York --utc
+rootpw testcase
+
+# SeLinux test
+selinux --permissive
+
+shutdown
+
+%packages
+%end
+
+%post
+
+# Test permissive
+cat /etc/selinux/config | grep SELINUX=permissive
+if [[ $? -ne 0 ]]; then
+ echo "*** SELinux not in permissive mode" >> /root/RESULT
+fi
+
+if [[ ! -e /root/RESULT ]]; then
+ echo SUCCESS > /root/RESULT
+fi
+%end
diff --git a/tests/kickstart_tests/services.ks b/tests/kickstart_tests/services.ks
deleted file mode 100644
index cbc2100..0000000
--- a/tests/kickstart_tests/services.ks
+++ /dev/null
@@ -1,56 +0,0 @@
-#version=DEVEL
-url --url="http://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/$basearc..."
-install
-network --bootproto=dhcp
-
-bootloader --timeout=1
-zerombr
-clearpart --all --initlabel
-autopart
-
-keyboard en
-lang en
-timezone America/New_York --utc
-rootpw testcase
-
-# Test services
-services --disabled=sshd --enabled=systemd-timesyncd
-
-# Test SELinux
-selinux --enforcing
-
-shutdown
-
-%packages
-%end
-
-%post
-
-# Test enabled
-systemctl is-enabled systemd-timesyncd
-if [[ $? -ne 0 ]]; then
- echo "*** systemd-timesyncd is disabled, not enabled" >> /root/RESULT
-fi
-
-# Test disabled
-systemctl is-enabled sshd
-if [[ $? -eq 0 ]]; then
- echo "*** sshd is enabled, not disabled" >> /root/RESULT
-fi
-
-# Test disabled - W/out change
-systemctl is-enabled systemd-networkd
-if [[ $? -eq 0 ]]; then
- echo "*** systemd-networkd is enabled, should be disabled" >> /root/RESULT
-fi
-
-# SELinux test
-grep 'SELINUX=enforcing' /etc/selinux/config
-if [[ $? -ne 0 ]]; then
- echo "*** SELinux not in enforcing mode" >> /root/RESULT
-fi
-
-if [[ ! -e /root/RESULT ]]; then
- echo SUCCESS > /root/RESULT
-fi
-%end
diff --git a/tests/kickstart_tests/services.ks.in b/tests/kickstart_tests/services.ks.in
new file mode 100644
index 0000000..cbc2100
--- /dev/null
+++ b/tests/kickstart_tests/services.ks.in
@@ -0,0 +1,56 @@
+#version=DEVEL
+url --url="http://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/$basearc..."
+install
+network --bootproto=dhcp
+
+bootloader --timeout=1
+zerombr
+clearpart --all --initlabel
+autopart
+
+keyboard en
+lang en
+timezone America/New_York --utc
+rootpw testcase
+
+# Test services
+services --disabled=sshd --enabled=systemd-timesyncd
+
+# Test SELinux
+selinux --enforcing
+
+shutdown
+
+%packages
+%end
+
+%post
+
+# Test enabled
+systemctl is-enabled systemd-timesyncd
+if [[ $? -ne 0 ]]; then
+ echo "*** systemd-timesyncd is disabled, not enabled" >> /root/RESULT
+fi
+
+# Test disabled
+systemctl is-enabled sshd
+if [[ $? -eq 0 ]]; then
+ echo "*** sshd is enabled, not disabled" >> /root/RESULT
+fi
+
+# Test disabled - W/out change
+systemctl is-enabled systemd-networkd
+if [[ $? -eq 0 ]]; then
+ echo "*** systemd-networkd is enabled, should be disabled" >> /root/RESULT
+fi
+
+# SELinux test
+grep 'SELINUX=enforcing' /etc/selinux/config
+if [[ $? -ne 0 ]]; then
+ echo "*** SELinux not in enforcing mode" >> /root/RESULT
+fi
+
+if [[ ! -e /root/RESULT ]]; then
+ echo SUCCESS > /root/RESULT
+fi
+%end
diff --git a/tests/kickstart_tests/timezoneLOCAL.ks b/tests/kickstart_tests/timezoneLOCAL.ks
deleted file mode 100644
index 3e109f4..0000000
--- a/tests/kickstart_tests/timezoneLOCAL.ks
+++ /dev/null
@@ -1,39 +0,0 @@
-#version=DEVEL
-url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
-install
-network --bootproto=dhcp
-
-bootloader --timeout=1
-zerombr
-clearpart --all --initlabel
-autopart
-
-keyboard en
-lang en
-timezone Europe/Prague
-rootpw testcase
-
-shutdown
-
-%packages
-%end
-
-%post
-## UTC ZONE TEST
-# hwclock LOCAL test
-hwclock -D | grep "Assuming hardware clock is kept in local time."
-if [[ $? -ne 0 ]]; then
- echo "*** hwclock not set to LOCAL time." >> /root/RESULT
-fi
-
-# cat adjtime LOCAL test
-cat /etc/adjtime | grep LOCAL
-if [[ $? -ne 0 ]]; then
- echo "*** Time in /etc/adjtime is not set to LOCAL." >> /root/RESULT
-fi
-
-# everything passes
-if [[ ! -e /root/RESULT ]]; then
- echo SUCCESS > /root/RESULT
-fi
-%end
diff --git a/tests/kickstart_tests/timezoneLOCAL.ks.in b/tests/kickstart_tests/timezoneLOCAL.ks.in
new file mode 100644
index 0000000..3e109f4
--- /dev/null
+++ b/tests/kickstart_tests/timezoneLOCAL.ks.in
@@ -0,0 +1,39 @@
+#version=DEVEL
+url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
+install
+network --bootproto=dhcp
+
+bootloader --timeout=1
+zerombr
+clearpart --all --initlabel
+autopart
+
+keyboard en
+lang en
+timezone Europe/Prague
+rootpw testcase
+
+shutdown
+
+%packages
+%end
+
+%post
+## UTC ZONE TEST
+# hwclock LOCAL test
+hwclock -D | grep "Assuming hardware clock is kept in local time."
+if [[ $? -ne 0 ]]; then
+ echo "*** hwclock not set to LOCAL time." >> /root/RESULT
+fi
+
+# cat adjtime LOCAL test
+cat /etc/adjtime | grep LOCAL
+if [[ $? -ne 0 ]]; then
+ echo "*** Time in /etc/adjtime is not set to LOCAL." >> /root/RESULT
+fi
+
+# everything passes
+if [[ ! -e /root/RESULT ]]; then
+ echo SUCCESS > /root/RESULT
+fi
+%end
diff --git a/tests/kickstart_tests/timezoneUTC.ks b/tests/kickstart_tests/timezoneUTC.ks
deleted file mode 100644
index a304eb5..0000000
--- a/tests/kickstart_tests/timezoneUTC.ks
+++ /dev/null
@@ -1,39 +0,0 @@
-#version=DEVEL
-url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
-install
-network --bootproto=dhcp
-
-bootloader --timeout=1
-zerombr
-clearpart --all --initlabel
-autopart
-
-keyboard en
-lang en
-timezone Europe/Prague --utc
-rootpw testcase
-
-shutdown
-
-%packages
-%end
-
-%post
-## UTC ZONE TEST
-# hwclock -D UTC test
-hwclock -D | grep "Assuming hardware clock is kept in UTC time."
-if [[ $? -ne 0 ]]; then
- echo "*** hwclock not set to UTC.." >> /root/RESULT
-fi
-
-# cat adjtime UTC test
-cat /etc/adjtime | grep UTC
-if [[ $? -ne 0 ]]; then
- echo "*** Time in /etc/adjtime not set to UTC." >> /root/RESULT
-fi
-
-# everything passes
-if [[ ! -e /root/RESULT ]]; then
- echo SUCCESS > /root/RESULT
-fi
-%end
diff --git a/tests/kickstart_tests/timezoneUTC.ks.in b/tests/kickstart_tests/timezoneUTC.ks.in
new file mode 100644
index 0000000..a304eb5
--- /dev/null
+++ b/tests/kickstart_tests/timezoneUTC.ks.in
@@ -0,0 +1,39 @@
+#version=DEVEL
+url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
+install
+network --bootproto=dhcp
+
+bootloader --timeout=1
+zerombr
+clearpart --all --initlabel
+autopart
+
+keyboard en
+lang en
+timezone Europe/Prague --utc
+rootpw testcase
+
+shutdown
+
+%packages
+%end
+
+%post
+## UTC ZONE TEST
+# hwclock -D UTC test
+hwclock -D | grep "Assuming hardware clock is kept in UTC time."
+if [[ $? -ne 0 ]]; then
+ echo "*** hwclock not set to UTC.." >> /root/RESULT
+fi
+
+# cat adjtime UTC test
+cat /etc/adjtime | grep UTC
+if [[ $? -ne 0 ]]; then
+ echo "*** Time in /etc/adjtime not set to UTC." >> /root/RESULT
+fi
+
+# everything passes
+if [[ ! -e /root/RESULT ]]; then
+ echo SUCCESS > /root/RESULT
+fi
+%end
diff --git a/tests/kickstart_tests/tmpfs-fixed_size.ks b/tests/kickstart_tests/tmpfs-fixed_size.ks
deleted file mode 100644
index b47e385..0000000
--- a/tests/kickstart_tests/tmpfs-fixed_size.ks
+++ /dev/null
@@ -1,49 +0,0 @@
-url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
-install
-network --bootproto=dhcp
-
-bootloader --timeout=1
-zerombr
-clearpart --all
-
-part --fstype=ext4 --size=4400 --label=rootfs /
-part --fstype=ext4 --size=500 /boot
-part --fstype=swap --size=500 swap
-part --fstype=tmpfs --size 5000 /tmp
-
-keyboard us
-lang en
-timezone America/New_York
-rootpw qweqwe
-shutdown
-
-%packages
-@core
-%end
-
-%post
-mount | grep -q "tmpfs on /tmp"
-if [[ $? != 0 ]]; then
- echo '*** tmpfs not mounted in /tmp' >> /root/RESULT
-fi
-
-mount | grep "tmpfs on /tmp" | grep -q "size=5120000k"
-if [[ $? != 0 ]]; then
- echo '*** tmpfs size is not 5000 MB' >> /root/RESULT
-fi
-
-cat /etc/fstab | grep -q "tmpfs"
-if [[ $? != 0 ]]; then
- echo '*** tmpfs is not present in fstab' >> /root/RESULT
-fi
-
-cat /etc/fstab | grep "tmpfs" | grep -q "size=5000m"
-if [[ $? != 0 ]]; then
- echo '*** tmpfs size is not 5000 MB in fstab' >> /root/RESULT
-fi
-
-# the installation was successfull if nothing bad happend till now
-if [[ ! -e /root/RESULT ]]; then
- echo SUCCESS > /root/RESULT
-fi
-%end
diff --git a/tests/kickstart_tests/tmpfs-fixed_size.ks.in b/tests/kickstart_tests/tmpfs-fixed_size.ks.in
new file mode 100644
index 0000000..b47e385
--- /dev/null
+++ b/tests/kickstart_tests/tmpfs-fixed_size.ks.in
@@ -0,0 +1,49 @@
+url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
+install
+network --bootproto=dhcp
+
+bootloader --timeout=1
+zerombr
+clearpart --all
+
+part --fstype=ext4 --size=4400 --label=rootfs /
+part --fstype=ext4 --size=500 /boot
+part --fstype=swap --size=500 swap
+part --fstype=tmpfs --size 5000 /tmp
+
+keyboard us
+lang en
+timezone America/New_York
+rootpw qweqwe
+shutdown
+
+%packages
+@core
+%end
+
+%post
+mount | grep -q "tmpfs on /tmp"
+if [[ $? != 0 ]]; then
+ echo '*** tmpfs not mounted in /tmp' >> /root/RESULT
+fi
+
+mount | grep "tmpfs on /tmp" | grep -q "size=5120000k"
+if [[ $? != 0 ]]; then
+ echo '*** tmpfs size is not 5000 MB' >> /root/RESULT
+fi
+
+cat /etc/fstab | grep -q "tmpfs"
+if [[ $? != 0 ]]; then
+ echo '*** tmpfs is not present in fstab' >> /root/RESULT
+fi
+
+cat /etc/fstab | grep "tmpfs" | grep -q "size=5000m"
+if [[ $? != 0 ]]; then
+ echo '*** tmpfs size is not 5000 MB in fstab' >> /root/RESULT
+fi
+
+# the installation was successfull if nothing bad happend till now
+if [[ ! -e /root/RESULT ]]; then
+ echo SUCCESS > /root/RESULT
+fi
+%end
diff --git a/tests/kickstart_tests/user.ks b/tests/kickstart_tests/user.ks
deleted file mode 100644
index d9b0ced..0000000
--- a/tests/kickstart_tests/user.ks
+++ /dev/null
@@ -1,113 +0,0 @@
-url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
-
-install
-
-network --bootproto=dhcp
-
-bootloader --timeout=1
-zerombr
-
-clearpart --all --initlabel
-autopart
-
-keyboard us
-lang en
-timezone America/New_York
-
-rootpw qweqwe
-
-## TEST CREATE USER
-# Create specific user group
-group --name=kosygroup --gid=5001
-
-# Create specific user
-user --name=kosieh --gecos="Kosieh Barter" --homedir=/home/kbarter --password="$6$QsJCB9E6geIjWNvn$UZLEtnHYgKmFgrPo0fY1qNBc/aRi9b01f19w9mpdFm9.MPblckUuFYvpRLSzeYeR/6lO/2uY4WtjhbryC0k2L/" --iscrypted --shell=/bin/bash --uid=4001 --gid=5001
-
-# Give that user a (bogus) ssh key.
-sshkey --username=kosieh "this is a bogus ssh key"
-
-shutdown
-
-%packages
-%end
-
-%post
-
-## TEST CREATE USER CHECK
-# Check group
-grep 5001 /etc/group
-if [[ $? -ne 0 ]]; then
- echo "*** Group failed to create." >> /root/RESULT
-fi
-
-# Check group name
-grep kosygroup /etc/group
-if [[ $? -ne 0 ]]; then
- echo "*** Group name not present." >> /root/RESULT
-fi
-
-# Check find username
-grep kosieh /etc/passwd
-if [[ $? -ne 0 ]]; then
- echo "*** User is not present in system." >> /root/RESULT
-fi
-
-# Check GEDOS: real name
-grep kosieh /etc/passwd | grep "Kosieh Barter"
-if [[ $? -ne 0 ]]; then
- echo "*** User is present, but not all details: REAL NAME (GEDOS)" >> /root/RESULT
-fi
-
-# Check if the user has his/her bash
-grep kosieh /etc/passwd | grep "/bin/bash"
-if [[ $? -ne 0 ]]; then
- echo "*** User is present, but /bin/bash is not set" >> /root/RESULT
-fi
-
-# Check if the user has encrypted password
-grep kosieh /etc/shadow | grep "$6$QsJCB9E6geIjWNvn$UZLEtnHYgKmFgrPo0fY1qNBc/aRi9b01f19w9mpdFm9.MPblckUuFYvpRLSzeYeR/6lO/2uY4WtjhbryC0k2L/"
-if [[ $? -ne 0 ]]; then
- echo "*** User is present, passwords DO NOT match" >> /root/RESULT
-fi
-
-# Check if the user is in correct group
-grep kosieh /etc/passwd | grep 5001
-if [[ $? -ne 0 ]]; then
- echo "*** User is present, group assignment" >> /root/RESULT
-fi
-
-# Check if the user has PHYSICAL home dir
-if [[ ! -d /home/kbarter ]]; then
- echo "*** Home directory not found" >> /root/RESULT
-fi
-
-# Check for home dir in /etc/passwd
-grep /home/kbarter /etc/passwd
-if [[ $? -ne 0 ]]; then
- echo "*** Home directory not in passwd file" >> /root/RESULT
-fi
-
-# Check that an ssh key was added.
-if [[ ! -f /home/kbarter/.ssh/authorized_keys ]]; then
- echo "*** .authorized_keys not created" >> /root/RESULT
-fi
-
-perms="$(stat --format='%u %g %a' /home/kbarter/.ssh)"
-if [[ "${perms}" != "4001 5001 700" ]]; then
- echo "*** /home/kbarter/.ssh does not have the right permissions; got " ${perms} >> /root/RESULT
-fi
-
-perms="$(stat --format='%u %g %a' /home/kbarter/.ssh/authorized_keys)"
-if [[ "${perms}" != "4001 5001 600" ]]; then
- echo "*** /home/kbarter/.ssh/authorized_keys does not have the right permissions; got " ${perms} >> /root/RESULT
-fi
-
-if [[ "$(cat /home/kbarter/.ssh/authorized_keys)" != "this is a bogus ssh key" ]]; then
- echo "*** .authorized_keys doesn't have the right contents" >> /root/RESULT
-fi
-
-# Final check
-if [[ ! -e /root/RESULT ]]; then
- echo SUCCESS > /root/RESULT
-fi
-%end
diff --git a/tests/kickstart_tests/user.ks.in b/tests/kickstart_tests/user.ks.in
new file mode 100644
index 0000000..d9b0ced
--- /dev/null
+++ b/tests/kickstart_tests/user.ks.in
@@ -0,0 +1,113 @@
+url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
+
+install
+
+network --bootproto=dhcp
+
+bootloader --timeout=1
+zerombr
+
+clearpart --all --initlabel
+autopart
+
+keyboard us
+lang en
+timezone America/New_York
+
+rootpw qweqwe
+
+## TEST CREATE USER
+# Create specific user group
+group --name=kosygroup --gid=5001
+
+# Create specific user
+user --name=kosieh --gecos="Kosieh Barter" --homedir=/home/kbarter --password="$6$QsJCB9E6geIjWNvn$UZLEtnHYgKmFgrPo0fY1qNBc/aRi9b01f19w9mpdFm9.MPblckUuFYvpRLSzeYeR/6lO/2uY4WtjhbryC0k2L/" --iscrypted --shell=/bin/bash --uid=4001 --gid=5001
+
+# Give that user a (bogus) ssh key.
+sshkey --username=kosieh "this is a bogus ssh key"
+
+shutdown
+
+%packages
+%end
+
+%post
+
+## TEST CREATE USER CHECK
+# Check group
+grep 5001 /etc/group
+if [[ $? -ne 0 ]]; then
+ echo "*** Group failed to create." >> /root/RESULT
+fi
+
+# Check group name
+grep kosygroup /etc/group
+if [[ $? -ne 0 ]]; then
+ echo "*** Group name not present." >> /root/RESULT
+fi
+
+# Check find username
+grep kosieh /etc/passwd
+if [[ $? -ne 0 ]]; then
+ echo "*** User is not present in system." >> /root/RESULT
+fi
+
+# Check GEDOS: real name
+grep kosieh /etc/passwd | grep "Kosieh Barter"
+if [[ $? -ne 0 ]]; then
+ echo "*** User is present, but not all details: REAL NAME (GEDOS)" >> /root/RESULT
+fi
+
+# Check if the user has his/her bash
+grep kosieh /etc/passwd | grep "/bin/bash"
+if [[ $? -ne 0 ]]; then
+ echo "*** User is present, but /bin/bash is not set" >> /root/RESULT
+fi
+
+# Check if the user has encrypted password
+grep kosieh /etc/shadow | grep "$6$QsJCB9E6geIjWNvn$UZLEtnHYgKmFgrPo0fY1qNBc/aRi9b01f19w9mpdFm9.MPblckUuFYvpRLSzeYeR/6lO/2uY4WtjhbryC0k2L/"
+if [[ $? -ne 0 ]]; then
+ echo "*** User is present, passwords DO NOT match" >> /root/RESULT
+fi
+
+# Check if the user is in correct group
+grep kosieh /etc/passwd | grep 5001
+if [[ $? -ne 0 ]]; then
+ echo "*** User is present, group assignment" >> /root/RESULT
+fi
+
+# Check if the user has PHYSICAL home dir
+if [[ ! -d /home/kbarter ]]; then
+ echo "*** Home directory not found" >> /root/RESULT
+fi
+
+# Check for home dir in /etc/passwd
+grep /home/kbarter /etc/passwd
+if [[ $? -ne 0 ]]; then
+ echo "*** Home directory not in passwd file" >> /root/RESULT
+fi
+
+# Check that an ssh key was added.
+if [[ ! -f /home/kbarter/.ssh/authorized_keys ]]; then
+ echo "*** .authorized_keys not created" >> /root/RESULT
+fi
+
+perms="$(stat --format='%u %g %a' /home/kbarter/.ssh)"
+if [[ "${perms}" != "4001 5001 700" ]]; then
+ echo "*** /home/kbarter/.ssh does not have the right permissions; got " ${perms} >> /root/RESULT
+fi
+
+perms="$(stat --format='%u %g %a' /home/kbarter/.ssh/authorized_keys)"
+if [[ "${perms}" != "4001 5001 600" ]]; then
+ echo "*** /home/kbarter/.ssh/authorized_keys does not have the right permissions; got " ${perms} >> /root/RESULT
+fi
+
+if [[ "$(cat /home/kbarter/.ssh/authorized_keys)" != "this is a bogus ssh key" ]]; then
+ echo "*** .authorized_keys doesn't have the right contents" >> /root/RESULT
+fi
+
+# Final check
+if [[ ! -e /root/RESULT ]]; then
+ echo SUCCESS > /root/RESULT
+fi
+%end
diff --git a/tests/kickstart_tests/vlan.ks b/tests/kickstart_tests/vlan.ks
deleted file mode 100644
index 08f0c70..0000000
--- a/tests/kickstart_tests/vlan.ks
+++ /dev/null
@@ -1,57 +0,0 @@
-url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
-install
-network --device=link --bootproto=dhcp
-# Create testing vlan interface
-network --device=link --vlanid=150 --bootproto=dhcp
-
-bootloader --timeout=1
-zerombr
-clearpart --all
-autopart
-
-keyboard us
-lang en
-timezone America/New_York
-rootpw qweqwe
-shutdown
-
-%packages
-%end
-
-%post
-IF_FILE=$(ls /etc/sysconfig/network-scripts/*.150)
-DEVICE=$(sed 's/.*-//g' <<< "$IF_FILE")
-
-if [[ -e $IF_FILE ]]; then
- cp $IF_FILE /root/
- echo "$DEVICE" >> /root/device
-else
- echo '*** ifcfg file for vlan missing' >> /root/RESULT
- exit 0
-fi
-
-grep -q '^TYPE=Vlan$' $IF_FILE
-if [[ $? -ne 0 ]]; then
- echo '*** TYPE=Vlan is not present' >> /root/RESULT
-fi
-
-grep -q '^BOOTPROTO=dhcp$' $IF_FILE
-if [[ $? -ne 0 ]]; then
- echo '*** BOOTPROTO is not present' >> /root/RESULT
-fi
-
-grep -q "^NAME=${DEVICE}$" $IF_FILE
-if [[ $? -ne 0 ]]; then
- echo '*** NAME is not present' >> /root/RESULT
-fi
-
-grep -q "^DEVICE=${DEVICE}$" $IF_FILE
-if [[ $? -ne 0 ]]; then
- echo '*** DEVICE is not present' >> /root/RESULT
-fi
-
-# No error was written to /root/RESULT file, everything is OK
-if [[ ! -e /root/RESULT ]]; then
- echo SUCCESS > /root/RESULT
-fi
-%end
diff --git a/tests/kickstart_tests/vlan.ks.in b/tests/kickstart_tests/vlan.ks.in
new file mode 100644
index 0000000..08f0c70
--- /dev/null
+++ b/tests/kickstart_tests/vlan.ks.in
@@ -0,0 +1,57 @@
+url --mirror=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-rawhide&arch=$basearch
+install
+network --device=link --bootproto=dhcp
+# Create testing vlan interface
+network --device=link --vlanid=150 --bootproto=dhcp
+
+bootloader --timeout=1
+zerombr
+clearpart --all
+autopart
+
+keyboard us
+lang en
+timezone America/New_York
+rootpw qweqwe
+shutdown
+
+%packages
+%end
+
+%post
+IF_FILE=$(ls /etc/sysconfig/network-scripts/*.150)
+DEVICE=$(sed 's/.*-//g' <<< "$IF_FILE")
+
+if [[ -e $IF_FILE ]]; then
+ cp $IF_FILE /root/
+ echo "$DEVICE" >> /root/device
+else
+ echo '*** ifcfg file for vlan missing' >> /root/RESULT
+ exit 0
+fi
+
+grep -q '^TYPE=Vlan$' $IF_FILE
+if [[ $? -ne 0 ]]; then
+ echo '*** TYPE=Vlan is not present' >> /root/RESULT
+fi
+
+grep -q '^BOOTPROTO=dhcp$' $IF_FILE
+if [[ $? -ne 0 ]]; then
+ echo '*** BOOTPROTO is not present' >> /root/RESULT
+fi
+
+grep -q "^NAME=${DEVICE}$" $IF_FILE
+if [[ $? -ne 0 ]]; then
+ echo '*** NAME is not present' >> /root/RESULT
+fi
+
+grep -q "^DEVICE=${DEVICE}$" $IF_FILE
+if [[ $? -ne 0 ]]; then
+ echo '*** DEVICE is not present' >> /root/RESULT
+fi
+
+# No error was written to /root/RESULT file, everything is OK
+if [[ ! -e /root/RESULT ]]; then
+ echo SUCCESS > /root/RESULT
+fi
+%end
--
2.4.3
8 years, 8 months
[blivet][rhel7-branch] followups for partitionable md
by David Lehman
all() returns True when passed an empty iterable, but that won't
do for our purposes. Also, fwraid "containers" (the intermediate
layer between the member disks and the md array that represents
the fwraid array) should never be treated like disks or be
considered partitionable.
8 years, 8 months
New: [rhinstaller/blivet/pulls/218 master] Improvements for LVM on RAID calculations
by dashea
The first commit just removes some old, naïve comments from the code. The second and third commits make our calculations related to LVM on RAID much more precise and realistic -- from ~150 MiB free space in a VG where some LV was requested to grow to a maximum size to ~4-8 MiB (1 or 2 extents). But what's more important, the calculations now reflect the real calculations that happen in the "storage land below us" and they make sense. :)
We still have the "emergency brake" making an LV smaller if it's about to be created in a VG that doesn't have enough space for it so this should be safe. Plus I'm only proposing this for *master* right now and I'll make anaconda's kickstart tests stricter so that they reveal any potential issues this could cause and any future changes breaking this.
--
To view this pull request on github, visit https://github.com/rhinstaller/blivet/pull/218
8 years, 8 months