From patchwork Wed Apr 16 05:32:37 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Denis Mukhin X-Patchwork-Id: 14053181 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 051A8C369BA for ; Wed, 16 Apr 2025 05:32:52 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.954995.1348879 (Exim 4.92) (envelope-from ) id 1u4vO8-0004ht-Q4; Wed, 16 Apr 2025 05:32:44 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 954995.1348879; Wed, 16 Apr 2025 05:32:44 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1u4vO8-0004hk-Mn; Wed, 16 Apr 2025 05:32:44 +0000 Received: by outflank-mailman (input) for mailman id 954995; Wed, 16 Apr 2025 05:32:43 +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 1u4vO7-0003si-FI for xen-devel@lists.xenproject.org; Wed, 16 Apr 2025 05:32:43 +0000 Received: from mail-10629.protonmail.ch (mail-10629.protonmail.ch [79.135.106.29]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 3769d7d7-1a84-11f0-9ffb-bf95429c2676; Wed, 16 Apr 2025 07:32:41 +0200 (CEST) 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: 3769d7d7-1a84-11f0-9ffb-bf95429c2676 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proton.me; s=protonmail; t=1744781560; x=1745040760; bh=2pegpKuJrXYQi1LaLPh2IQLU6dFKWwZGALvyqz7kbTQ=; 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=EkNHT+Xd7YmF2Nj8KaZH5qeVvdAZie/+1Vg1TD2S5FUg7CGnnQDqxxc6tYfv6aZH4 16P03pNH+JfEu6TLAUYlSJXC+YM2Q1pM9N8ntIj5PNz3O4KIiwJdt3IwXakA66eWkv QDNObfsrUQmLjwdsxeUxs+uXHOERc64s/CiUGn3y1NqvJ0rl1IsFrohvGg0VnAkRUB 7dyEACndYKPFN22peWgosNPj2Mnmtkkmns+UGQjcQVuG8A8M7PcmjM/NvEyQskAw+k MDp2RBEgCXyCMvmsNC+1tEyfp4zomKwRISuqbRyOP3Jif36SRv3Sr8TGsV1eMgpLNw KafAHLOdzBcdw== Date: Wed, 16 Apr 2025 05:32:37 +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 v1 3/4] CI: switch arm64 XTF test runner to qemu-xtf.sh Message-ID: <20250416053213.921444-4-dmukhin@ford.com> In-Reply-To: <20250416053213.921444-1-dmukhin@ford.com> References: <20250416053213.921444-1-dmukhin@ford.com> Feedback-ID: 123220910:user:proton X-Pm-Message-ID: 5e8b4d47754f1fc6a00317c667c22976030e8f80 MIME-Version: 1.0 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 --- 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 < 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\+$//'