From 811637696b881039b1e594f848044588aaee8c0c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Fri, 4 Oct 2024 04:29:38 +0200 Subject: [PATCH] automation: add a smoke test for xen.efi on X86 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Check if xen.efi is bootable with an XTF dom0. The multiboot2+EFI path is tested on hardware tests already. Signed-off-by: Marek Marczykowski-Górecki Acked-by: Andrew Cooper (cherry picked from commit 2d1c673baea563bb1af00b1e977b4ff7c213cf7f) --- automation/gitlab-ci/test.yaml | 7 ++++ automation/scripts/qemu-smoke-x86-64-efi.sh | 43 +++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100755 automation/scripts/qemu-smoke-x86-64-efi.sh diff --git a/automation/gitlab-ci/test.yaml b/automation/gitlab-ci/test.yaml index e947736195..5687eaf914 100644 --- a/automation/gitlab-ci/test.yaml +++ b/automation/gitlab-ci/test.yaml @@ -463,6 +463,13 @@ qemu-smoke-x86-64-clang-pvh: needs: - debian-bookworm-clang-debug +qemu-smoke-x86-64-gcc-efi: + extends: .qemu-x86-64 + script: + - ./automation/scripts/qemu-smoke-x86-64-efi.sh pv 2>&1 | tee ${LOGFILE} + needs: + - debian-bookworm-gcc-debug + qemu-smoke-riscv64-gcc: extends: .qemu-riscv64 script: diff --git a/automation/scripts/qemu-smoke-x86-64-efi.sh b/automation/scripts/qemu-smoke-x86-64-efi.sh new file mode 100755 index 0000000000..7572722be6 --- /dev/null +++ b/automation/scripts/qemu-smoke-x86-64-efi.sh @@ -0,0 +1,43 @@ +#!/bin/bash + +set -ex -o pipefail + +# variant should be either pv or pvh +variant=$1 + +# Clone and build XTF +git clone https://xenbits.xen.org/git-http/xtf.git +cd xtf && make -j$(nproc) && cd - + +case $variant in + pvh) k=test-hvm64-example extra="dom0-iommu=none dom0=pvh" ;; + *) k=test-pv64-example extra= ;; +esac + +mkdir -p boot-esp/EFI/BOOT +cp binaries/xen.efi boot-esp/EFI/BOOT/BOOTX64.EFI +cp xtf/tests/example/$k boot-esp/EFI/BOOT/kernel + +cat > boot-esp/EFI/BOOT/BOOTX64.cfg <