From 143e19517d387e9bdb91734ea1c8e5446f6ab383 Mon Sep 17 00:00:00 2001 From: "Brian C. Lane" Date: Wed, 13 Jul 2022 14:00:18 -0700 Subject: [PATCH] tests: Add a test to run mkksiso as a user Make sure that running mkksiso as a user works with the boot.iso. Note that this won't catch problems with other isos with different permissions, like the dvd. Related: rhbz#2088631 --- tests/scripts/run_tests.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/scripts/run_tests.sh b/tests/scripts/run_tests.sh index 7b361d7..c7f84e9 100755 --- a/tests/scripts/run_tests.sh +++ b/tests/scripts/run_tests.sh @@ -177,6 +177,22 @@ function run_all { umount_dirs } +# All of the changes as a user (lorax-ted) +function run_as_user { + [ ! -e "/home/lorax-ted" ] && useradd -m lorax-ted + su - lorax-ted -c "mkksiso -a /etc/services -V "mkksiso-test" -c "console=ttyS0,115200n8" --rm "quiet" --ks $KS $BOOTISO $OUTISO" || exit 1 + mount $OUTISO $ISODIR || exit 1 + + test_ks + test_serial + test_volid + test_files + test_quiet + + status "Use all the options as a user" + umount_dirs +} + if [ ! -e /usr/share/lorax/templates.d/80-rhel/ ]; then echo "Failed to find lorax-templates-rhel templates in /usr/share/lorax/templates.d/" @@ -205,5 +221,6 @@ new_volid add_files remove_quiet run_all +run_as_user exit $FAILANY