Skip to content

Commit 83f3df2

Browse files
committed
tests: add reboot check to ignition.kargs.basic
This will further sanity check the karg persists even to subsequent boots.
1 parent d6e945b commit 83f3df2

File tree

1 file changed

+21
-6
lines changed
  • tests/kola/ignition/kargs/basic

1 file changed

+21
-6
lines changed

tests/kola/ignition/kargs/basic/test.sh

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,25 @@ set -xeuo pipefail
66

77
. $KOLA_EXT_DATA/commonlib.sh
88

9-
if ! grep foobar /proc/cmdline; then
10-
fatal "missing foobar in kernel cmdline"
11-
fi
12-
if grep mitigations /proc/cmdline; then
13-
fatal "found mitigations in kernel cmdline"
14-
fi
9+
kargchecks() {
10+
if ! grep foobar /proc/cmdline; then
11+
fatal "missing foobar in kernel cmdline"
12+
fi
13+
if grep mitigations /proc/cmdline; then
14+
fatal "found mitigations in kernel cmdline"
15+
fi
16+
}
17+
18+
case "${AUTOPKGTEST_REBOOT_MARK:-}" in
19+
"")
20+
kargchecks
21+
# Now reboot the machine and verify the kernel argument persists
22+
/tmp/autopkgtest-reboot nextboot
23+
;;
24+
nextboot)
25+
kargchecks
26+
;;
27+
*) fatal "unexpected mark: ${AUTOPKGTEST_REBOOT_MARK}";;
28+
esac
29+
1530
ok "Ignition kargs"

0 commit comments

Comments
 (0)