tests/sanity - check for SecureBoot trailer presence

Related: 50f909db8f
This commit is contained in:
Dan Horák 2026-06-03 12:32:48 +02:00
parent 84fc909503
commit 5d6190bae4
2 changed files with 4 additions and 1 deletions

View File

@ -8,6 +8,7 @@ test: ./runtest.sh
framework: beakerlib
require:
- s390utils-base
- xxd
duration: 5m
enabled: true
adjust:

View File

@ -31,6 +31,7 @@
PACKAGE="s390utils-base"
EXTRACT="$PWD/extract-module-sig.pl"
STAGE3="/usr/lib/s390-tools/stage3.bin"
rlJournalStart
rlPhaseStartSetup
@ -171,9 +172,10 @@ rlJournalStart
rlPhaseEnd
rlPhaseStartTest "Bootloader signature"
rlRun "xxd -s 16380 -l 4 -g 4 $STAGE3 | grep -q zIPL" 0 "Check SecureBoot trailer presence"
# only RHEL has signed bootloader
if rlIsRHEL '>=8'; then
rlRun "$EXTRACT -s /usr/lib/s390-tools/stage3.bin > stage3.bin.sig" 0 "Check bootloader signature"
rlRun "$EXTRACT -s $STAGE3 > stage3.bin.sig" 0 "Check bootloader signature"
else
rlLog "Skipping bootloader signature check, not on RHEL"
fi