From: dmkhn@proton.me
To: Stefano Stabellini <sstabellini@kernel.org>
Cc: xen-devel@lists.xenproject.org, andrew.cooper3@citrix.com,
cardoe@cardoe.com, marmarek@invisiblethingslab.com,
dmukhin@ford.com
Subject: Re: [PATCH v1 3/4] CI: switch arm64 XTF test runner to qemu-xtf.sh
Date: Thu, 17 Apr 2025 18:51:05 +0000 [thread overview]
Message-ID: <aAFNluwjIrVS7Mxg@kraken> (raw)
In-Reply-To: <alpine.DEB.2.22.394.2504161641250.8008@ubuntu-linux-20-04-desktop>
On Wed, Apr 16, 2025 at 05:12:55PM -0700, Stefano Stabellini wrote:
> On Wed, 16 Apr 2025, dmkhn@proton.me wrote:
> > From: Denis Mukhin <dmukhin@ford.com>
> >
> > Hook arm64 QEMU configuration to qemu-xtf.sh and use new script in arm64 CI
> > jobs.
> >
> > Signed-off-by: Denis Mukhin <dmukhin@ford.com>
>
> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Thanks!
>
>
> > ---
> > automation/gitlab-ci/test.yaml | 4 +-
> > automation/scripts/.gitignore | 3 +
> > .../scripts/include/configs/xtf-arm64-config | 2 +
> > automation/scripts/include/xtf-arm64 | 81 +++++++++++++++++++
> > automation/scripts/qemu-xtf-dom0less-arm64.sh | 68 ----------------
> > 5 files changed, 88 insertions(+), 70 deletions(-)
> > create mode 100644 automation/scripts/include/configs/xtf-arm64-config
> > create mode 100644 automation/scripts/include/xtf-arm64
> > delete mode 100755 automation/scripts/qemu-xtf-dom0less-arm64.sh
> >
> > diff --git a/automation/gitlab-ci/test.yaml b/automation/gitlab-ci/test.yaml
> > index ca1e4eb528..d6e4a0a622 100644
> > --- a/automation/gitlab-ci/test.yaml
> > +++ b/automation/gitlab-ci/test.yaml
> > @@ -571,7 +571,7 @@ qemu-smoke-dom0less-arm64-gcc-debug-earlyprintk:
> > qemu-xtf-dom0less-arm64-gcc-hyp-xen-version:
> > extends: .qemu-arm64
> > script:
> > - - ./automation/scripts/qemu-xtf-dom0less-arm64.sh hyp-xen-version 2>&1 | tee ${LOGFILE}
> > + - ./automation/scripts/qemu-xtf.sh arm64 mmu64le hyp-xen-version 2>&1 | tee ${LOGFILE}
> > needs:
> > - alpine-3.18-gcc-arm64
> > - qemu-system-aarch64-6.0.0-arm64-export
> > @@ -579,7 +579,7 @@ qemu-xtf-dom0less-arm64-gcc-hyp-xen-version:
> > qemu-xtf-dom0less-arm64-gcc-debug-hyp-xen-version:
> > extends: .qemu-arm64
> > script:
> > - - ./automation/scripts/qemu-xtf-dom0less-arm64.sh hyp-xen-version 2>&1 | tee ${LOGFILE}
> > + - ./automation/scripts/qemu-xtf.sh arm64 mmu64le hyp-xen-version 2>&1 | tee ${LOGFILE}
> > needs:
> > - alpine-3.18-gcc-debug-arm64
> > - qemu-system-aarch64-6.0.0-arm64-export
> > diff --git a/automation/scripts/.gitignore b/automation/scripts/.gitignore
> > index 2f2d6e1ebd..f853da4d89 100644
> > --- a/automation/scripts/.gitignore
> > +++ b/automation/scripts/.gitignore
> > @@ -1,6 +1,9 @@
> > !include
> >
> > binaries
> > +imagebuilder
> > smoke.serial
> > xen
> > xtf*/
> > +
> > +*.rom
> > diff --git a/automation/scripts/include/configs/xtf-arm64-config b/automation/scripts/include/configs/xtf-arm64-config
> > new file mode 100644
> > index 0000000000..9942740927
> > --- /dev/null
> > +++ b/automation/scripts/include/configs/xtf-arm64-config
> > @@ -0,0 +1,2 @@
> > +CONFIG_GICV2=y
> > +CONFIG_SBSA_UART=y
> > diff --git a/automation/scripts/include/xtf-arm64 b/automation/scripts/include/xtf-arm64
> > new file mode 100644
> > index 0000000000..68487fe617
> > --- /dev/null
> > +++ b/automation/scripts/include/xtf-arm64
> > @@ -0,0 +1,81 @@
> > +#!/bin/bash
> > +#
> > +# XTF test utilities (arm64).
> > +#
> > +
> > +# Arch-specific environment overrides.
> > +function xtf_arch_prepare()
> > +{
> > + export FW_PREFIX="${FW_PREFIX:-/usr/lib/u-boot/qemu_arm64/}"
> > + export QEMU_PREFIX="${QEMU_PREFIX:-${WORKDIR}/}"
> > + export XEN_BINARY="${XEN_BINARY:-${WORKDIR}/xen}"
> > + export XEN_CONSOLE="${XEN_CONSOLE:-dtuart}"
> > + export XTF_SRC_BRANCH="${XTF_SRC_BRANCH:-xtf-arm}"
> > + export XTF_SRC_URI="${XTF_SRC_URI:-https://gitlab.com/xen-project/fusa/xtf.git}"
> > + export XTF_SRC_VARIANTS="mmu64le"
> > +}
> > +
> > +# Perform arch-specific XTF environment setup.
> > +function xtf_arch_setup()
> > +{
> > + # QEMU looks for "efi-virtio.rom" even if it is unneeded
> > + curl -fsSLO https://github.com/qemu/qemu/raw/v5.2.0/pc-bios/efi-virtio.rom
> > +
> > + # Crude check for local testing
> > + if [ ! -d imagebuilder/.git ]; then
> > + git clone --depth 1 https://gitlab.com/xen-project/imagebuilder.git
> > + fi
> > +
> > + cat > ${WORKDIR}/config <<EOF
> > +MEMORY_START="0x40000000"
> > +MEMORY_END="0xC0000000"
> > +
> > +XEN="xen"
> > +DEVICE_TREE="virt-gicv2.dtb"
> > +
> > +XEN_CMD="${XEN_CMDLINE}"
> > +
> > +DOMU_KERNEL[0]="xtf-test"
> > +DOMU_MEM[0]="128"
> > +
> > +NUM_DOMUS=1
> > +
> > +LOAD_CMD="tftpb"
> > +UBOOT_SOURCE="boot.source"
> > +UBOOT_SCRIPT="boot.scr"
> > +EOF
> > + cp ${XTF_BINARY} ${WORKDIR}/xtf-test
> > +
> > + # Generate virt-gicv2.dtb
> > + ${WORKDIR}/qemu-system-aarch64 \
> > + -machine virtualization=true \
> > + -cpu cortex-a57 \
> > + -machine type=virt \
> > + -m 2048 \
> > + -smp 2 \
> > + -display none \
> > + -machine dumpdtb=${WORKDIR}/virt-gicv2.dtb
> > +
> > + # Generate U-Boot environment
> > + bash -x imagebuilder/scripts/uboot-script-gen \
> > + -t tftp \
> > + -d ${WORKDIR}/ \
> > + -c ${WORKDIR}/config
> > +
> > + export TEST_CMD="${QEMU_PREFIX}qemu-system-aarch64 \
> > + -machine virtualization=true \
> > + -cpu cortex-a57 \
> > + -machine type=virt \
> > + -no-reboot \
> > + -nographic \
> > + -monitor none \
> > + -serial stdio \
> > + -m 2048 \
> > + -smp 2 \
> > + -device virtio-net-pci,netdev=n0 \
> > + -netdev user,id=n0,tftp=${WORKDIR} \
> > + -bios ${FW_PREFIX}u-boot.bin \
> > + "
> > +
> > + export UBOOT_CMD="virtio scan; dhcp; tftpb 0x40000000 boot.scr; source 0x40000000"
> > +}
> > diff --git a/automation/scripts/qemu-xtf-dom0less-arm64.sh b/automation/scripts/qemu-xtf-dom0less-arm64.sh
> > deleted file mode 100755
> > index 436f460c3c..0000000000
> > --- a/automation/scripts/qemu-xtf-dom0less-arm64.sh
> > +++ /dev/null
> > @@ -1,68 +0,0 @@
> > -#!/bin/bash
> > -
> > -set -ex -o pipefail
> > -
> > -# Name of the XTF test
> > -xtf_test=$1
> > -
> > -# Message returned by XTF in case of success
> > -passed="Test result: SUCCESS"
> > -
> > -# XXX QEMU looks for "efi-virtio.rom" even if it is unneeded
> > -curl -fsSLO https://github.com/qemu/qemu/raw/v5.2.0/pc-bios/efi-virtio.rom
> > -./binaries/qemu-system-aarch64 \
> > - -machine virtualization=true \
> > - -cpu cortex-a57 -machine type=virt \
> > - -m 2048 -smp 2 -display none \
> > - -machine dumpdtb=binaries/virt-gicv2.dtb
> > -
> > -# XTF
> > -# Build a single XTF test passed as a first parameter to the script.
> > -# Build XTF with GICv2 support to match Qemu configuration and with SBSA UART
> > -# support, so that the test will use an emulated UART for printing messages.
> > -# This will allow us to run the test on both debug and non-debug Xen builds.
> > -rm -rf xtf
> > -git clone https://gitlab.com/xen-project/fusa/xtf.git -b xtf-arm
> > -make -C xtf TESTS=tests/${xtf_test} CONFIG_SBSA_UART=y CONFIG_GICV2=y -j$(nproc)
> > -cp xtf/tests/${xtf_test}/test-mmu64le-${xtf_test} binaries/xtf-test
> > -
> > -# ImageBuilder
> > -echo 'MEMORY_START="0x40000000"
> > -MEMORY_END="0xC0000000"
> > -
> > -XEN="xen"
> > -DEVICE_TREE="virt-gicv2.dtb"
> > -
> > -XEN_CMD="console=dtuart console_timestamps=boot"
> > -
> > -DOMU_KERNEL[0]="xtf-test"
> > -DOMU_MEM[0]="128"
> > -
> > -NUM_DOMUS=1
> > -
> > -LOAD_CMD="tftpb"
> > -UBOOT_SOURCE="boot.source"
> > -UBOOT_SCRIPT="boot.scr"' > binaries/config
> > -
> > -rm -rf imagebuilder
> > -git clone --depth 1 https://gitlab.com/xen-project/imagebuilder.git
> > -bash imagebuilder/scripts/uboot-script-gen -t tftp -d binaries/ -c binaries/config
> > -
> > -# Run the test
> > -rm -f smoke.serial
> > -export TEST_CMD="./binaries/qemu-system-aarch64 \
> > - -machine virtualization=true \
> > - -cpu cortex-a57 -machine type=virt \
> > - -m 2048 -monitor none -serial stdio \
> > - -smp 2 \
> > - -no-reboot \
> > - -device virtio-net-pci,netdev=n0 \
> > - -netdev user,id=n0,tftp=binaries \
> > - -bios /usr/lib/u-boot/qemu_arm64/u-boot.bin"
> > -
> > -export UBOOT_CMD="virtio scan; dhcp; tftpb 0x40000000 boot.scr; source 0x40000000"
> > -export BOOT_MSG="Latest ChangeSet: "
> > -export TEST_LOG="smoke.serial"
> > -export PASSED="${passed}"
> > -
> > -./automation/scripts/console.exp | sed 's/\r\+$//'
> > --
> > 2.34.1
> >
> >
next prev parent reply other threads:[~2025-04-17 18:51 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-16 5:32 [PATCH v1 0/4] CI: updates to XTF CI runners dmkhn
2025-04-16 5:32 ` [PATCH v1 1/4] CI: unify x86 XTF test runner dmkhn
2025-04-17 0:16 ` Stefano Stabellini
2025-04-17 18:50 ` dmkhn
2025-04-16 5:32 ` [PATCH v1 2/4] CI: switch x86 EFI smoke test runner to qemu-xtf.sh dmkhn
2025-04-17 0:14 ` Stefano Stabellini
2025-04-17 18:34 ` dmkhn
2025-04-16 5:32 ` [PATCH v1 3/4] CI: switch arm64 XTF " dmkhn
2025-04-17 0:12 ` Stefano Stabellini
2025-04-17 18:51 ` dmkhn [this message]
2025-04-16 5:32 ` [PATCH v1 4/4] CI: add argo x86 XTF test dmkhn
2025-04-17 0:11 ` Stefano Stabellini
2025-04-17 18:37 ` dmkhn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aAFNluwjIrVS7Mxg@kraken \
--to=dmkhn@proton.me \
--cc=andrew.cooper3@citrix.com \
--cc=cardoe@cardoe.com \
--cc=dmukhin@ford.com \
--cc=marmarek@invisiblethingslab.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.