|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH v5 07/13] CI: add a smoke test for UKI xen.efi
Combine xen.efi test with alpine smoke test. This one should not use
XTF, as having initrd is an important part of the test.
The command to build UKI is constructed based on the documentation.
Signed-off-by: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
---
New in v5
The documentation says to put extra sections after .pad section, but I
don't see it anymore...
---
automation/gitlab-ci/test.yaml | 8 ++-
automation/scripts/qemu-smoke-x86-64-efi-uki.sh | 62 ++++++++++++++++++-
2 files changed, 70 insertions(+)
create mode 100755 automation/scripts/qemu-smoke-x86-64-efi-uki.sh
diff --git a/automation/gitlab-ci/test.yaml b/automation/gitlab-ci/test.yaml
index 184cf9b47d46..8e2db8c33528 100644
--- a/automation/gitlab-ci/test.yaml
+++ b/automation/gitlab-ci/test.yaml
@@ -804,6 +804,14 @@ qemu-xtf-argo-x86_64-gcc-debug:
needs:
- alpine-3.24-x86_64-gcc-debug
+qemu-smoke-x86-64-gcc-efi-uki:
+ extends: .qemu-smoke-x86_64
+ script:
+ - ./automation/scripts/qemu-smoke-x86-64-efi-uki.sh pv 2>&1 | tee
${LOGFILE}
+ needs:
+ - *x86_64-test-needs
+ - alpine-3.24-x86_64-gcc-debug
+
qemu-smoke-riscv64-gcc:
extends: .qemu-riscv64
script:
diff --git a/automation/scripts/qemu-smoke-x86-64-efi-uki.sh
b/automation/scripts/qemu-smoke-x86-64-efi-uki.sh
new file mode 100755
index 000000000000..8275dd1a81b3
--- /dev/null
+++ b/automation/scripts/qemu-smoke-x86-64-efi-uki.sh
@@ -0,0 +1,62 @@
+#!/bin/bash
+
+set -ex -o pipefail
+
+. "$(dirname "$0")"/qemu-alpine-lib.sh
+
+cd binaries
+build_domU
+build_dom0
+
+# variant should be either pv or pvh
+variant=$1
+
+case $variant in
+ pvh) extra="dom0-iommu=none dom0=pvh" ;;
+ pv) extra= ;;
+ *) echo "Unknown test variant!" >&2; exit 2;;
+esac
+
+mkdir -p boot-esp/EFI/BOOT
+
+cat > xen.cfg <<EOF
+[global]
+default=test
+
+[test]
+options=loglvl=all console=com1 noreboot console_timestamps=boot $extra
+kernel=kernel console=hvc0
+EOF
+
+vma=$(objdump -h xen.efi \
+ | perl -ane 'if (/\..*/) { $vma=hex($F[2]) + hex($F[3]) }
+ END { printf "0x%016x\n", ($vma + 0xfff) & ~0xfff }')
+
+objcopy \
+ --add-section .config=xen.cfg \
+ --change-section-vma .config=$vma \
+ --add-section .kernel=bzImage \
+ --change-section-vma .kernel=$(( $vma + 0x100000 )) \
+ --add-section .ramdisk=dom0-rootfs.cpio.gz \
+ --change-section-vma .ramdisk=$(( $vma + 0x2000000 )) \
+ xen.efi \
+ boot-esp/EFI/BOOT/BOOTX64.EFI
+
+cp /usr/share/OVMF/OVMF_CODE_4M.fd OVMF_CODE.fd
+cp /usr/share/OVMF/OVMF_VARS_4M.fd OVMF_VARS.fd
+
+rm -f smoke.serial
+export TEST_CMD="qemu-system-x86_64 -nographic -M q35,kernel-irqchip=split \
+ -drive if=pflash,format=raw,readonly=on,file=OVMF_CODE.fd \
+ -drive if=pflash,format=raw,file=OVMF_VARS.fd \
+ -device virtio-net-pci,netdev=n0 \
+ -netdev user,id=n0 \
+ -drive file=fat:rw:boot-esp,media=disk,index=0,format=raw \
+ -m 1024 -monitor none -serial stdio"
+
+export TEST_LOG="smoke.serial"
+export BOOT_MSG="Latest ChangeSet: "
+export PASSED="Welcome to Alpine"
+
+../automation/scripts/console.exp | sed 's/\r\+$//'
+
--
git-series 0.9.1
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |