Skip to contentSkip to conversation

CI: Add an EFI/StrictNX test

RFC PATCH New Andrew Cooper 1 participant 1 message Nov 25

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 CI: Add an EFI/StrictNX test

From: Roger Pau Monne <[email protected]>

While most of our testing of this nature happens in a Debian container, Debian's strictnx build of OVMF is buggy at the time of writing. See:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1154178

Fedora have non-strict StrictNX enabled in their SecureBoot build of OVMF, but by default it prints a warning on failure and then relaxes permissions. It can be turned into strict StrictNX mode with an extra -fw_cfg setting, making it actually usable in a CI scenario.

Unlike Debian, Fedora has no equivelent of the enroled snakeoil key, so for simplicity sake just turn off SecureBoot for now.

---
CC: Anthony PERARD <[email protected]>
CC: Stefano Stabellini <[email protected]>
CC: Michal Orzel <[email protected]>
CC: Doug Goldstein <[email protected]>
CC: Marek Marczykowski-Górecki <[email protected]>

Adapted from a previous patch of Rogers. Not for applying yet, as Xen is not compatible with StrictNX.

However, I want to rebuild the container including these new packages for ease of testing, so this wants a cusory review at least.

---
 automation/build/fedora/43-x86_64.dockerfile  |  7 ++
 automation/gitlab-ci/test.yaml                |  9 +++
 .../scripts/include/xtf-x86_64-efi-strictnx   | 64 +++++++++++++++++++
 3 files changed, 80 insertions(+)
 create mode 100644 automation/scripts/include/xtf-x86_64-efi-strictnx
automation/build/fedora/43-x86_64.dockerfile +7 -0
index 0a2329e2dc37..a9f69b4cdc95 100644
@@ -67,6 +67,13 @@ RUN <<EOF
         glib2-devel
         pixman-devel
         ninja-build
+
+        # for test phase, qemu-* jobs
+        edk2-ovmf
+        expect
+        python3-virt-firmware
+        qemu-img
+        qemu-system-x86
     )
 
     dnf -y --setopt=install_weak_deps=False install "${DEPS[@]}"
automation/gitlab-ci/test.yaml +9 -0
index cf4b7ed416b0..4673815b484f 100644
@@ -783,6 +783,15 @@ qemu-smoke-x86_64-gcc-efi-uki:
   needs:
     - debian-13-x86_64-gcc-debug
 
+qemu-smoke-x86_64-gcc-efi-strictnx:
+  extends: .qemu-smoke-x86_64
+  variables:
+    CONTAINER: fedora:43-x86_64
+  script:
+    - ./automation/scripts/qemu-xtf.sh x86_64-efi-strictnx pv64 example 2>&1 | tee ${LOGFILE}
+  needs:
+    - debian-13-x86_64-gcc-debug
+
 qemu-xtf-argo-x86_64-gcc-debug:
   extends: .qemu-smoke-x86_64
   variables:
automation/scripts/include/xtf-x86_64-efi-strictnx new file +64 -0

64 lines not on this page · raw message

Signature · 1 line
2.39.5