From nobody Fri Nov 29 08:31:00 2024 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=pass; 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=pass(p=none dis=none) header.from=kernel.org ARC-Seal: i=1; a=rsa-sha256; t=1647481641; cv=none; d=zohomail.com; s=zohoarc; b=fUBgOV7VA+dpZSA0XRg/l7ukmelLnxxdVxmPi2rlZFPIarLP922F6yz05RyJ1gK2a3aE18j18w/RH8uFush5fbQrnYyVOpzzyXYe8ToRjluFfuTnlnvPJP37rF7BMR56tMSbVJhMxK2aZ7mZJcnnTIk5Y3Y+NZGa57R1JgwYkdM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1647481641; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=YoasG8ecnLnunbATCPdmos3QTnSGLAt/Y5fcP35BS1I=; b=jfBFdHLbp7rEekYJQubBypNPr7o/m/kavzKDr8gZJO0BMfesVRKHQ0EIQbO2PX6JmvLLNX4LzqhBkEYsrFiXKviLRk0YefHd/crc87O6P2nHtiDfRzLYks+Ive5XOaR7M7JDvEEtYQBXrxDgN1/2+ekBugP9bm8UBn9Rof7gzaE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1647481641592618.7067292901012; Wed, 16 Mar 2022 18:47:21 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.291309.494379 (Exim 4.92) (envelope-from ) id 1nUfED-0003ij-Lu; Thu, 17 Mar 2022 01:47:01 +0000 Received: by outflank-mailman (output) from mailman id 291309.494379; Thu, 17 Mar 2022 01:47:01 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nUfED-0003iM-Hd; Thu, 17 Mar 2022 01:47:01 +0000 Received: by outflank-mailman (input) for mailman id 291309; Thu, 17 Mar 2022 01:46:59 +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 1nUfEB-0003RA-Hx for xen-devel@lists.xenproject.org; Thu, 17 Mar 2022 01:46:59 +0000 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 21275354-a594-11ec-8eba-a37418f5ba1a; Thu, 17 Mar 2022 02:46:58 +0100 (CET) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id A697860B38; Thu, 17 Mar 2022 01:46:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BCE81C36AE2; Thu, 17 Mar 2022 01:46:55 +0000 (UTC) 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: 21275354-a594-11ec-8eba-a37418f5ba1a DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1647481616; bh=G1Wy2NSZrz87jgZI1YnX2YFk559ZAdmMFvJt2aVzrpU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cfs9H/ois/FiUrsGhlwCj4/Ks1XAgseJTEvANktBADmp6zUgqDn8T5Fo3c8psxmel 7yXAWtc6IY5hkDZDMhUy2GBEvOK6GwG8izMwVx54dPA/R4h9KUEksJd3gklJ4jic4X NPoad+oRnDDPb0wUc9tGS99b+crXAiwfXJ6k2lx/l6h3L2at3SiWtvKAEU7HSyo+J+ pRjPlaq05VRg8/u4Izxp0JOZaqmEYlr/tiVA0TwoY78qLzsOJtRUk0MurwyryqbPyE NuVZtvyCM7TXm921fB2y+cVE6D3NGro+2AsU3HzslCli9gbofkJhWw9xDOU5GL+4W8 vAAjBTglC39Ig== From: Stefano Stabellini To: xen-devel@lists.xenproject.org Cc: sstabellini@kernel.org, cardoe@cardoe.com, wl@xen.org, andrew.cooper3@citrix.com, anthony.perard@citrix.com, bertrand.marquis@arm.com, Stefano Stabellini Subject: [PATCH v2 2/2] gitlab-ci: add an ARM32 qemu-based smoke test Date: Wed, 16 Mar 2022 18:46:53 -0700 Message-Id: <20220317014653.2427386-2-sstabellini@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @kernel.org) X-ZM-MESSAGEID: 1647482545132100001 Content-Type: text/plain; charset="utf-8" Add a minimal ARM32 smoke test based on qemu-system-arm, as provided by the test-artifacts qemu container. The minimal test simply boots Xen (built from previous build stages) and Dom0. The test is fetching the Dom0 kernel and initrd from Debian Jessie: they work just fine and this way we don't have to maintain a build for them too. Signed-off-by: Stefano Stabellini --- Changes in v2: - improve comments - don't limit dom0 cpus - decrease mem to 1024M and dom0_mem=3D512M - use Debian Bullseye instead of Jessie --- automation/gitlab-ci/test.yaml | 23 ++++++++ automation/scripts/qemu-smoke-arm32.sh | 72 ++++++++++++++++++++++++++ 2 files changed, 95 insertions(+) create mode 100755 automation/scripts/qemu-smoke-arm32.sh diff --git a/automation/gitlab-ci/test.yaml b/automation/gitlab-ci/test.yaml index ec2a2e1607..42cd725a12 100644 --- a/automation/gitlab-ci/test.yaml +++ b/automation/gitlab-ci/test.yaml @@ -95,6 +95,29 @@ qemu-smoke-arm64-gcc: - /^coverity-tested\/.*/ - /^stable-.*/ =20 +qemu-smoke-arm32-gcc: + stage: test + image: registry.gitlab.com/xen-project/xen/${CONTAINER} + variables: + CONTAINER: debian:unstable-arm64v8 + script: + - ./automation/scripts/qemu-smoke-arm32.sh 2>&1 | tee qemu-smoke-arm32= .log + dependencies: + - debian-unstable-gcc-arm32 + - qemu-system-aarch64-6.0.0-arm32-export + artifacts: + paths: + - smoke.serial + - '*.log' + when: always + tags: + - arm64 + except: + - master + - smoke + - /^coverity-tested\/.*/ + - /^stable-.*/ + qemu-smoke-x86-64-gcc: stage: test image: registry.gitlab.com/xen-project/xen/${CONTAINER} diff --git a/automation/scripts/qemu-smoke-arm32.sh b/automation/scripts/qe= mu-smoke-arm32.sh new file mode 100755 index 0000000000..11883bed3c --- /dev/null +++ b/automation/scripts/qemu-smoke-arm32.sh @@ -0,0 +1,72 @@ +#!/bin/bash + +set -ex + +export DEBIAN_FRONTENT=3Dnoninteractive +apt-get -qy update +apt-get -qy install --no-install-recommends device-tree-compiler \ + curl + +cd binaries +curl -fsSLO http://http.us.debian.org/debian/dists/jessie/main/installer-a= rmhf/current/images/netboot/vmlinuz +curl -fsSLO http://http.us.debian.org/debian/dists/jessie/main/installer-a= rmhf/current/images/netboot/initrd.gz + +kernel=3D`stat -L --printf=3D"%s" vmlinuz` +initrd=3D`stat -L --printf=3D"%s" initrd.gz` + +# For Xen, we need a couple of more node. Dump the DT from QEMU and add th= em +# 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 +./qemu-system-arm \ + -machine virt-6.0 \ + -machine virtualization=3Dtrue \ + -smp 4 \ + -m 1024 \ + -serial stdio \ + -monitor none \ + -display none \ + -machine dumpdtb=3Dvirt.dtb + +dtc -I dtb -O dts virt.dtb > virt.dts + +cat >> virt.dts << EOF +/ { + chosen { + #address-cells =3D <0x2>; + #size-cells =3D <0x2>; + stdout-path =3D "/pl011@9000000"; + xen,xen-bootargs =3D "console=3Ddtuart dtuart=3D/pl011@9000000 dom= 0_mem=3D512M bootscrub=3D0"; + xen,dom0-bootargs =3D "console=3Dtty0 console=3Dhvc0 earlyprintk clk_ign= ore_unused root=3D/dev/ram0 rdinit=3D/bin/sh init=3D/bin/sh"; + dom0 { + compatible =3D "xen,linux-zimage", "xen,multiboot-module"; + reg =3D <0x0 0x1000000 0x0 $kernel>; + }; + dom0-ramdisk { + compatible =3D "xen,linux-initrd", "xen,multiboot-module"; + reg =3D <0x0 0x3200000 0x0 $initrd>; + }; + }; +}; +EOF +dtc -I dts -O dtb virt.dts > virt.dtb + +rm -f smoke.serial +set +e +timeout -k 1 240 \ +./qemu-system-arm \ + -machine virt-6.0 \ + -machine virtualization=3Dtrue \ + -smp 4 \ + -m 1024 \ + -serial stdio \ + -monitor none \ + -display none \ + -dtb virt.dtb \ + -no-reboot \ + -kernel ./xen \ + -device loader,file=3D./vmlinuz,addr=3D0x1000000 \ + -device loader,file=3D./initrd.gz,addr=3D0x3200000 |& tee smoke.serial + +set -e +(grep -q "^BusyBox" smoke.serial) || exit 1 +exit 0 --=20 2.25.1