summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorLuca Boccassi <bluca@debian.org>2023-02-01 21:51:04 +0000
committerGitHub <noreply@github.com>2023-02-01 21:51:04 +0000
commite5cf396181d1e350d31081c073db34bf791304be (patch)
tree78a2b3fe2494810b26e69332e12e78244defb3be /test
parentcc3826155d94a1773c15dbfe8d388afbf0e0f1dd (diff)
parent2de6cc18f9ab6ceb46fd5008847f0226388fee90 (diff)
downloadsystemd-e5cf396181d1e350d31081c073db34bf791304be.tar.gz
Merge pull request #26287 from medhefgo/mkosi-auto-enroll
ci: Test with secure boot enabled under mkosi
Diffstat (limited to 'test')
-rw-r--r--test/mkosi-check-and-shutdown.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/mkosi-check-and-shutdown.sh b/test/mkosi-check-and-shutdown.sh
index ed76ef370a..b86d2d3e69 100644
--- a/test/mkosi-check-and-shutdown.sh
+++ b/test/mkosi-check-and-shutdown.sh
@@ -3,6 +3,12 @@
systemctl --failed --no-legend | tee /failed-services
+# Check that secure boot keys were properly enrolled.
+if [[ -d /sys/firmware/efi/efivars/ ]]; then
+ cmp /sys/firmware/efi/efivars/SecureBoot-8be4df61-93ca-11d2-aa0d-00e098032b8c <(printf '\6\0\0\0\1')
+ cmp /sys/firmware/efi/efivars/SetupMode-8be4df61-93ca-11d2-aa0d-00e098032b8c <(printf '\6\0\0\0\0')
+fi
+
# Exit with non-zero EC if the /failed-services file is not empty (we have -e set)
[[ ! -s /failed-services ]]