From nobody Fri Oct 31 16:34:15 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=quarantine dis=quarantine) header.from=proton.me Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1745024674141292.5058025242322; Fri, 18 Apr 2025 18:04:34 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.959750.1352023 (Exim 4.92) (envelope-from ) id 1u5wce-0000ro-G3; Sat, 19 Apr 2025 01:03:56 +0000 Received: by outflank-mailman (output) from mailman id 959750.1352023; Sat, 19 Apr 2025 01:03:56 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1u5wce-0000rh-Bp; Sat, 19 Apr 2025 01:03:56 +0000 Received: by outflank-mailman (input) for mailman id 959750; Sat, 19 Apr 2025 01:03:54 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1u5wcc-0000dd-FF for xen-devel@lists.xenproject.org; Sat, 19 Apr 2025 01:03:54 +0000 Received: from mail-4322.protonmail.ch (mail-4322.protonmail.ch [185.70.43.22]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 28c14c9c-1cba-11f0-9ffb-bf95429c2676; Sat, 19 Apr 2025 03:03:52 +0200 (CEST) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 28c14c9c-1cba-11f0-9ffb-bf95429c2676 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proton.me; s=protonmail; t=1745024631; x=1745283831; bh=F3bwVJxkxikxRIcz+L/Xuqu0AofNvAvp6z3DvGpiibo=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector:List-Unsubscribe:List-Unsubscribe-Post; b=bk2jsr2wc/WzkGbcZYGPRPfqxDI0GQfLOFH9hLtDcPDzIz9KkvLs/5Mju1gDNS1gr q8MIsHD2kvbq5W2qIHMIIxwcTJQc4cqIPcq5iFMawVtyasc52ReLZp/L+DJADhSrJs MTmaEWdR4c6hrZbk1dqNaE+SJGfb0WjWe7W5+M6IqHUlWV4vvuZ+cKW1Rd08mZsCsX xBXZzGc4WZRw6YOBuJHHdnerwnj1ftO4407+viYynvpENsCia/RhhA9RHWlQm44LTo HJ6Jr4RCBfIwW0hxsOWySSepnUllHy+kOyi09o1gZzClOAifm0DbdeCfggVLowPUjj WQAKlYb9Kja3g== Date: Sat, 19 Apr 2025 01:03:47 +0000 To: xen-devel@lists.xenproject.org From: dmkhn@proton.me Cc: andrew.cooper3@citrix.com, cardoe@cardoe.com, marmarek@invisiblethingslab.com, sstabellini@kernel.org, dmukhin@ford.com Subject: [PATCH v2 1/4] CI: unify x86 XTF test runner Message-ID: <20250419010319.2572518-2-dmukhin@ford.com> In-Reply-To: <20250419010319.2572518-1-dmukhin@ford.com> References: <20250419010319.2572518-1-dmukhin@ford.com> Feedback-ID: 123220910:user:proton X-Pm-Message-ID: 1096fe74d75838731cc9926ba41157d775b2d8a1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1745024676240019100 Content-Type: text/plain; charset="utf-8" From: Denis Mukhin Add test runner script qemu-xtf.sh which is allows any XTF x86 test to be easily executed. Test runner is invoked from the qemu-smoke* jobs with the hardcoded parameters. Each x86 XTF job lead time is reduced a bit since only the test-related code is built, not the entire XTF project. Add .gitignore to avoid committing test artifacts by mistake. Signed-off-by: Denis Mukhin --- Changes since v2: - removed TOP - dropped XEN_CONSOLE in favor of XEN_CMDLINE - fixup for XTF_SRC_CONFIG --- automation/gitlab-ci/test.yaml | 8 +- automation/scripts/.gitignore | 6 + .../scripts/include/configs/xtf-x86-64-config | 0 automation/scripts/include/xtf-runner | 131 ++++++++++++++++++ automation/scripts/include/xtf-x86-64 | 31 +++++ automation/scripts/qemu-smoke-x86-64.sh | 26 ---- automation/scripts/qemu-xtf.sh | 28 ++++ 7 files changed, 200 insertions(+), 30 deletions(-) create mode 100644 automation/scripts/.gitignore create mode 100644 automation/scripts/include/configs/xtf-x86-64-config create mode 100644 automation/scripts/include/xtf-runner create mode 100644 automation/scripts/include/xtf-x86-64 delete mode 100755 automation/scripts/qemu-smoke-x86-64.sh create mode 100755 automation/scripts/qemu-xtf.sh diff --git a/automation/gitlab-ci/test.yaml b/automation/gitlab-ci/test.yaml index 5ce445b78f..3adc841335 100644 --- a/automation/gitlab-ci/test.yaml +++ b/automation/gitlab-ci/test.yaml @@ -659,28 +659,28 @@ qemu-alpine-x86_64-gcc: qemu-smoke-x86-64-gcc: extends: .qemu-smoke-x86-64 script: - - ./automation/scripts/qemu-smoke-x86-64.sh pv 2>&1 | tee ${LOGFILE} + - ./automation/scripts/qemu-xtf.sh x86-64 pv64 example 2>&1 | tee ${LO= GFILE} needs: - debian-12-x86_64-gcc-debug =20 qemu-smoke-x86-64-clang: extends: .qemu-smoke-x86-64 script: - - ./automation/scripts/qemu-smoke-x86-64.sh pv 2>&1 | tee ${LOGFILE} + - ./automation/scripts/qemu-xtf.sh x86-64 pv64 example 2>&1 | tee ${LO= GFILE} needs: - debian-12-x86_64-clang-debug =20 qemu-smoke-x86-64-gcc-pvh: extends: .qemu-smoke-x86-64 script: - - ./automation/scripts/qemu-smoke-x86-64.sh pvh 2>&1 | tee ${LOGFILE} + - ./automation/scripts/qemu-xtf.sh x86-64 hvm64 example 2>&1 | tee ${L= OGFILE} needs: - debian-12-x86_64-gcc-debug =20 qemu-smoke-x86-64-clang-pvh: extends: .qemu-smoke-x86-64 script: - - ./automation/scripts/qemu-smoke-x86-64.sh pvh 2>&1 | tee ${LOGFILE} + - ./automation/scripts/qemu-xtf.sh x86-64 hvm64 example 2>&1 | tee ${L= OGFILE} needs: - debian-12-x86_64-clang-debug =20 diff --git a/automation/scripts/.gitignore b/automation/scripts/.gitignore new file mode 100644 index 0000000000..2f2d6e1ebd --- /dev/null +++ b/automation/scripts/.gitignore @@ -0,0 +1,6 @@ +!include + +binaries +smoke.serial +xen +xtf*/ diff --git a/automation/scripts/include/configs/xtf-x86-64-config b/automat= ion/scripts/include/configs/xtf-x86-64-config new file mode 100644 index 0000000000..e69de29bb2 diff --git a/automation/scripts/include/xtf-runner b/automation/scripts/inc= lude/xtf-runner new file mode 100644 index 0000000000..320eb65dc8 --- /dev/null +++ b/automation/scripts/include/xtf-runner @@ -0,0 +1,131 @@ +#!/bin/bash +# +# XTF test utilities. +# +# Environment variables: +# BOOT_MSG: Expected boot message +# FW_PREFIX: Firmware images path including '/' at the end +# PASSED: XTF test printout in case of a pass +# QEMU_PREFIX: QEMU path including '/' at the end +# TEST_LOG: Output log file +# UBOOT_CMD: U-Boot command line +# WORKDIR: Test working directory +# XEN_BINARY: Xen binary location +# XEN_CONSOLE: Xen console device name +# XTF_SRC_CONFIG: XTF config file +# XTF_SRC_BRANCH: XTF branch +# XTF_SRC_URI: XTF source code URI + +# Output log file +TEST_LOG=3D"${TEST_LOG:-${XEN_ROOT}/smoke.serial}" +# XTF test printout in case of a pass +PASSED=3D"${PASSED:-Test result: SUCCESS}" +# Expected boot message +BOOT_MSG=3D"${BOOT_MSG:-Latest ChangeSet: }" +# Test working directory +WORKDIR=3D"${WORKDIR:-${XEN_ROOT}/binaries}" +# XTF source code +XTF_SRC_CONFIG=3D"${XTF_SRC_CONFIG:-include/configs/xtf-${ARCH}-config}" + +function die() +{ + set +x + echo "FATAL: $*" >&2 + exit 1 +} + +# Build an XTF test binary. +# $1 Test variant. +# $2 Test name. +function xtf_build_binary() +{ + local xtf_variant=3D$1 + local xtf_name=3D$2 + local xtf_dir=3D"xtf-${ARCH}" + + # Crude check for local testing + if [ ! -d ${xtf_dir} ]; then + git clone ${XTF_SRC_URI} ${xtf_dir} -b ${XTF_SRC_BRANCH} + fi + + make \ + -C ${xtf_dir} \ + -j$(nproc) \ + $(tr '\n' ' ' < ${XTF_SRC_CONFIG}) \ + TESTS=3Dtests/${xtf_name} + + export XTF_NAME=3D"${xtf_name}" + export XTF_VARIANT=3D"${xtf_variant}" + export XTF_WORKDIR=3D"$(readlink -f ${xtf_dir})" + export XTF_BINARY=3D"${XTF_WORKDIR}/tests/${xtf_name}/test-${xtf_varia= nt}-${xtf_name}" +} + +# Build Xen command line for running an XTF test. +# $1 Test variant. +# $2 Test name. +function xtf_build_cmdline() +{ + local xtf_variant=3D$1 + local xtf_name=3D$2 + declare -a cmdline=3D() + + cmdline+=3D("${XEN_CMDLINE}") + + # NB: OK to have hvm64, which is x86-only variant + if [[ $xtf_variant =3D=3D "hvm64" ]]; then + cmdline+=3D("dom0-iommu=3Dnone dom0=3Dpvh") + fi + + export XEN_CMDLINE=3D"${cmdline[@]}" +} + +# Build an XTF test environment. +# $1 Test variant. +# $2 Test name. +function xtf_build_test() +{ + local v=3D$1 + local xtf_name=3D$2 + local xtf_variant=3D"" + + for x in ${XTF_SRC_VARIANTS}; do + if [[ "${x}" =3D=3D "${v}" ]]; then + xtf_variant=3D${v} + break + fi + done + if [[ -z $xtf_variant ]]; then + die "unsupported test variant '$1', supported variants: ${XTF_SRC_= VARIANTS}" + fi + + xtf_build_binary ${xtf_variant} ${xtf_name} + xtf_build_cmdline ${xtf_variant} ${xtf_name} +} + +# Execute an XTF test. +function xtf_run_test() +{ + rm -f ${TEST_LOG} + export BOOT_MSG PASSED TEST_CMD TEST_LOG UBOOT_CMD + ./console.exp | sed 's/\r\+$//' +} + +# Setup environment and run an XTF test. +# $1 Test variant. +# $2 Test name. +function xtf_test() +{ + # Out: FW_*, QEMU_*, XEN_{BINARY,CONSOLE}, XTF_SRC_* + xtf_arch_prepare + + # In: XTF_SRC_* + # OUt: XTF_{BINARY,NAME,VARIANT,WORKDIR} and XEN_CMDLINE + xtf_build_test $@ + + # In: FW_*, QEMU_*, XTF_*, XEN_* + # Out: BOOT_MSG, PASSED, TEST_{CMD,LOG}, UBOOT_CMD + xtf_arch_setup + + # In: BOOT_MSG, PASSED, TEST_{CMD,LOG}, UBOOT_CMD + xtf_run_test +} diff --git a/automation/scripts/include/xtf-x86-64 b/automation/scripts/inc= lude/xtf-x86-64 new file mode 100644 index 0000000000..b1b0cc201e --- /dev/null +++ b/automation/scripts/include/xtf-x86-64 @@ -0,0 +1,31 @@ +#!/bin/bash +# +# XTF test utilities (x86_64). +# + +# Arch-specific environment overrides. +function xtf_arch_prepare() +{ + export FW_PREFIX=3D"${FW_PREFIX:-}" + export QEMU_PREFIX=3D"${QEMU_PREFIX:-}" + export XEN_BINARY=3D"${XEN_BINARY:-${WORKDIR}/xen}" + export XEN_CMDLINE=3D"${XEN_CMDLINE:-loglvl=3Dall noreboot console_tim= estamps=3Dboot console=3Dcom1}" + export XTF_SRC_BRANCH=3D"${XTF_SRC_BRANCH:-master}" + export XTF_SRC_URI=3D"${XTF_SRC_URI:-https://xenbits.xen.org/git-http/= xtf.git}" + export XTF_SRC_VARIANTS=3D"hvm64 pv64" +} + +# Perform arch-specific XTF environment setup. +function xtf_arch_setup() +{ + export TEST_CMD=3D"${QEMU_PREFIX}qemu-system-x86_64 \ + -no-reboot \ + -nographic \ + -monitor none \ + -serial stdio \ + -m 512 \ + -kernel ${XEN_BINARY} \ + -initrd ${XTF_BINARY} \ + -append \"${XEN_CMDLINE}\" \ + " +} diff --git a/automation/scripts/qemu-smoke-x86-64.sh b/automation/scripts/q= emu-smoke-x86-64.sh deleted file mode 100755 index da0c26cc2f..0000000000 --- a/automation/scripts/qemu-smoke-x86-64.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash - -set -ex -o pipefail - -# variant should be either pv or pvh -variant=3D$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=3Dtest-hvm64-example extra=3D"dom0-iommu=3Dnone dom0=3Dpvh" = ;; - *) k=3Dtest-pv64-example extra=3D ;; -esac - -rm -f smoke.serial -export TEST_CMD=3D"qemu-system-x86_64 -nographic -kernel binaries/xen \ - -initrd xtf/tests/example/$k \ - -append \"loglvl=3Dall console=3Dcom1 noreboot console_timestamps= =3Dboot $extra\" \ - -m 512 -monitor none -serial stdio" - -export TEST_LOG=3D"smoke.serial" -export PASSED=3D"Test result: SUCCESS" - -./automation/scripts/console.exp | sed 's/\r\+$//' diff --git a/automation/scripts/qemu-xtf.sh b/automation/scripts/qemu-xtf.sh new file mode 100755 index 0000000000..55c221b36d --- /dev/null +++ b/automation/scripts/qemu-xtf.sh @@ -0,0 +1,28 @@ +#!/bin/bash +# +# XTF test runner (QEMU). +# + +set -e -o pipefail + +if [ $# -lt 3 ]; then + echo "Usage: $(basename $0) ARCH XTF-VARIANT XTF-NAME" + exit 0 +fi + +export ARCH=3D"$1" +shift + +set -x + +export XEN_ROOT=3D"${PWD}" +cd $(dirname $0) + +source include/xtf-runner + +if [ ! -f "include/xtf-${ARCH}" ]; then + die "unsupported architecture '${ARCH}'" +fi +source include/xtf-${ARCH} + +xtf_test $@ --=20 2.34.1 From nobody Fri Oct 31 16:34:15 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=quarantine dis=quarantine) header.from=proton.me Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1745024673691233.5027032085336; Fri, 18 Apr 2025 18:04:33 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.959751.1352033 (Exim 4.92) (envelope-from ) id 1u5wch-00016D-LW; Sat, 19 Apr 2025 01:03:59 +0000 Received: by outflank-mailman (output) from mailman id 959751.1352033; Sat, 19 Apr 2025 01:03:59 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1u5wch-000166-Ig; Sat, 19 Apr 2025 01:03:59 +0000 Received: by outflank-mailman (input) for mailman id 959751; Sat, 19 Apr 2025 01:03:58 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1u5wcg-0000dd-Gq for xen-devel@lists.xenproject.org; Sat, 19 Apr 2025 01:03:58 +0000 Received: from mail-24416.protonmail.ch (mail-24416.protonmail.ch [109.224.244.16]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 2b6eadf7-1cba-11f0-9ffb-bf95429c2676; Sat, 19 Apr 2025 03:03:56 +0200 (CEST) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 2b6eadf7-1cba-11f0-9ffb-bf95429c2676 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proton.me; s=suphjhcguffetgdy2q7waelgwe.protonmail; t=1745024635; x=1745283835; bh=HfwyqHc65a2c6fDlXXG5iL28PrCHMVj+m8sxLB9s/3E=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector:List-Unsubscribe:List-Unsubscribe-Post; b=U02Fc05+VSwdhZCmk8u6uqjSh+P8wH+5MNipgM0MTeSTWplXoiufaw88OilNT/lXI UNikoAnadt+t0/oO/Uvpqowitq1nf2WIjc223hN5Bn7X6L2w6wprP/9l5qFiRU+zGc WPl5YSZprgVHlKq0KnaKoudIdt94bNUQIZ7v8VTAwHH0O5XJcwt+ZOr6vOIvSOA5CF oy0MaQ2RuraL5RiRoQaA23d9hMfnFUkxW1T7gHS56AW0pKsslEjeNsakigrl/aLcGh YXJKXgAoBIk5kF/J7lCoTJPg96VGOmhdz25MAvBpbTAMDr+egcKmSumtT0dmoho1Z5 TFztuO77Vie8w== Date: Sat, 19 Apr 2025 01:03:51 +0000 To: xen-devel@lists.xenproject.org From: dmkhn@proton.me Cc: andrew.cooper3@citrix.com, cardoe@cardoe.com, marmarek@invisiblethingslab.com, sstabellini@kernel.org, dmukhin@ford.com Subject: [PATCH v2 2/4] CI: switch x86 EFI smoke test runner to qemu-xtf.sh Message-ID: <20250419010319.2572518-3-dmukhin@ford.com> In-Reply-To: <20250419010319.2572518-1-dmukhin@ford.com> References: <20250419010319.2572518-1-dmukhin@ford.com> Feedback-ID: 123220910:user:proton X-Pm-Message-ID: b251f973a9d426487d883a84237249e3db943fe0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1745024675947019000 Content-Type: text/plain; charset="utf-8" From: Denis Mukhin Use qemu-xtf.sh for qemu-smoke-x86-64-gcc-efi job. Lead time is reduced a bit since not all XTF code base is built, just the required test. Signed-off-by: Denis Mukhin --- Changes since v2: - removed TOP - dropped XEN_CONSOLE in favor of XEN_CMDLINE --- automation/gitlab-ci/test.yaml | 2 +- .../include/configs/xtf-x86-64-efi-config | 0 automation/scripts/include/xtf-x86-64-efi | 52 +++++++++++++++++++ automation/scripts/qemu-smoke-x86-64-efi.sh | 43 --------------- 4 files changed, 53 insertions(+), 44 deletions(-) create mode 100644 automation/scripts/include/configs/xtf-x86-64-efi-config create mode 100644 automation/scripts/include/xtf-x86-64-efi delete 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 3adc841335..ca1e4eb528 100644 --- a/automation/gitlab-ci/test.yaml +++ b/automation/gitlab-ci/test.yaml @@ -687,7 +687,7 @@ qemu-smoke-x86-64-clang-pvh: qemu-smoke-x86-64-gcc-efi: extends: .qemu-smoke-x86-64 script: - - ./automation/scripts/qemu-smoke-x86-64-efi.sh pv 2>&1 | tee ${LOGFIL= E} + - ./automation/scripts/qemu-xtf.sh x86-64-efi hvm64 example 2>&1 | tee= ${LOGFILE} needs: - debian-12-x86_64-gcc-debug =20 diff --git a/automation/scripts/include/configs/xtf-x86-64-efi-config b/aut= omation/scripts/include/configs/xtf-x86-64-efi-config new file mode 100644 index 0000000000..e69de29bb2 diff --git a/automation/scripts/include/xtf-x86-64-efi b/automation/scripts= /include/xtf-x86-64-efi new file mode 100644 index 0000000000..e0d821b3f6 --- /dev/null +++ b/automation/scripts/include/xtf-x86-64-efi @@ -0,0 +1,52 @@ +#!/bin/bash +# +# XTF test utilities (x86_64, EFI). +# + +# Arch-specific environment overrides. +function xtf_arch_prepare() +{ + export FW_PREFIX=3D"${FW_PREFIX:-/usr/share/OVMF/}" + export QEMU_PREFIX=3D"${QEMU_PREFIX:-}" + export XEN_BINARY=3D"${XEN_BINARY:-${WORKDIR}/xen.efi}" + export XEN_CMDLINE=3D"${XEN_CMDLINE:-loglvl=3Dall noreboot console_tim= estamps=3Dboot console=3Dcom1}" + export XTF_SRC_BRANCH=3D"${XTF_SRC_BRANCH:-master}" + export XTF_SRC_URI=3D"${XTF_SRC_URI:-https://xenbits.xen.org/git-http/= xtf.git}" + export XTF_SRC_VARIANTS=3D"hvm64 pv64" +} + +# Perform arch-specific XTF environment setup. +function xtf_arch_setup() +{ + local esp_dir=3D"${WORKDIR}/boot-esp" + local efi_dir=3D"${esp_dir}/EFI/BOOT" + + # Generate EFI boot environment + mkdir -p ${efi_dir} + cp ${XEN_BINARY} ${efi_dir}/BOOTX64.EFI + cp ${XTF_BINARY} ${efi_dir}/kernel + + cat > ${efi_dir}/BOOTX64.cfg < boot-esp/EFI/BOOT/BOOTX64.cfg < Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1745024680994994.6445175428911; Fri, 18 Apr 2025 18:04:40 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.959752.1352043 (Exim 4.92) (envelope-from ) id 1u5wcn-0001Oe-1N; Sat, 19 Apr 2025 01:04:05 +0000 Received: by outflank-mailman (output) from mailman id 959752.1352043; Sat, 19 Apr 2025 01:04:04 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1u5wcm-0001OO-U5; Sat, 19 Apr 2025 01:04:04 +0000 Received: by outflank-mailman (input) for mailman id 959752; Sat, 19 Apr 2025 01:04:03 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1u5wcl-0000dd-Is for xen-devel@lists.xenproject.org; Sat, 19 Apr 2025 01:04:03 +0000 Received: from mail-10631.protonmail.ch (mail-10631.protonmail.ch [79.135.106.31]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 2e827358-1cba-11f0-9ffb-bf95429c2676; Sat, 19 Apr 2025 03:04:02 +0200 (CEST) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 2e827358-1cba-11f0-9ffb-bf95429c2676 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proton.me; s=protonmail; t=1745024641; x=1745283841; bh=ZuoQGNqtJDBsakgNFkCMESjtGTtCKJIn94RMss2VMrY=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector:List-Unsubscribe:List-Unsubscribe-Post; b=ZPgdWvZpeXzvObcpUrHiRZ8QAeHGV4VUq1TsJTpbQQgzQjm5nbnzZMgSXzTU8jYF9 PGp2ozGHpRq1w1PEOnXePfz5SMXmEOehbwSniuu4oMR1RtjtqJqQ4JcDt0HuLx8seu wDpBYYIWGSo6HwTvoFcx02tbPfDZg3iTsMhvLLcko5lErdPUskzVHYyTD829XlH7h1 AaNrhTb7pr0DbiWxHd6t3tBDDBaHBIqj8hLu7GvPeqlFa3+G80fIc68lO8FA6Bm6Ja BZ3pnuCmSeU48JP2ADZj/QgMQ3aFM9GTXwjnmBwVU/9GUEQXkemXCIrz5xHCb1eVTN C3YxyslR5g5Qw== Date: Sat, 19 Apr 2025 01:03:57 +0000 To: xen-devel@lists.xenproject.org From: dmkhn@proton.me Cc: andrew.cooper3@citrix.com, cardoe@cardoe.com, marmarek@invisiblethingslab.com, sstabellini@kernel.org, dmukhin@ford.com Subject: [PATCH v2 3/4] CI: switch arm64 XTF test runner to qemu-xtf.sh Message-ID: <20250419010319.2572518-4-dmukhin@ford.com> In-Reply-To: <20250419010319.2572518-1-dmukhin@ford.com> References: <20250419010319.2572518-1-dmukhin@ford.com> Feedback-ID: 123220910:user:proton X-Pm-Message-ID: af5b6be86f9516bfd0d40e940a408460ceb552fb MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1745024681724019000 Content-Type: text/plain; charset="utf-8" From: Denis Mukhin Hook arm64 QEMU configuration to qemu-xtf.sh and use new script in arm64 CI jobs. Signed-off-by: Denis Mukhin Reviewed-by: Stefano Stabellini --- Changes since v2: - removed TOP - dropped XEN_CONSOLE in favor of XEN_CMDLINE - I kept Stefano's R-b since the change was trivial --- 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 =20 binaries +imagebuilder smoke.serial xen xtf*/ + +*.rom diff --git a/automation/scripts/include/configs/xtf-arm64-config b/automati= on/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=3Dy +CONFIG_SBSA_UART=3Dy diff --git a/automation/scripts/include/xtf-arm64 b/automation/scripts/incl= ude/xtf-arm64 new file mode 100644 index 0000000000..1a318b7aa0 --- /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=3D"${FW_PREFIX:-/usr/lib/u-boot/qemu_arm64/}" + export QEMU_PREFIX=3D"${QEMU_PREFIX:-${WORKDIR}/}" + export XEN_BINARY=3D"${XEN_BINARY:-${WORKDIR}/xen}" + export XEN_CMDLINE=3D"${XEN_CMDLINE:-loglvl=3Dall noreboot console_tim= estamps=3Dboot console=3Ddtuart}" + export XTF_SRC_BRANCH=3D"${XTF_SRC_BRANCH:-xtf-arm}" + export XTF_SRC_URI=3D"${XTF_SRC_URI:-https://gitlab.com/xen-project/fu= sa/xtf.git}" + export XTF_SRC_VARIANTS=3D"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 ]; then + git clone --depth 1 https://gitlab.com/xen-project/imagebuilder.git + fi + + cat > ${WORKDIR}/config < 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 binarie= s/config - -# Run the test -rm -f smoke.serial -export TEST_CMD=3D"./binaries/qemu-system-aarch64 \ - -machine virtualization=3Dtrue \ - -cpu cortex-a57 -machine type=3Dvirt \ - -m 2048 -monitor none -serial stdio \ - -smp 2 \ - -no-reboot \ - -device virtio-net-pci,netdev=3Dn0 \ - -netdev user,id=3Dn0,tftp=3Dbinaries \ - -bios /usr/lib/u-boot/qemu_arm64/u-boot.bin" - -export UBOOT_CMD=3D"virtio scan; dhcp; tftpb 0x40000000 boot.scr; source 0= x40000000" -export BOOT_MSG=3D"Latest ChangeSet: " -export TEST_LOG=3D"smoke.serial" -export PASSED=3D"${passed}" - -./automation/scripts/console.exp | sed 's/\r\+$//' --=20 2.34.1 From nobody Fri Oct 31 16:34:15 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=quarantine dis=quarantine) header.from=proton.me Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1745024696973659.1073248216511; Fri, 18 Apr 2025 18:04:56 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.959755.1352052 (Exim 4.92) (envelope-from ) id 1u5wcu-0001uB-9s; Sat, 19 Apr 2025 01:04:12 +0000 Received: by outflank-mailman (output) from mailman id 959755.1352052; Sat, 19 Apr 2025 01:04:12 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1u5wcu-0001tM-6k; Sat, 19 Apr 2025 01:04:12 +0000 Received: by outflank-mailman (input) for mailman id 959755; Sat, 19 Apr 2025 01:04:10 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1u5wcs-0001gk-Cx for xen-devel@lists.xenproject.org; Sat, 19 Apr 2025 01:04:10 +0000 Received: from mail-4322.protonmail.ch (mail-4322.protonmail.ch [185.70.43.22]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 32a17046-1cba-11f0-9eb0-5ba50f476ded; Sat, 19 Apr 2025 03:04:09 +0200 (CEST) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 32a17046-1cba-11f0-9eb0-5ba50f476ded DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proton.me; s=protonmail; t=1745024648; x=1745283848; bh=IjOyuXSKVCXNqvxd/Bt16D2Dy967L2dTHaZI1BEueCQ=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector:List-Unsubscribe:List-Unsubscribe-Post; b=d9ojudO7Y72loNGxZ4pf1ZgXBXgwstNtyz9/fG4VP8NX4EKuGF/0FjBqDsJB8r2fG kyhVoaujIy281UAmUkx4W+nNaSyVcD3tE3cqz/r2Yivpjs4c6N8uIiFUAUPhijMvdT nI5VQulV6nPxXtvIfYjp38o83UL3csK2l1Z11BR5yWwnaLFfTudVhYeSPI6GpyihHd GDGmjPXLA1/bhQLRnVE4VM8b96eLQJK9Y9/VD4i/K5ed/LIfZgok0XO3tqMiMMvZd+ +lvfT8k7YdTPI6/s0VP6MICLJjwvlbg0dFwUTmD8l0/mkqkbYStOJNg8oHajq9RsEg 5aElXHkRC7xJg== Date: Sat, 19 Apr 2025 01:04:03 +0000 To: xen-devel@lists.xenproject.org From: dmkhn@proton.me Cc: andrew.cooper3@citrix.com, cardoe@cardoe.com, marmarek@invisiblethingslab.com, sstabellini@kernel.org, dmukhin@ford.com Subject: [PATCH v2 4/4] CI: add argo x86 XTF test Message-ID: <20250419010319.2572518-5-dmukhin@ford.com> In-Reply-To: <20250419010319.2572518-1-dmukhin@ford.com> References: <20250419010319.2572518-1-dmukhin@ford.com> Feedback-ID: 123220910:user:proton X-Pm-Message-ID: 0eed745644dc4aa40ba247087c7f5b6212e8ffce MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1745024697656019000 Content-Type: text/plain; charset="utf-8" From: Denis Mukhin Introduce new CI job to run x86 XTF argo test under QEMU to smoke test argo feature functionality in upstream CI. The new job lead time is ~30s, limit max job duration to 60s. Signed-off-by: Denis Mukhin Reviewed-by: Stefano Stabellini --- Depends on https://lore.kernel.org/xen-devel/20250416050443.919751-1-dmukhin@ford.c= om/ --- automation/gitlab-ci/test.yaml | 9 +++++++++ automation/scripts/include/xtf-runner | 7 +++++++ 2 files changed, 16 insertions(+) diff --git a/automation/gitlab-ci/test.yaml b/automation/gitlab-ci/test.yaml index d6e4a0a622..9001efb45c 100644 --- a/automation/gitlab-ci/test.yaml +++ b/automation/gitlab-ci/test.yaml @@ -691,6 +691,15 @@ qemu-smoke-x86-64-gcc-efi: needs: - debian-12-x86_64-gcc-debug =20 +qemu-xtf-argo-x86_64-gcc-debug: + extends: .qemu-smoke-x86-64 + variables: + TEST_TIMEOUT_OVERRIDE: 60 + script: + - ./automation/scripts/qemu-xtf.sh x86-64 pv64 argo 2>&1 | tee ${LOGFI= LE} + needs: + - alpine-3.18-gcc-debug + qemu-smoke-riscv64-gcc: extends: .qemu-riscv64 script: diff --git a/automation/scripts/include/xtf-runner b/automation/scripts/inc= lude/xtf-runner index 320eb65dc8..b7fea52dad 100644 --- a/automation/scripts/include/xtf-runner +++ b/automation/scripts/include/xtf-runner @@ -68,6 +68,9 @@ function xtf_build_cmdline() local xtf_variant=3D$1 local xtf_name=3D$2 declare -a cmdline=3D() + declare -A per_test_args=3D( + [argo]=3D"argo=3D1 mac-permissive=3D1" + ) =20 cmdline+=3D("${XEN_CMDLINE}") =20 @@ -76,6 +79,10 @@ function xtf_build_cmdline() cmdline+=3D("dom0-iommu=3Dnone dom0=3Dpvh") fi =20 + if [[ -v per_test_args[${xtf_name}] ]]; then + cmdline+=3D("${per_test_args[${xtf_name}]}") + fi + export XEN_CMDLINE=3D"${cmdline[@]}" } =20 --=20 2.34.1