From patchwork Wed Feb 19 02:56:51 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marek_Marczykowski-G=C3=B3recki?= X-Patchwork-Id: 13981444 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 B702DC021AF for ; Wed, 19 Feb 2025 02:57:57 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.892317.1301344 (Exim 4.92) (envelope-from ) id 1tkaHV-0003NW-LW; Wed, 19 Feb 2025 02:57:49 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 892317.1301344; Wed, 19 Feb 2025 02:57:49 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tkaHV-0003NI-IO; Wed, 19 Feb 2025 02:57:49 +0000 Received: by outflank-mailman (input) for mailman id 892317; Wed, 19 Feb 2025 02:57:48 +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 1tkaHU-00020f-FB for xen-devel@lists.xenproject.org; Wed, 19 Feb 2025 02:57:48 +0000 Received: from fout-a4-smtp.messagingengine.com (fout-a4-smtp.messagingengine.com [103.168.172.147]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 449a7079-ee6d-11ef-9aa8-95dc52dad729; Wed, 19 Feb 2025 03:57:34 +0100 (CET) Received: from phl-compute-03.internal (phl-compute-03.phl.internal [10.202.2.43]) by mailfout.phl.internal (Postfix) with ESMTP id 12BE113809B6; Tue, 18 Feb 2025 21:57:34 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-03.internal (MEProxy); Tue, 18 Feb 2025 21:57:34 -0500 Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 18 Feb 2025 21:57:32 -0500 (EST) 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: 449a7079-ee6d-11ef-9aa8-95dc52dad729 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= invisiblethingslab.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1739933854; x=1740020254; bh=qEM2A4la9R xFkprKX9G/QxR7b4Sa8TkAC496vEy+pno=; b=dUOKVpBY64vl5/4jsw9FPzAMRf 7EUtsXMRSo7pW5rXxFmYb78KLyVFzqvxgsudeP5fS71JBb7DO7wulGUzW1LhJ27Y R3IC7uMKCWU4f0m874+8A5ZhLbUgOjKMPz1PNF4JJxSZ30/LcsaVe7hen20c2m9v xRl1DAb+L/QLdl9s7uNReQHLqNPya6davK5JyBaicd0ca2w9H3pVN5fx7gLEblTo /aaLa4Hl9KWW8zvfUj6DD1Ag1w8QlzqGIMXWSpyXrtD6dBGreACC26luy1UtmY6t 6YahetMASzyN53JAqSnSGOWPD7PgGX9d/W6+DP04icC+bkjC6kIFnkKYiJUw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1739933854; x= 1740020254; bh=qEM2A4la9RxFkprKX9G/QxR7b4Sa8TkAC496vEy+pno=; b=p fVfMe8zd6nzUdOhEgpVnWcfgndNT2r32ShhRBVz96ymvShOVTi1qw6VdeiGIZeG0 vZUeb7a4B0iAG4LNNmVkC/ouYq6dD1iLAdIAIz4HZ/p33DGpIPA2qjFct4ay7kEa hyZL0ygVEiMCRPU6mWus3UznNFa/qSC7N3CIOyS5i09EBb38lfzeKJ99zQDgxfGW BBw6vgFpCJ1PSB4eXrqiO6ITXZnokJG2CD7ucFRfAJ8nK7+Rxo0g68JXSeQAn4Ju YZgDfbYzwVZSOOCINVQDb00k/cBlpg8QKz/YSWNv6vFExvz6ZPRm3EAN1se5j4YF YRvFjKfyvDfhMETO3UZlg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdeifedtjecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefhvfevufffkffojghfgggtgfesthekredtredt jeenucfhrhhomhepofgrrhgvkhcuofgrrhgtiiihkhhofihskhhiqdfikphrvggtkhhiuc eomhgrrhhmrghrvghksehinhhvihhsihgslhgvthhhihhnghhslhgrsgdrtghomheqnecu ggftrfgrthhtvghrnhepgfeuudehgfdvfeehhedujeehfeduveeugefhkefhheelgeevud etueeiudfggfffnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhf rhhomhepmhgrrhhmrghrvghksehinhhvihhsihgslhgvthhhihhnghhslhgrsgdrtghomh dpnhgspghrtghpthhtohepiedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepgigv nhdquggvvhgvlheslhhishhtshdrgigvnhhprhhojhgvtghtrdhorhhgpdhrtghpthhtoh eprghnughrvgifrdgtohhophgvrhefsegtihhtrhhigidrtghomhdprhgtphhtthhopehm rghrmhgrrhgvkhesihhnvhhishhisghlvghthhhinhhgshhlrggsrdgtohhmpdhrtghpth htohepshhtvghfrghnohdrshhtrggsvghllhhinhhisegrmhgurdgtohhmpdhrtghpthht oheptggrrhguohgvsegtrghrughovgdrtghomhdprhgtphhtthhopehsshhtrggsvghllh hinhhisehkvghrnhgvlhdrohhrgh X-ME-Proxy: Feedback-ID: i1568416f:Fastmail From: =?utf-8?q?Marek_Marczykowski-G=C3=B3recki?= To: xen-devel@lists.xenproject.org Cc: Andrew Cooper , =?utf-8?q?Marek_Marczykowski-?= =?utf-8?q?G=C3=B3recki?= , Stefano Stabellini , Doug Goldstein , Stefano Stabellini Subject: [PATCH v3 1/5] automation: skip building domU if there is no test defined for it Date: Wed, 19 Feb 2025 03:56:51 +0100 Message-ID: <1bcb6bea13c964df6119ae04502e0fee3c928052.1739933790.git-series.marmarek@invisiblethingslab.com> X-Mailer: git-send-email 2.48.0 In-Reply-To: References: MIME-Version: 1.0 This will be useful for later tests not using generic domU (unit tests, xtf etc). Signed-off-by: Marek Marczykowski-Górecki Reviewed-by: Stefano Stabellini --- automation/scripts/qubes-x86-64.sh | 50 +++++++++++++++++++------------ 1 file changed, 31 insertions(+), 19 deletions(-) diff --git a/automation/scripts/qubes-x86-64.sh b/automation/scripts/qubes-x86-64.sh index 8a0b7bfbc0d0..7eb3ce1bf703 100755 --- a/automation/scripts/qubes-x86-64.sh +++ b/automation/scripts/qubes-x86-64.sh @@ -144,26 +144,28 @@ disk = [ ] ${domU_extra_config} " -# DomU -mkdir -p rootfs -cd rootfs -# fakeroot is needed to preserve device nodes in rootless podman container -fakeroot -s ../fakeroot-save tar xzf ../binaries/initrd.tar.gz -mkdir proc -mkdir run -mkdir srv -mkdir sys -rm var/run -echo "#!/bin/sh +if [ -n "$domU_check" ]; then + # DomU + mkdir -p rootfs + cd rootfs + # fakeroot is needed to preserve device nodes in rootless podman container + fakeroot -s ../fakeroot-save tar xzf ../binaries/initrd.tar.gz + mkdir proc + mkdir run + mkdir srv + mkdir sys + rm var/run + echo "#!/bin/sh ${domU_check} " > etc/local.d/xen.start -chmod +x etc/local.d/xen.start -echo "rc_verbose=yes" >> etc/rc.conf -sed -i -e 's/^Welcome/domU \0/' etc/issue -find . | fakeroot -i ../fakeroot-save cpio -H newc -o | gzip > ../binaries/domU-rootfs.cpio.gz -cd .. -rm -rf rootfs + chmod +x etc/local.d/xen.start + echo "rc_verbose=yes" >> etc/rc.conf + sed -i -e 's/^Welcome/domU \0/' etc/issue + find . | fakeroot -i ../fakeroot-save cpio -H newc -o | gzip > ../binaries/domU-rootfs.cpio.gz + cd .. + rm -rf rootfs +fi # DOM0 rootfs mkdir -p rootfs @@ -188,11 +190,19 @@ ifconfig eth0 up ifconfig xenbr0 up ifconfig xenbr0 192.168.0.1 +" > etc/local.d/xen.start + +if [ -n "$domU_check" ]; then + echo " # get domU console content into test log tail -F /var/log/xen/console/guest-domU.log 2>/dev/null | sed -e \"s/^/(domU) /\" & xl create /etc/xen/domU.cfg ${dom0_check} -" > etc/local.d/xen.start +" >> etc/local.d/xen.start +else + echo "${dom0_check}" >> etc/local.d/xen.start +fi + chmod +x etc/local.d/xen.start echo "$domU_config" > etc/xen/domU.cfg @@ -201,7 +211,9 @@ echo "XENCONSOLED_TRACE=all" >> etc/default/xencommons echo "QEMU_XEN=/bin/false" >> etc/default/xencommons mkdir -p var/log/xen/console cp ../binaries/bzImage boot/vmlinuz -cp ../binaries/domU-rootfs.cpio.gz boot/initrd-domU +if [ -n "$domU_check" ]; then + cp ../binaries/domU-rootfs.cpio.gz boot/initrd-domU +fi find . | fakeroot -i ../fakeroot-save cpio -H newc -o | gzip > ../binaries/dom0-rootfs.cpio.gz cd .. From patchwork Wed Feb 19 02:56:52 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marek_Marczykowski-G=C3=B3recki?= X-Patchwork-Id: 13981447 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 A7FEDC021B2 for ; Wed, 19 Feb 2025 02:57:58 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.892313.1301304 (Exim 4.92) (envelope-from ) id 1tkaHL-0002Em-II; Wed, 19 Feb 2025 02:57:39 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 892313.1301304; Wed, 19 Feb 2025 02:57:39 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tkaHL-0002Ef-F5; Wed, 19 Feb 2025 02:57:39 +0000 Received: by outflank-mailman (input) for mailman id 892313; Wed, 19 Feb 2025 02:57:37 +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 1tkaHJ-00020f-UD for xen-devel@lists.xenproject.org; Wed, 19 Feb 2025 02:57:37 +0000 Received: from fhigh-a7-smtp.messagingengine.com (fhigh-a7-smtp.messagingengine.com [103.168.172.158]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 45a48c60-ee6d-11ef-9aa8-95dc52dad729; Wed, 19 Feb 2025 03:57:36 +0100 (CET) Received: from phl-compute-02.internal (phl-compute-02.phl.internal [10.202.2.42]) by mailfhigh.phl.internal (Postfix) with ESMTP id C2D751140205; Tue, 18 Feb 2025 21:57:35 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-02.internal (MEProxy); Tue, 18 Feb 2025 21:57:35 -0500 Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 18 Feb 2025 21:57:34 -0500 (EST) 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: 45a48c60-ee6d-11ef-9aa8-95dc52dad729 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= invisiblethingslab.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1739933855; x=1740020255; bh=LUXos0tsU/ JpuEC8+amcvqWBF/7Zdjgw4pz1/9FJXNQ=; b=Rwz4Qw4HNo4/AMHnZAt9X9JpK/ ceUBIU6heSf5+LbsNkYfZLIUJdMp34Oz7Ly4LHbpCekICZnqibjjUO5jtBctgxiN Mp4hpqDh2ROs1iH3SKHC9TDiWSLpOvwvz2UlImN4uYTiO1NettsjQPIbMJB1V/NW JWY6QLHAtYMlyQim3Xmm3gx34ceA7XR1+6z8Z8RfU7PljoQCh/EPmbre4UGbbEML BEQ6oh2EOfPAb3P0hWosJtjnS9pJrMl3yA+2KW4CKqQOc2seEr/fFkANCJyUNU35 L6bQbLc4Va+0lL3f++aQEOnHfDyBuSfAP1ja3dRMrBJtsCPcTKI56gtkmnXg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1739933855; x= 1740020255; bh=LUXos0tsU/JpuEC8+amcvqWBF/7Zdjgw4pz1/9FJXNQ=; b=J QhAFs2dgayRH1Q0mga+awcMwzkeZnKsdlucQsPEVxT5i46Jxl4pYmt9RituWIgAY XiFQaTlg8ZxUXe3OgbfW2nzZEAd2hI5t/bgUEwkrTQ4Z25fHkXhMoeHWPzQ/0ups m28ZgzUE0Cqzh+jAufBYA2SgqN4RmAk1gMiNXN10WI8DEDPM8id1hRVxec39pK8t BvGaj8X9KEDhVwFLj+Eym36UGTEc/foNaH57DIFZFbObjTF8nTyXOwhD8a3M1hsz RY7WA/7reEb4NX5ULQBm3TwSat1dRt+Ge48sADE3WnCpkJXBlVPMYe1a9ne9JosK 3INX1hIMhIiiQPhBNk56w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdeifedtjecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefhvfevufffkffojghfgggtgfesthekredtredt jeenucfhrhhomhepofgrrhgvkhcuofgrrhgtiiihkhhofihskhhiqdfikphrvggtkhhiuc eomhgrrhhmrghrvghksehinhhvihhsihgslhgvthhhihhnghhslhgrsgdrtghomheqnecu ggftrfgrthhtvghrnhepgfeuudehgfdvfeehhedujeehfeduveeugefhkefhheelgeevud etueeiudfggfffnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhf rhhomhepmhgrrhhmrghrvghksehinhhvihhsihgslhgvthhhihhnghhslhgrsgdrtghomh dpnhgspghrtghpthhtohepiedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepgigv nhdquggvvhgvlheslhhishhtshdrgigvnhhprhhojhgvtghtrdhorhhgpdhrtghpthhtoh eprghnughrvgifrdgtohhophgvrhefsegtihhtrhhigidrtghomhdprhgtphhtthhopehm rghrmhgrrhgvkhesihhnvhhishhisghlvghthhhinhhgshhlrggsrdgtohhmpdhrtghpth htohepshhtvghfrghnohdrshhtrggsvghllhhinhhisegrmhgurdgtohhmpdhrtghpthht oheptggrrhguohgvsegtrghrughovgdrtghomhdprhgtphhtthhopehsshhtrggsvghllh hinhhisehkvghrnhgvlhdrohhrgh X-ME-Proxy: Feedback-ID: i1568416f:Fastmail From: =?utf-8?q?Marek_Marczykowski-G=C3=B3recki?= To: xen-devel@lists.xenproject.org Cc: Andrew Cooper , =?utf-8?q?Marek_Marczykowski-?= =?utf-8?q?G=C3=B3recki?= , Stefano Stabellini , Doug Goldstein , Stefano Stabellini Subject: [PATCH v3 2/5] automation: add jobs running tests from tools/tests/* Date: Wed, 19 Feb 2025 03:56:52 +0100 Message-ID: <435767bb15b40d84d919296f3202133fe7d128c5.1739933790.git-series.marmarek@invisiblethingslab.com> X-Mailer: git-send-email 2.48.0 In-Reply-To: References: MIME-Version: 1.0 There are a bunch of tests in tools/tests/, let them run in CI. For each subdirectory expect "make run" will run the test, and observe its exit code. This way, adding new tests is easy, and they will be automatically picked up. For better visibility, log test output to junit xml format, and let gitlab ingest it. Set SUT_ADDR variable with name/address of the system under test, so a network can be used to extract the file. The actual address is set using DHCP. And for the test internal network, still add the 192.168.0.1 IP (but don't replace the DHCP-provided one). Signed-off-by: Marek Marczykowski-Górecki Reviewed-by: Stefano Stabellini --- Changes in v2: - use bash shebang - clarify skipped message - cleanup extra printf params - limit calling DHCP in dom0 to only tests that need it --- automation/gitlab-ci/test.yaml | 23 +++++++++++++++- automation/scripts/build | 1 +- automation/scripts/qubes-x86-64.sh | 28 ++++++++++++++++++- automation/scripts/run-tools-tests | 47 +++++++++++++++++++++++++++++++- 4 files changed, 99 insertions(+) create mode 100755 automation/scripts/run-tools-tests diff --git a/automation/gitlab-ci/test.yaml b/automation/gitlab-ci/test.yaml index 1822e3ea5fd7..c21a37933881 100644 --- a/automation/gitlab-ci/test.yaml +++ b/automation/gitlab-ci/test.yaml @@ -130,6 +130,7 @@ PCIDEV: "03:00.0" PCIDEV_INTR: "MSI-X" CONSOLE_OPTS: "console=com1 com1=115200,8n1" + SUT_ADDR: test-2.testnet artifacts: paths: - smoke.serial @@ -263,6 +264,28 @@ adl-pvshim-x86-64-gcc-debug: - *x86-64-test-needs - alpine-3.18-gcc-debug +adl-tools-tests-pv-x86-64-gcc-debug: + extends: .adl-x86-64 + script: + - ./automation/scripts/qubes-x86-64.sh tools-tests-pv 2>&1 | tee ${LOGFILE} + artifacts: + reports: + junit: tests-junit.xml + needs: + - *x86-64-test-needs + - alpine-3.18-gcc-debug + +adl-tools-tests-pvh-x86-64-gcc-debug: + extends: .adl-x86-64 + script: + - ./automation/scripts/qubes-x86-64.sh tools-tests-pvh 2>&1 | tee ${LOGFILE} + artifacts: + reports: + junit: tests-junit.xml + needs: + - *x86-64-test-needs + - alpine-3.18-gcc-debug + zen3p-smoke-x86-64-gcc-debug: extends: .zen3p-x86-64 script: diff --git a/automation/scripts/build b/automation/scripts/build index 952599cc25c2..522efe774ef3 100755 --- a/automation/scripts/build +++ b/automation/scripts/build @@ -109,5 +109,6 @@ else # even though dist/ contains everything, while some containers don't even # build Xen cp -r dist binaries/ + cp -r tools/tests binaries/ collect_xen_artefacts fi diff --git a/automation/scripts/qubes-x86-64.sh b/automation/scripts/qubes-x86-64.sh index 7eb3ce1bf703..7c80e0c23318 100755 --- a/automation/scripts/qubes-x86-64.sh +++ b/automation/scripts/qubes-x86-64.sh @@ -10,6 +10,8 @@ set -ex # - pci-pv PV dom0, PV domU + PCI Passthrough # - pvshim PV dom0, PVSHIM domU # - s3 PV dom0, S3 suspend/resume +# - tools-tests-pv PV dom0, run tests from tools/tests/* +# - tools-tests-pvh PVH dom0, run tests from tools/tests/* test_variant=$1 ### defaults @@ -19,6 +21,7 @@ timeout=120 domU_type="pvh" domU_vif="'bridge=xenbr0'," domU_extra_config= +retrieve_xml= case "${test_variant}" in ### test: smoke test & smoke test PVH & smoke test HVM & smoke test PVSHIM @@ -126,6 +129,21 @@ done " ;; + ### tests: tools-tests-pv, tools-tests-pvh + "tools-tests-pv"|"tools-tests-pvh") + retrieve_xml=1 + passed="test passed" + domU_check="" + dom0_check=" +/tests/run-tools-tests /tests /tmp/tests-junit.xml && echo \"${passed}\" +nc -l -p 8080 < /tmp/tests-junit.xml >/dev/null & +" + if [ "${test_variant}" = "tools-tests-pvh" ]; then + extra_xen_opts="dom0=pvh" + fi + + ;; + *) echo "Unrecognised test_variant '${test_variant}'" >&2 exit 1 @@ -178,6 +196,8 @@ mkdir srv mkdir sys rm var/run cp -ar ../binaries/dist/install/* . +cp -ar ../binaries/tests . +cp -a ../automation/scripts/run-tools-tests tests/ echo "#!/bin/bash @@ -192,6 +212,10 @@ ifconfig xenbr0 192.168.0.1 " > etc/local.d/xen.start +if [ -n "$retrieve_xml" ]; then + echo "timeout 30s udhcpc -i xenbr0" >> etc/local.d/xen.start +fi + if [ -n "$domU_check" ]; then echo " # get domU console content into test log @@ -272,6 +296,10 @@ if [ $timeout -le 0 ]; then exit 1 fi +if [ -n "$retrieve_xml" ]; then + nc -w 10 "$SUT_ADDR" 8080 > tests-junit.xml \n' > "$xml_out" +printf '\n' >> "$xml_out" +printf ' \n' >> "$xml_out" +failed= +for dir in "$1"/*; do + [ -d "$dir" ] || continue + echo "Running test in $dir" + printf ' \n' "$dir" >> "$xml_out" + ret= + for f in "$dir"/*; do + [ -f "$f" ] || continue + [ -x "$f" ] || continue + "$f" 2>&1 | tee /tmp/out + ret=$? + if [ "$ret" -ne 0 ]; then + echo "FAILED: $ret" + failed+=" $dir" + printf ' \n' "$f" "$ret" >> "$xml_out" + # TODO: could use xml escaping... but current tests seems to + # produce sane output + cat /tmp/out >> "$xml_out" + printf ' \n' >> "$xml_out" + else + echo "PASSED" + fi + done + if [ -z "$ret" ]; then + printf ' \n' "$dir" >> "$xml_out" + fi + printf ' \n' >> "$xml_out" +done +printf ' \n' >> "$xml_out" +printf '\n' >> "$xml_out" + +if [ -n "$failed" ]; then + exit 1 +fi From patchwork Wed Feb 19 02:56:53 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marek_Marczykowski-G=C3=B3recki?= X-Patchwork-Id: 13981446 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 DCE76C021AD for ; Wed, 19 Feb 2025 02:57:57 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.892315.1301323 (Exim 4.92) (envelope-from ) id 1tkaHP-0002ig-4j; Wed, 19 Feb 2025 02:57:43 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 892315.1301323; Wed, 19 Feb 2025 02:57:43 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tkaHP-0002iZ-1G; Wed, 19 Feb 2025 02:57:43 +0000 Received: by outflank-mailman (input) for mailman id 892315; Wed, 19 Feb 2025 02:57:41 +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 1tkaHN-0002Sc-SM for xen-devel@lists.xenproject.org; Wed, 19 Feb 2025 02:57:41 +0000 Received: from fout-a4-smtp.messagingengine.com (fout-a4-smtp.messagingengine.com [103.168.172.147]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 46a18624-ee6d-11ef-9896-31a8f345e629; Wed, 19 Feb 2025 03:57:38 +0100 (CET) Received: from phl-compute-06.internal (phl-compute-06.phl.internal [10.202.2.46]) by mailfout.phl.internal (Postfix) with ESMTP id 6811113809B4; Tue, 18 Feb 2025 21:57:37 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-06.internal (MEProxy); Tue, 18 Feb 2025 21:57:37 -0500 Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 18 Feb 2025 21:57:35 -0500 (EST) 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: 46a18624-ee6d-11ef-9896-31a8f345e629 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= invisiblethingslab.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1739933857; x=1740020257; bh=egCiFo3q5O 7GT+Ni7H7hTzWDUErl6ShDR+nSG2Zsoj4=; b=pDD7oeMWqugj/uVR6Rja/a/hUe Z6e7BdSwP5ibfuJ5DqbSnDyqhzqHNsaXMIhXxny6voKw66obQVUqRc2fB6xVqpqa mUu+P2H4iTQ079VfFfXMnROOIC6JF8RzXKjuH3Pn4wopMMjI1DsOUCZkUTLNVuk6 AnNAhrJtgXXrq9EptEahFYP5QgNfLvY9Mw3EM1MCeo5ewCSw34u5pEGAKZG6AsvA l6xH/YGNZNOkrJyghF60Uo5q8eFxYjmsdK7cVRd9SMKjN4DToW1ERxrdUKna5Cec d350JPbdY+BZfAbqNdyq43Mrxuh7vx8hJBVwA3VpEQYdYm4NjVpopleRXLoA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1739933857; x= 1740020257; bh=egCiFo3q5O7GT+Ni7H7hTzWDUErl6ShDR+nSG2Zsoj4=; b=W cb1P4zoeq5z0nC1HatoektibLxaFhWRIwlTymAWiJSLbnj5Zh67KBgxkcFQ2RGn/ ctSDSpV3niF/ovqeYD0nz8GhsgrfOKwXITBEEonyNFjlZc9vN/dm8MUE51y2q2Kx eHf7RB4ZR1lZEFzjh8BTRXRzZJTxUJ8wczEuNV14jjCWx2CmjkXgD56B3luL71k/ Mgmd/HFG0jMqcngcD5KqRJK2t1kpsIDXKunJr/ZK7VuTi4CZv5J9mV3iDSnhcG7A JJDSGH/Te88iXPA2zTAoDaaRFORnfCgSmlCB+mvm6XdK+Fkqd46kyC5N0rwMEvb4 TBu71RHKiycWbVYQsQUzQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdeifedtjecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefhvfevufffkffojghfgggtgfesthekredtredt jeenucfhrhhomhepofgrrhgvkhcuofgrrhgtiiihkhhofihskhhiqdfikphrvggtkhhiuc eomhgrrhhmrghrvghksehinhhvihhsihgslhgvthhhihhnghhslhgrsgdrtghomheqnecu ggftrfgrthhtvghrnhepudeuheehtefghfelhfffheevffeftefhteehtddtfeevfedvle dvvdfhffevkeetnecuffhomhgrihhnpehgihhtlhgrsgdrtghordhjphdpghhithhlrggs rdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh epmhgrrhhmrghrvghksehinhhvihhsihgslhgvthhhihhnghhslhgrsgdrtghomhdpnhgs pghrtghpthhtohephedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepgigvnhdqug gvvhgvlheslhhishhtshdrgigvnhhprhhojhgvtghtrdhorhhgpdhrtghpthhtoheprghn ughrvgifrdgtohhophgvrhefsegtihhtrhhigidrtghomhdprhgtphhtthhopehmrghrmh grrhgvkhesihhnvhhishhisghlvghthhhinhhgshhlrggsrdgtohhmpdhrtghpthhtohep tggrrhguohgvsegtrghrughovgdrtghomhdprhgtphhtthhopehsshhtrggsvghllhhinh hisehkvghrnhgvlhdrohhrgh X-ME-Proxy: Feedback-ID: i1568416f:Fastmail From: =?utf-8?q?Marek_Marczykowski-G=C3=B3recki?= To: xen-devel@lists.xenproject.org Cc: Andrew Cooper , =?utf-8?q?Marek_Marczykowski-?= =?utf-8?q?G=C3=B3recki?= , Doug Goldstein , Stefano Stabellini Subject: [PATCH v3 3/5] automation: allow selecting individual jobs via CI variables Date: Wed, 19 Feb 2025 03:56:53 +0100 Message-ID: <95088c06171ce140caf48029118dcb6fd2ac8d99.1739933790.git-series.marmarek@invisiblethingslab.com> X-Mailer: git-send-email 2.48.0 In-Reply-To: References: MIME-Version: 1.0 Debugging sometimes involves running specific jobs on different versions. It's useful to easily avoid running all of the not interesting ones (for given case) to save both time and CI resources. Doing so used to require changing the yaml files, usually in several places. Ease this step by adding SELECTED_JOBS_ONLY variable that takes a regex. Note that one needs to satisfy job dependencies on their own (for example if a test job needs a build job, that specific build job needs to be included too). The variable can be specified via Gitlab web UI when scheduling a pipeline, but it can be also set when doing git push directly: git push -o ci.variable=SELECTED_JOBS_ONLY="/job1|job2/" More details at https://docs.gitlab.co.jp/ee/user/project/push_options.html The variable needs to include regex for selecting jobs, including enclosing slashes. A coma/space separated list of jobs to select would be friendlier UX, but unfortunately that is not supported: https://gitlab.com/gitlab-org/gitlab/-/issues/209904 (note the proposed workaround doesn't work for job-level CI_JOB_NAME). On the other hand, the regex is more flexible (one can select for example all arm32 jobs). Signed-off-by: Marek Marczykowski-Górecki Acked-by: Stefano Stabellini --- Changes in v3: - include variable in Web UI for starting pipeline --- .gitlab-ci.yml | 2 ++ automation/gitlab-ci/build.yaml | 6 ++++++ automation/gitlab-ci/test.yaml | 14 ++++++++++++++ 3 files changed, 22 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5a9b8b722838..b3beb2ff9ddf 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,7 @@ variables: XEN_REGISTRY: registry.gitlab.com/xen-project/xen + SELECTED_JOBS_ONLY: + description: "Regex to select only some jobs, must be enclosed with /. For example /job1|job2/" workflow: rules: diff --git a/automation/gitlab-ci/build.yaml b/automation/gitlab-ci/build.yaml index 35e224366f62..f12de00a164a 100644 --- a/automation/gitlab-ci/build.yaml +++ b/automation/gitlab-ci/build.yaml @@ -12,6 +12,12 @@ - '*/*.log' when: always needs: [] + rules: + - if: $SELECTED_JOBS_ONLY && $CI_JOB_NAME =~ $SELECTED_JOBS_ONLY + when: always + - if: $SELECTED_JOBS_ONLY + when: never + - when: on_success .gcc-tmpl: variables: &gcc diff --git a/automation/gitlab-ci/test.yaml b/automation/gitlab-ci/test.yaml index c21a37933881..93632f1f9204 100644 --- a/automation/gitlab-ci/test.yaml +++ b/automation/gitlab-ci/test.yaml @@ -1,6 +1,11 @@ .test-jobs-common: stage: test image: ${XEN_REGISTRY}/${CONTAINER} + rules: + - if: $SELECTED_JOBS_ONLY && $CI_JOB_NAME =~ $SELECTED_JOBS_ONLY + - if: $SELECTED_JOBS_ONLY + when: never + - when: on_success .arm64-test-needs: &arm64-test-needs - alpine-3.18-arm64-rootfs-export @@ -99,6 +104,9 @@ - '*.dtb' when: always rules: + - if: $SELECTED_JOBS_ONLY && $CI_JOB_NAME =~ $SELECTED_JOBS_ONLY + - if: $SELECTED_JOBS_ONLY + when: never - if: $XILINX_JOBS == "true" && $CI_COMMIT_REF_PROTECTED == "true" tags: - xilinx @@ -117,6 +125,9 @@ - '*.log' when: always rules: + - if: $SELECTED_JOBS_ONLY && $CI_JOB_NAME =~ $SELECTED_JOBS_ONLY + - if: $SELECTED_JOBS_ONLY + when: never - if: $XILINX_JOBS == "true" && $CI_COMMIT_REF_PROTECTED == "true" tags: - xilinx @@ -137,6 +148,9 @@ - '*.log' when: always rules: + - if: $SELECTED_JOBS_ONLY && $CI_JOB_NAME =~ $SELECTED_JOBS_ONLY + - if: $SELECTED_JOBS_ONLY + when: never - if: $QUBES_JOBS == "true" && $CI_COMMIT_REF_PROTECTED == "true" tags: - qubes-hw2 From patchwork Wed Feb 19 02:56:54 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marek_Marczykowski-G=C3=B3recki?= X-Patchwork-Id: 13981445 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 EC130C021B1 for ; Wed, 19 Feb 2025 02:57:57 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.892314.1301314 (Exim 4.92) (envelope-from ) id 1tkaHN-0002TM-Q6; Wed, 19 Feb 2025 02:57:41 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 892314.1301314; Wed, 19 Feb 2025 02:57:41 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tkaHN-0002TD-MY; Wed, 19 Feb 2025 02:57:41 +0000 Received: by outflank-mailman (input) for mailman id 892314; Wed, 19 Feb 2025 02:57:40 +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 1tkaHM-00020f-94 for xen-devel@lists.xenproject.org; Wed, 19 Feb 2025 02:57:40 +0000 Received: from fout-a4-smtp.messagingengine.com (fout-a4-smtp.messagingengine.com [103.168.172.147]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 477ca3c0-ee6d-11ef-9aa8-95dc52dad729; Wed, 19 Feb 2025 03:57:39 +0100 (CET) Received: from phl-compute-02.internal (phl-compute-02.phl.internal [10.202.2.42]) by mailfout.phl.internal (Postfix) with ESMTP id E0B9C13809B8; Tue, 18 Feb 2025 21:57:38 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-02.internal (MEProxy); Tue, 18 Feb 2025 21:57:38 -0500 Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 18 Feb 2025 21:57:37 -0500 (EST) 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: 477ca3c0-ee6d-11ef-9aa8-95dc52dad729 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= invisiblethingslab.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1739933858; x=1740020258; bh=do5qlXv4Af CHjiJyaew1l6a1bkT7B3D+R0jIARcUMHQ=; b=hjGqFdqXPoFCMdQm5RfLItOLd1 K8tOlW1MEJHtjf/SpX5AUAFjsRJcCEZ9ZYup9mQv0rDLlUAwNLMs5vDUC507iUaT gM6b4pizdneFaOY7Ga2rvsmHtVpjU1/PSQhSx67F2CJMyxSJVaUrqfuwExTZAvBD xQ+aIcKgza62gEnuMXncSf26sHBNaIWlfsmziU6jW0F4Ev8JIar1NeBnB09Ajqyd ZF71Gz1P+lb9SD2CD7TavNKWLleeR7XmepGbnASw0VTmjpf4vVAl9kSM8xK7Ou0x 5l5fhck34g31ssMyPtcDLqyY23F7DUpx/4N8DxstgY+nZXoBSACHpeVm3x4g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1739933858; x= 1740020258; bh=do5qlXv4AfCHjiJyaew1l6a1bkT7B3D+R0jIARcUMHQ=; b=U 7CXIpBWYAS7SpKo4sxWfsk4oY0nOstgtNVAmrIbCPJQXnJxVVAddoxPUijAoSL1C BL1LByks53sLV3em9sl+vn71kP4c59XAnVqjIENB2GEK9BuAJp8MMsGL7YiPRBQj yVx3I4qmBtCrM5Qgh/MwUk7ALDsZHZo3KGSGkp9VqdClom+hHOOpPlXOj7MHkgHY hmCnm0IlaVJffKKw3b8e74G3b0f+Psx+8VKGRR/uIktEtPjB8bHb5Tceyzs+KaZ6 50KI/19iTXBPXVGHBJ7Hd3GmCX2jtZV+2UPLkSiYyqqX256+L521HeuHdr+yJoa8 sc3V/dsnWFa+YQ9Fno9JQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdeifedtjecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefhvfevufffkffojghfgggtgfesthekredtredt jeenucfhrhhomhepofgrrhgvkhcuofgrrhgtiiihkhhofihskhhiqdfikphrvggtkhhiuc eomhgrrhhmrghrvghksehinhhvihhsihgslhgvthhhihhnghhslhgrsgdrtghomheqnecu ggftrfgrthhtvghrnhepgfeuudehgfdvfeehhedujeehfeduveeugefhkefhheelgeevud etueeiudfggfffnecuvehluhhsthgvrhfuihiivgepudenucfrrghrrghmpehmrghilhhf rhhomhepmhgrrhhmrghrvghksehinhhvihhsihgslhgvthhhihhnghhslhgrsgdrtghomh dpnhgspghrtghpthhtohepiedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepgigv nhdquggvvhgvlheslhhishhtshdrgigvnhhprhhojhgvtghtrdhorhhgpdhrtghpthhtoh eprghnughrvgifrdgtohhophgvrhefsegtihhtrhhigidrtghomhdprhgtphhtthhopehm rghrmhgrrhgvkhesihhnvhhishhisghlvghthhhinhhgshhlrggsrdgtohhmpdhrtghpth htohepshhtvghfrghnohdrshhtrggsvghllhhinhhisegrmhgurdgtohhmpdhrtghpthht oheptggrrhguohgvsegtrghrughovgdrtghomhdprhgtphhtthhopehsshhtrggsvghllh hinhhisehkvghrnhgvlhdrohhrgh X-ME-Proxy: Feedback-ID: i1568416f:Fastmail From: =?utf-8?q?Marek_Marczykowski-G=C3=B3recki?= To: xen-devel@lists.xenproject.org Cc: Andrew Cooper , =?utf-8?q?Marek_Marczykowski-?= =?utf-8?q?G=C3=B3recki?= , Stefano Stabellini , Doug Goldstein , Stefano Stabellini Subject: [PATCH v3 4/5] automation: add tools/tests jobs on the AMD Zen3+ runner too Date: Wed, 19 Feb 2025 03:56:54 +0100 Message-ID: <4aa64c6e2393c66b9310b29b8be03c15b7e59c27.1739933790.git-series.marmarek@invisiblethingslab.com> X-Mailer: git-send-email 2.48.0 In-Reply-To: References: MIME-Version: 1.0 Signed-off-by: Marek Marczykowski-Górecki Reviewed-by: Stefano Stabellini --- new in v2 --- automation/gitlab-ci/test.yaml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/automation/gitlab-ci/test.yaml b/automation/gitlab-ci/test.yaml index 93632f1f9204..fc7663e3367a 100644 --- a/automation/gitlab-ci/test.yaml +++ b/automation/gitlab-ci/test.yaml @@ -162,6 +162,7 @@ PCIDEV: "01:00.0" PCIDEV_INTR: "MSI-X" CONSOLE_OPTS: "console=com1 com1=115200,8n1,pci,msi" + SUT_ADDR: test-11.testnet tags: - qubes-hw11 @@ -340,6 +341,28 @@ zen3p-pvshim-x86-64-gcc-debug: - *x86-64-test-needs - alpine-3.18-gcc-debug +zen3p-tools-tests-pv-x86-64-gcc-debug: + extends: .zen3p-x86-64 + script: + - ./automation/scripts/qubes-x86-64.sh tools-tests-pv 2>&1 | tee ${LOGFILE} + artifacts: + reports: + junit: tests-junit.xml + needs: + - *x86-64-test-needs + - alpine-3.18-gcc-debug + +zen3p-tools-tests-pvh-x86-64-gcc-debug: + extends: .zen3p-x86-64 + script: + - ./automation/scripts/qubes-x86-64.sh tools-tests-pvh 2>&1 | tee ${LOGFILE} + artifacts: + reports: + junit: tests-junit.xml + needs: + - *x86-64-test-needs + - alpine-3.18-gcc-debug + qemu-smoke-dom0-arm64-gcc: extends: .qemu-arm64 script: From patchwork Wed Feb 19 02:56:55 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marek_Marczykowski-G=C3=B3recki?= X-Patchwork-Id: 13981448 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 C1030C021B0 for ; Wed, 19 Feb 2025 02:57:58 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.892316.1301329 (Exim 4.92) (envelope-from ) id 1tkaHP-0002lV-Dj; Wed, 19 Feb 2025 02:57:43 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 892316.1301329; Wed, 19 Feb 2025 02:57:43 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tkaHP-0002jp-8F; Wed, 19 Feb 2025 02:57:43 +0000 Received: by outflank-mailman (input) for mailman id 892316; Wed, 19 Feb 2025 02:57:42 +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 1tkaHO-00020f-Iy for xen-devel@lists.xenproject.org; Wed, 19 Feb 2025 02:57:42 +0000 Received: from fhigh-a7-smtp.messagingengine.com (fhigh-a7-smtp.messagingengine.com [103.168.172.158]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 48a9ebc6-ee6d-11ef-9aa8-95dc52dad729; Wed, 19 Feb 2025 03:57:41 +0100 (CET) Received: from phl-compute-02.internal (phl-compute-02.phl.internal [10.202.2.42]) by mailfhigh.phl.internal (Postfix) with ESMTP id D80C11140205; Tue, 18 Feb 2025 21:57:40 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-02.internal (MEProxy); Tue, 18 Feb 2025 21:57:40 -0500 Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 18 Feb 2025 21:57:39 -0500 (EST) 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: 48a9ebc6-ee6d-11ef-9aa8-95dc52dad729 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= invisiblethingslab.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1739933860; x=1740020260; bh=/fLCth7Q/1 XRFnTxMsuFuruQj9l16HRepoNJ35BBnDA=; b=Jbf588YMjIlXs75RSWZRfr5EsR fGmEtntAgJh174aHoVQPB1/fXE7lP+7/BVyXwBGWlB+HCEduozMgWsFuEYT8htYu VUGmzjBEvU1F7wOJoXitXBfmasMLuyXRRrji44ZzdIRs5mGdDh3EiQJdvdOJCIBn h++yu+cUhuBbh8xSCVmw/c3FLsgHLXFrcSrfAMzFUtowTgeFcEMXWNkZmKGzCX0g cGt/sa0fevkCDhTyPwUUxX8iAoXtXBjZHVXh+pYaWiItGuvJj4bt1NmGRSOviwN+ D+IXkLOkSu4aNTaz6IGU9rPWVCi4/Tqp+iHwGh8dtF7jWiVE+wFAfZCExArw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1739933860; x= 1740020260; bh=/fLCth7Q/1XRFnTxMsuFuruQj9l16HRepoNJ35BBnDA=; b=Y dE9G14zx4ysIsJPxLKdgqG8rBmPijE4Hpw/SI7iPaHniD68MXTn4Q77m/QOjGgXo UV6Ph/eIpn41j2kfoXqNDGj1mZxvZuWYl8wMH8wQGYCYuXriaqGp0kNQVm07V7rD qTOzUvctAcu4xMZyol9VOK332vrcZHs+1ZwxzPzM0t5O4Brt+edvxQRpqTZdIr6v h/bGUssoTyfLrGa0Khpp3wKmQ0j7x3O4V6GwvoW/ygRNeNQgB5SG+1s3yPcCCERN JVSDubA2lIOoRyE0cnGNu2eH1Woe2JJjA9X44rH8E5Hw4Lk3jJaLi3sU+0Shqf8t Cy+tQOaN9eQtuFECwQc4Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdeifedtjecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefhvfevufffkffojghfgggtgfesthekredtredt jeenucfhrhhomhepofgrrhgvkhcuofgrrhgtiiihkhhofihskhhiqdfikphrvggtkhhiuc eomhgrrhhmrghrvghksehinhhvihhsihgslhgvthhhihhnghhslhgrsgdrtghomheqnecu ggftrfgrthhtvghrnhepfeefjeeglefgtdefleevtdegtdegudelffetffeufeejveeife ejveefhfeikeevnecuffhomhgrihhnpehgihhtlhgrsgdrtghomhdpghhithhlrggsrdgt ohdrjhhpnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh epmhgrrhhmrghrvghksehinhhvihhsihgslhgvthhhihhnghhslhgrsgdrtghomhdpnhgs pghrtghpthhtohepledpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepgigvnhdqug gvvhgvlheslhhishhtshdrgigvnhhprhhojhgvtghtrdhorhhgpdhrtghpthhtoheprghn ughrvgifrdgtohhophgvrhefsegtihhtrhhigidrtghomhdprhgtphhtthhopehmrghrmh grrhgvkhesihhnvhhishhisghlvghthhhinhhgshhlrggsrdgtohhmpdhrtghpthhtohep rghnthhhohhnhidrphgvrhgrrhgusehvrghtvghsrdhtvggthhdprhgtphhtthhopehmih gthhgrlhdrohhriigvlhesrghmugdrtghomhdprhgtphhtthhopehjsggvuhhlihgthhes shhushgvrdgtohhmpdhrtghpthhtohepjhhulhhivghnseigvghnrdhorhhgpdhrtghpth htoheprhhoghgvrhdrphgruhestghithhrihigrdgtohhmpdhrtghpthhtohepshhsthgr sggvlhhlihhniheskhgvrhhnvghlrdhorhhg X-ME-Proxy: Feedback-ID: i1568416f:Fastmail From: =?utf-8?q?Marek_Marczykowski-G=C3=B3recki?= To: xen-devel@lists.xenproject.org Cc: Andrew Cooper , =?utf-8?q?Marek_Marczykowski-?= =?utf-8?q?G=C3=B3recki?= , Anthony PERARD , Michal Orzel , Jan Beulich , Julien Grall , =?utf-8?q?Roger_Pau_Monn=C3=A9?= , Stefano Stabellini Subject: [PATCH v3 5/5] docs: add basic CI documentation Date: Wed, 19 Feb 2025 03:56:55 +0100 Message-ID: X-Mailer: git-send-email 2.48.0 In-Reply-To: References: MIME-Version: 1.0 Include info how to get access/enable hardware runners and how to select individual jobs. Signed-off-by: Marek Marczykowski-Górecki Reviewed-by: Stefano Stabellini --- new in v3 Definitely there can be more content here, but lets start somewhere. --- docs/index.rst | 1 + docs/misc/ci.rst | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 docs/misc/ci.rst diff --git a/docs/index.rst b/docs/index.rst index 1bb8d02ea357..bd87d736b9c3 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -51,6 +51,7 @@ kind of development environment. :maxdepth: 2 hypervisor-guide/index + misc/ci Unsorted documents diff --git a/docs/misc/ci.rst b/docs/misc/ci.rst new file mode 100644 index 000000000000..2803574fa2c0 --- /dev/null +++ b/docs/misc/ci.rst @@ -0,0 +1,35 @@ +.. SPDX-License-Identifier: CC-BY-4.0 + +Continuous Integration +====================== + +Xen Project uses Gitlab-CI for automated testing. Test pipelines for official +staging branches are at +``_. Developers can +schedule test pipelines in their repositories under +``_. + +Hardware runners +**************** + +Some of the tests are using dedicated hardware runners. Those are not available freely, but the access is granted to individual developers. To get access to them, ask on the ``#XenDevel:matrix.org`` Matrix channel. +After getting access to relevant runners, few extra changes are necessary in settings of the relevant "xen" gitlab project (under your ``_ namespace): + +1. Go to Settings -> CI/CD, expand the "Runners" section and enable relevant runners for your project. +2. Expand "Variables" section and add ``QUBES_JOBS=true`` variable for Qubes runners, and ``XILINX_JOBS=true`` for Xilinx runners. +3. Go to Settings -> Repository, expand "Branch rules" section and add a rule for protected branches - only those branches will get tests on the hardware runners. It's okay to use a pattern for branch name, and it's okay to allow force push. + +Selecting individual tests +************************** + +Normally, all build and test jobs are scheduled in a pipeline. When working on a specific patches, it is sometimes useful to run only jobs relevant for the current work - both to save time and to save CI resources. This can be done by seeting ``SELECTED_JOBS_ONLY`` variable when starting the pipeline. The variable holds a regular expression, enclosed with ``/`` that matches jobs to be included. The variable can be set via the gitlab.com web UI or directly when pushing changes to gitlab:: + + git push -o ci.variable=SELECTED_JOBS_ONLY="/job1|job2/" + +Note if a test job requires some build job, both need to be included in the regex. For example, ``adl-smoke-x86-64-gcc-debug`` requires ``alpine-3.18-gcc-debug``, so to run just this test the command will look like this:: + + git push -o ci.variable=SELECTED_JOBS_ONLY="/adl-smoke-x86-64-gcc-debug|alpine-3.18-gcc-debug/" + +More details at ``_. + +Alternatively, irrelevant jobs can be removed from respective yaml files in ``automation/gitlab-ci`` by adding temporary commit on top of the branch.