tests: Update run_tests for changes in mkksiso
Related: RHEL-83208
This commit is contained in:
parent
8580323670
commit
91b20a2e37
@ -197,6 +197,29 @@ function test_files {
|
|||||||
[ -e "$ISODIR/services" ] || fail "Missing file from iso"
|
[ -e "$ISODIR/services" ] || fail "Missing file from iso"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Test adding an updates.img file
|
||||||
|
function add_updatesimg {
|
||||||
|
running "Add updates.img"
|
||||||
|
|
||||||
|
# nothing in the file, just test that it is there
|
||||||
|
touch /tmp/updates.img
|
||||||
|
mkksiso -u /tmp/updates.img $BOOTISO $OUTISO || exit 1
|
||||||
|
mount $OUTISO $ISODIR || exit 1
|
||||||
|
|
||||||
|
test_updatesimg
|
||||||
|
|
||||||
|
status "Add updates.img"
|
||||||
|
umount_dirs
|
||||||
|
}
|
||||||
|
|
||||||
|
function test_updatesimg {
|
||||||
|
[ -e "$ISODIR/updates.img" ] || fail "Missing file from iso"
|
||||||
|
grep "inst.updates=.*updates.img" "$ISODIR/isolinux/isolinux.cfg" || fail "Missing BIOS isolinux.cfg inst.updates entry"
|
||||||
|
grep "inst.updates=.*updates.img" "$ISODIR/EFI/BOOT/grub.cfg" || fail "Missing UEFI grub.cfg inst.updates entry"
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# Remove quiet from the cmdline
|
# Remove quiet from the cmdline
|
||||||
function remove_quiet {
|
function remove_quiet {
|
||||||
running "remove quiet from cmdline (no ks)"
|
running "remove quiet from cmdline (no ks)"
|
||||||
@ -220,7 +243,7 @@ function test_quiet {
|
|||||||
|
|
||||||
function test_quiet_x86 {
|
function test_quiet_x86 {
|
||||||
# Is quiet in the BIOS config?
|
# Is quiet in the BIOS config?
|
||||||
! grep "append.*quiet" "$ISODIR/isolinux/isolinux.cfg" || fail "quiet not removed from BIOS grub.cfg cmdline entry"
|
! grep "append.*quiet" "$ISODIR/isolinux/isolinux.cfg" || fail "quiet not removed from BIOS isolinux.cfg cmdline entry"
|
||||||
|
|
||||||
# Is quiet in the UEFI config?
|
# Is quiet in the UEFI config?
|
||||||
! grep "linux.*quiet" "$ISODIR/EFI/BOOT/grub.cfg" || fail "quiet not removed from UEFI grub.cfg cmdline entry"
|
! grep "linux.*quiet" "$ISODIR/EFI/BOOT/grub.cfg" || fail "quiet not removed from UEFI grub.cfg cmdline entry"
|
||||||
@ -244,32 +267,38 @@ function test_two_kickstarts {
|
|||||||
function run_all {
|
function run_all {
|
||||||
running "Use all the options"
|
running "Use all the options"
|
||||||
|
|
||||||
mkksiso -a /etc/services -V "mkksiso-test" -c "console=ttyS0,115200n8" --rm "quiet" --ks $KS $BOOTISO $OUTISO || exit 1
|
touch /tmp/updates.img
|
||||||
|
mkksiso -u /tmp/updates.img -a /etc/services -V "mkksiso-test" -c "console=ttyS0,115200n8" --rm "quiet" --ks $KS $BOOTISO $OUTISO || exit 1
|
||||||
mount $OUTISO $ISODIR || exit 1
|
mount $OUTISO $ISODIR || exit 1
|
||||||
|
|
||||||
test_ks
|
test_ks
|
||||||
test_serial
|
test_serial
|
||||||
test_volid
|
test_volid
|
||||||
test_files
|
test_files
|
||||||
|
test_updatesimg
|
||||||
test_quiet
|
test_quiet
|
||||||
|
|
||||||
status "Use all the options"
|
status "Use all the options"
|
||||||
umount_dirs
|
umount_dirs
|
||||||
}
|
}
|
||||||
|
|
||||||
# All of the changes as a user (lorax-ted)
|
# All of the changes as a user (lorax-ted) with --skip-mkefiboot
|
||||||
function run_as_user {
|
function run_as_user {
|
||||||
|
running "Use all the options as a user"
|
||||||
|
|
||||||
[ ! -e "/home/lorax-ted" ] && useradd -m lorax-ted
|
[ ! -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
|
touch /tmp/updates.img
|
||||||
|
su - lorax-ted -c "mkksiso --skip-mkefiboot -u /tmp/updates.img -a /etc/services -V "mkksiso-test" -c "console=ttyS0,115200n8" --rm "quiet" --ks $KS $BOOTISO $OUTISO" || exit 1
|
||||||
mount $OUTISO $ISODIR || exit 1
|
mount $OUTISO $ISODIR || exit 1
|
||||||
|
|
||||||
test_ks
|
test_ks
|
||||||
test_serial
|
test_serial
|
||||||
test_volid
|
test_volid
|
||||||
test_files
|
test_files
|
||||||
|
test_updatesimg
|
||||||
test_quiet
|
test_quiet
|
||||||
|
|
||||||
status "Use all the options as a user"
|
status "Use all the options as a user with --skip-mkefiboot"
|
||||||
umount_dirs
|
umount_dirs
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -307,6 +336,7 @@ new_volid
|
|||||||
add_files
|
add_files
|
||||||
remove_quiet
|
remove_quiet
|
||||||
test_two_kickstarts
|
test_two_kickstarts
|
||||||
|
add_updatesimg
|
||||||
run_all
|
run_all
|
||||||
run_as_user
|
run_as_user
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user