Skip to content

Commit

Permalink
tests: add reboot check to ignition.kargs.basic
Browse files Browse the repository at this point in the history
This will further sanity check the karg persists even to subsequent
boots.
  • Loading branch information
dustymabe committed Feb 2, 2022
1 parent 428d587 commit 6a4d3b0
Showing 1 changed file with 21 additions and 6 deletions.
27 changes: 21 additions & 6 deletions tests/kola/ignition/kargs/basic/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,25 @@ set -xeuo pipefail

. $KOLA_EXT_DATA/commonlib.sh

if ! grep foobar /proc/cmdline; then
fatal "missing foobar in kernel cmdline"
fi
if grep mitigations /proc/cmdline; then
fatal "found mitigations in kernel cmdline"
fi
kargchecks() {
if ! grep foobar /proc/cmdline; then
fatal "missing foobar in kernel cmdline"
fi
if grep mitigations /proc/cmdline; then
fatal "found mitigations in kernel cmdline"
fi
}

case "${AUTOPKGTEST_REBOOT_MARK:-}" in
"")
kargchecks
# Now reboot the machine and verify the kernel argument persists
/tmp/autopkgtest-reboot nextboot
;;
nextboot)
kargchecks
;;
*) fatal "unexpected mark: ${AUTOPKGTEST_REBOOT_MARK}";;
esac

ok "Ignition kargs"

0 comments on commit 6a4d3b0

Please sign in to comment.