|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH 1/6 TEST-ARTIFACTS] Add a QTB container to run the Xen riscv64 tests
QTB (QEMU Test Bench) is a Python framework, developed as part of AMD's Xen
safety initiative, that drives a live QEMU instance over qtest and QMP. It
gives a test full access to the machine while the emulation runs: read and
write the consoles, inspect the registers and the memory, inject interrupts.
For now the riscv64 CI tests only use it to read the Xen console in the
smoke test, since DomU is not supported yet. Once it is, the same
framework will read and write the DomU consoles and inject IRQs, so the
tests can assert an interrupt reaches the expected guest and vCPU.
QTB is not upstream in QEMU yet, though it is planned to be, so get the
framework from AMD's fork gitlab.com/xen-project/people/amd/qemu and
pip-installs qemu.qtb from it.
Signed-off-by: Baptiste Le Duc <baptiste.le-duc@xxxxxxxxxx>
---
containerize | 1 +
images/debian/13-qtb-riscv64.dockerfile | 45 +++++++++++++++++++++++++
2 files changed, 46 insertions(+)
create mode 100644 images/debian/13-qtb-riscv64.dockerfile
diff --git a/containerize b/containerize
index dad9afa..477b670 100755
--- a/containerize
+++ b/containerize
@@ -31,6 +31,7 @@ case "_${CONTAINER}" in
_alpine-3.24-arm64-base) CONTAINER="${BASE}/alpine:3.24-arm64-base" ;;
_alpine-3.24-arm64-build) CONTAINER="${BASE}/alpine:3.24-arm64-build" ;;
_alpine-3.24-x86_64-base) CONTAINER="${BASE}/alpine:3.24-x86_64-base" ;;
+ _debian-13-qtb-riscv64) CONTAINER="${BASE}/debian:13-qtb-riscv64" ;;
_alpine-3.24-x86_64-build|_) CONTAINER="${BASE}/alpine:3.24-x86_64-build"
;;
esac
diff --git a/images/debian/13-qtb-riscv64.dockerfile
b/images/debian/13-qtb-riscv64.dockerfile
new file mode 100644
index 0000000..86215d3
--- /dev/null
+++ b/images/debian/13-qtb-riscv64.dockerfile
@@ -0,0 +1,45 @@
+# syntax=docker/dockerfile:1
+FROM --platform=linux/amd64 debian:trixie-slim
+LABEL maintainer.name="The Xen Project"
+LABEL maintainer.email="xen-devel@xxxxxxxxxxxxxxxxxxxx"
+
+ENV DEBIAN_FRONTEND=noninteractive
+
+ARG QEMU_REPO=https://gitlab.com/xen-project/people/amd/qemu.git
+ARG QEMU_COMMIT=24cd7e5c0d7e4db8e651f091d0b9da2e7c58dbab
+
+RUN <<EOF
+#!/bin/bash
+ set -eu
+
+ useradd --create-home user
+
+ apt-get update
+
+ DEPS=(# Base environment
+ ca-certificates
+ device-tree-compiler
+ git
+ python3-jinja2
+ python3-minimal
+ python3-pip
+ python3-yaml
+
+ # Qemu for test phase
+ qemu-system-riscv64
+ )
+
+ apt-get -y --no-install-recommends install "${DEPS[@]}"
+
+ # QTB framework
+ git init /tmp/qemu
+ git -C /tmp/qemu fetch --depth 1 "$QEMU_REPO" "$QEMU_COMMIT"
+ git -C /tmp/qemu checkout FETCH_HEAD
+ pip install --break-system-packages /tmp/qemu/python[qtb]
+
+ rm -rf /tmp/qemu
+ rm -rf /var/lib/apt/lists/*
+EOF
+
+USER user
+WORKDIR /build
--
Baptiste Le Duc | Vates Hypervisor & Kernel Engineer
XCP-ng & Xen Orchestra - Vates solutions
web: https://vates.tech
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |