From patchwork Fri Feb 14 01:28:07 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: 13974272 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 62145C3DA4A for ; Fri, 14 Feb 2025 01:28:52 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.888257.1297655 (Exim 4.92) (envelope-from ) id 1tikVS-0005ce-Ul; Fri, 14 Feb 2025 01:28:38 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 888257.1297655; Fri, 14 Feb 2025 01:28:38 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tikVS-0005cX-Rh; Fri, 14 Feb 2025 01:28:38 +0000 Received: by outflank-mailman (input) for mailman id 888257; Fri, 14 Feb 2025 01:28:36 +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 1tikVQ-0005Nw-R6 for xen-devel@lists.xenproject.org; Fri, 14 Feb 2025 01:28:36 +0000 Received: from fhigh-a4-smtp.messagingengine.com (fhigh-a4-smtp.messagingengine.com [103.168.172.155]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 00f53b3d-ea73-11ef-9aa4-95dc52dad729; Fri, 14 Feb 2025 02:28:34 +0100 (CET) Received: from phl-compute-09.internal (phl-compute-09.phl.internal [10.202.2.49]) by mailfhigh.phl.internal (Postfix) with ESMTP id CA92011401EC; Thu, 13 Feb 2025 20:28:32 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-09.internal (MEProxy); Thu, 13 Feb 2025 20:28:32 -0500 Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 13 Feb 2025 20:28:31 -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: 00f53b3d-ea73-11ef-9aa4-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=1739496512; x=1739582912; bh=qEM2A4la9R xFkprKX9G/QxR7b4Sa8TkAC496vEy+pno=; b=Xp9POxlKeHX0cgV7pNJPWg/U4v Sd6J2dv1RYM57gboEeUaJIO0VJLU1VnciLK8SpnRBQSMcC3O306cTAtbMjVuIWI5 l3zNcrtTAMzrkgp+IGWf/GDQdVJwGyeXUVt4ee7/6KNuBOnWpoUzTB8Dg9zmNl0b 7WIcCm1ZuGjzbfrhw7r4oyeSN7Vrm8kSixh/hdo4rTPYJNL1KK0JaSraVK5Ha/xi /qxq5Ddq2dUqZjn6hr3nPWpg5ccSo3rJ4A5w/mfigMQ/FOp9HLKFQJN1NofH8P6d JpJwcvhIPrGHe0ftNpxw+Wcuqex9Aqt6apiKsTDypWUz6yD3zWc8yG3R4ANg== 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=1739496512; x= 1739582912; bh=qEM2A4la9RxFkprKX9G/QxR7b4Sa8TkAC496vEy+pno=; b=c 12i4Rf/OV+Il/+fJWNLLizwNWOjmW8dRaEyXkPqZ6br5Ho2oA3miNoZVy64mgmIb SA2XRnb19TmzFDwQyTIn9sDdjfIZjsnYBRqckT4M1omsWFtXPM64ybFSXmrOc7QL GkRnQA0fmU73zTdsWIdFCAj6E8CYIuXFuS0CeYVuCVi7FZ4yfy/M3K0ox6kvg+Vi BlhPVvU+LTfGBLe8V17qdyKwzA0ykht6IZ3foKMCjYDMVSP1oBjojpZZ5G55v+Ud diPh7/wkwoBtKvzC0X2+Og/IdrjccszDkRbmSH6Eii5Gmhv+KfxwA6bOuqLNGAY9 c6OY2g5kJIKd+R560RrPw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdegkeeffecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefhvfevufffkffojghfgggtgfesthekredtredt jeenucfhrhhomhepofgrrhgvkhcuofgrrhgtiiihkhhofihskhhiqdfikphrvggtkhhiuc eomhgrrhhmrghrvghksehinhhvihhsihgslhgvthhhihhnghhslhgrsgdrtghomheqnecu ggftrfgrthhtvghrnhepgfeuudehgfdvfeehhedujeehfeduveeugefhkefhheelgeevud etueeiudfggfffnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhf rhhomhepmhgrrhhmrghrvghksehinhhvihhsihgslhgvthhhihhnghhslhgrsgdrtghomh dpnhgspghrtghpthhtohephedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepgigv nhdquggvvhgvlheslhhishhtshdrgigvnhhprhhojhgvtghtrdhorhhgpdhrtghpthhtoh epmhgrrhhmrghrvghksehinhhvihhsihgslhgvthhhihhnghhslhgrsgdrtghomhdprhgt phhtthhopehsthgvfhgrnhhordhsthgrsggvlhhlihhnihesrghmugdrtghomhdprhgtph htthhopegtrghrughovgestggrrhguohgvrdgtohhmpdhrtghpthhtohepshhsthgrsggv lhhlihhniheskhgvrhhnvghlrdhorhhg X-ME-Proxy: Feedback-ID: i1568416f:Fastmail From: =?utf-8?q?Marek_Marczykowski-G=C3=B3recki?= To: xen-devel@lists.xenproject.org Cc: =?utf-8?q?Marek_Marczykowski-G=C3=B3recki?= , Stefano Stabellini , Doug Goldstein , Stefano Stabellini Subject: [PATCH v2 1/4] automation: skip building domU if there is no test defined for it Date: Fri, 14 Feb 2025 02:28:07 +0100 Message-ID: <1bcb6bea13c964df6119ae04502e0fee3c928052.1739496480.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 Fri Feb 14 01:28:08 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: 13974269 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 53A60C021A0 for ; Fri, 14 Feb 2025 01:28:51 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.888258.1297660 (Exim 4.92) (envelope-from ) id 1tikVT-0005eh-6O; Fri, 14 Feb 2025 01:28:39 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 888258.1297660; Fri, 14 Feb 2025 01:28: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 1tikVT-0005e5-23; Fri, 14 Feb 2025 01:28:39 +0000 Received: by outflank-mailman (input) for mailman id 888258; Fri, 14 Feb 2025 01:28:37 +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 1tikVR-0005Nm-06 for xen-devel@lists.xenproject.org; Fri, 14 Feb 2025 01:28:37 +0000 Received: from fout-a1-smtp.messagingengine.com (fout-a1-smtp.messagingengine.com [103.168.172.144]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 01d02365-ea73-11ef-9896-31a8f345e629; Fri, 14 Feb 2025 02:28:35 +0100 (CET) Received: from phl-compute-12.internal (phl-compute-12.phl.internal [10.202.2.52]) by mailfout.phl.internal (Postfix) with ESMTP id 477201380289; Thu, 13 Feb 2025 20:28:34 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-12.internal (MEProxy); Thu, 13 Feb 2025 20:28:34 -0500 Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 13 Feb 2025 20:28: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: 01d02365-ea73-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=1739496514; x=1739582914; bh=DC6A2BjUjZ pkR7anGZPjWglSZCWFDKHyJlMNEw2MOAA=; b=gAPuXBZxamzzHozU4vT3HTRAMw k645th90YnJVPR48p1Ge9LyTSnVn5AjbMhvLyWc+7gIgjs0sQXnXFcq0V3peVpQ2 5IoOIzLTJM+xq2HbzasbGvyYcq+qmvIsQUEeoIO4/Sm16DLLt3PZ2GnYSUF4Mswj jMPiZZwrEXDrMfYe8rxGE04GNMiWKLKLIgQH/zg3AJ1686LzIMUbdMCpIUccr940 qYhZMRneQHiImVIyvHUmo5VsPkh/0Bm7yJHsnJmGTTKwrEHzIYDYn1I8X/S0rNMf EocRwqHHeCbSd/nLkOeHpAoDw7RrJj29muJ5WsqqezUvAROeLaNzzrSeKPNQ== 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=1739496514; x= 1739582914; bh=DC6A2BjUjZpkR7anGZPjWglSZCWFDKHyJlMNEw2MOAA=; b=u j3ZWJtpSbMVROpEeu6Np+UE56GWs50dRHcAvxdrwQ6iHY+0td6ySWdqPgotQG5xa eoMNj41NF+3+jCPtW7vJGeOst7IRAVSE1jz0rkLI+K1aFt/fW7Zdv+wPdVahFQCz GTNyCekKcOZfmJj7PQ2i9389xx8L7ECuAlCbHbDtnGsDWVEu2LM/mFIdeesKVpic t/SU8ljFkE0MzSlrwakHJnz5M524JN1UojuzzCW3/oxmSRgzQMxP4J+gGyyyUD1Q BYwjhwWKiUEh0nCOAI3ii0bdoIWHUe7hf7M5tvpaIlQ5LELTW9LzEBJxrfX8Jkmd WveTvHI5CvCKoeXT9KsqA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdegkeeffecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefhvfevufffkffojghfgggtgfesthekredtredt jeenucfhrhhomhepofgrrhgvkhcuofgrrhgtiiihkhhofihskhhiqdfikphrvggtkhhiuc eomhgrrhhmrghrvghksehinhhvihhsihgslhgvthhhihhnghhslhgrsgdrtghomheqnecu ggftrfgrthhtvghrnhepgfeuudehgfdvfeehhedujeehfeduveeugefhkefhheelgeevud etueeiudfggfffnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhf rhhomhepmhgrrhhmrghrvghksehinhhvihhsihgslhgvthhhihhnghhslhgrsgdrtghomh dpnhgspghrtghpthhtohepgedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepgigv nhdquggvvhgvlheslhhishhtshdrgigvnhhprhhojhgvtghtrdhorhhgpdhrtghpthhtoh epmhgrrhhmrghrvghksehinhhvihhsihgslhgvthhhihhnghhslhgrsgdrtghomhdprhgt phhtthhopegtrghrughovgestggrrhguohgvrdgtohhmpdhrtghpthhtohepshhsthgrsg gvlhhlihhniheskhgvrhhnvghlrdhorhhg X-ME-Proxy: Feedback-ID: i1568416f:Fastmail From: =?utf-8?q?Marek_Marczykowski-G=C3=B3recki?= To: xen-devel@lists.xenproject.org Cc: =?utf-8?q?Marek_Marczykowski-G=C3=B3recki?= , Doug Goldstein , Stefano Stabellini Subject: [PATCH v2 2/4] automation: add jobs running tests from tools/tests/* Date: Fri, 14 Feb 2025 02:28:08 +0100 Message-ID: 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 Fri Feb 14 01:28:09 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: 13974271 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 8E33EC021A8 for ; Fri, 14 Feb 2025 01:28:53 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.888259.1297666 (Exim 4.92) (envelope-from ) id 1tikVT-0005lC-FU; Fri, 14 Feb 2025 01:28:39 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 888259.1297666; Fri, 14 Feb 2025 01:28: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 1tikVT-0005ih-9n; Fri, 14 Feb 2025 01:28:39 +0000 Received: by outflank-mailman (input) for mailman id 888259; Fri, 14 Feb 2025 01:28: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 1tikVR-0005Nw-FW for xen-devel@lists.xenproject.org; Fri, 14 Feb 2025 01:28:37 +0000 Received: from fhigh-a4-smtp.messagingengine.com (fhigh-a4-smtp.messagingengine.com [103.168.172.155]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 029dd132-ea73-11ef-9aa4-95dc52dad729; Fri, 14 Feb 2025 02:28:36 +0100 (CET) Received: from phl-compute-09.internal (phl-compute-09.phl.internal [10.202.2.49]) by mailfhigh.phl.internal (Postfix) with ESMTP id 973761140207; Thu, 13 Feb 2025 20:28:35 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-09.internal (MEProxy); Thu, 13 Feb 2025 20:28:35 -0500 Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 13 Feb 2025 20:28: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: 029dd132-ea73-11ef-9aa4-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=1739496515; x=1739582915; bh=8M1xzm8hV9 Um78SmNZrELAQJGXvbIf1E+3WQK8Hqgk0=; b=gmOcKtPjvElDelKwGCXU5UmSxd Ock1EECd78G1BedShiWbb/AC2Nd1vDfYaUcNPALpuO6uGQpw46pELOB9KUvdgvTy nORy0qAK0M4psISKccGsGt5L3IwPR9QXqHyE3CGM/kLHRBhcqrdfnbmdoALk8nKW 8J0kRKL2E1qn+Ge4ck+z+RJ4JG1WGZvNnh6IhwnMl+rRg7r7W0lbNbsTulNKSEQM 5Nju3b3Isp0XohglstKZkVbA7LhJtJ01qU6ZL0TSSd7IPJCg02NS3XgmTNq3VbyN KWIY5bTXvg4famv32da1JJyEPH+5ZD/yFDTUOiwRgZ6jP50cZZrPPAamRE6Q== 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=1739496515; x= 1739582915; bh=8M1xzm8hV9Um78SmNZrELAQJGXvbIf1E+3WQK8Hqgk0=; b=0 B/eq6H1epggdSxqjlwEj3Gc/SeN9DaZ0kw/yUj2A5ZnyW86FH4ylIpEEF/HWSGW+ MdpGUc0LTUC60h+zGM+kZoUpb6jG3pIx1m3ujvhi79Q3vEeP5bpDjTv8vI4gYBAK Co/8Fbn/2Pab2xOZ96vnrrbsXNYYbzkYU2cLFRFOVSebHQ06IwKGbeLjO/29S6qi i6JrOYhNughGn9kvzIwXxSB3DHselQyfHwRYwU1hbiIbQfNmtHoJ2xO9OWShRkKJ vuBiwaKqc2uC3nkeSB8MrBhX9nKm3RuioYSvRbbqwqqC6UWZwpFbdaN8fYlXGVXv dxDPLizux1T0o32gUy2gQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdegkeefgecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefhvfevufffkffojghfgggtgfesthekredtredt jeenucfhrhhomhepofgrrhgvkhcuofgrrhgtiiihkhhofihskhhiqdfikphrvggtkhhiuc eomhgrrhhmrghrvghksehinhhvihhsihgslhgvthhhihhnghhslhgrsgdrtghomheqnecu ggftrfgrthhtvghrnhepudeuheehtefghfelhfffheevffeftefhteehtddtfeevfedvle dvvdfhffevkeetnecuffhomhgrihhnpehgihhtlhgrsgdrtghordhjphdpghhithhlrggs rdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh epmhgrrhhmrghrvghksehinhhvihhsihgslhgvthhhihhnghhslhgrsgdrtghomhdpnhgs pghrtghpthhtohepgedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepgigvnhdqug gvvhgvlheslhhishhtshdrgigvnhhprhhojhgvtghtrdhorhhgpdhrtghpthhtohepmhgr rhhmrghrvghksehinhhvihhsihgslhgvthhhihhnghhslhgrsgdrtghomhdprhgtphhtth hopegtrghrughovgestggrrhguohgvrdgtohhmpdhrtghpthhtohepshhsthgrsggvlhhl ihhniheskhgvrhhnvghlrdhorhhg X-ME-Proxy: Feedback-ID: i1568416f:Fastmail From: =?utf-8?q?Marek_Marczykowski-G=C3=B3recki?= To: xen-devel@lists.xenproject.org Cc: =?utf-8?q?Marek_Marczykowski-G=C3=B3recki?= , Doug Goldstein , Stefano Stabellini Subject: [PATCH v2 3/4] automation: allow selecting individual jobs via CI variables Date: Fri, 14 Feb 2025 02:28:09 +0100 Message-ID: <53730b7d7120635ce9079b57fc7e25b610569316.1739496480.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 --- This probably wants documenting beyond this commit message. I don't think we have any CI-related docs anywhere, do we? Some new file in docs/misc? And also, it's possible to extend web ui for starting pipelines to include pre-defined variables. I use it in qubes here if you want to see: https://gitlab.com/QubesOS/qubes-continuous-integration/-/pipelines/new Does it make sense to include SELECTED_JOBS_ONLY this way too? Personally, I'll probably use it via cmdline push only anyway, but I don't know what workflows other people have. --- automation/gitlab-ci/build.yaml | 6 ++++++ automation/gitlab-ci/test.yaml | 14 ++++++++++++++ 2 files changed, 20 insertions(+) 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 Fri Feb 14 01:28:10 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: 13974270 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 546FCC021A4 for ; Fri, 14 Feb 2025 01:28:52 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.888260.1297687 (Exim 4.92) (envelope-from ) id 1tikVU-0006J4-Sh; Fri, 14 Feb 2025 01:28:40 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 888260.1297687; Fri, 14 Feb 2025 01:28:40 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tikVU-0006IN-LW; Fri, 14 Feb 2025 01:28:40 +0000 Received: by outflank-mailman (input) for mailman id 888260; Fri, 14 Feb 2025 01:28:39 +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 1tikVT-0005Nm-9x for xen-devel@lists.xenproject.org; Fri, 14 Feb 2025 01:28:39 +0000 Received: from fhigh-a4-smtp.messagingengine.com (fhigh-a4-smtp.messagingengine.com [103.168.172.155]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 0367de5e-ea73-11ef-9896-31a8f345e629; Fri, 14 Feb 2025 02:28:37 +0100 (CET) Received: from phl-compute-05.internal (phl-compute-05.phl.internal [10.202.2.45]) by mailfhigh.phl.internal (Postfix) with ESMTP id EBE1B11401EC; Thu, 13 Feb 2025 20:28:36 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-05.internal (MEProxy); Thu, 13 Feb 2025 20:28:36 -0500 Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 13 Feb 2025 20:28: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: 0367de5e-ea73-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=1739496516; x=1739582916; bh=q8B6ZSMLNS JBGfPmB3tWWzqZ7+U98kelJ1d0kjDhI2Q=; b=K5EeALrIaCXHv/QmcW8U1WqmwD MTTILqWKonIuPne37nGCC9ROjTSCUSt6lrSsmDR9IoT/3ZJQaUINyOPfMn/UX2tZ tv3kZ1i3Aok4x9130OatVVdD5ZKysHzm05UMucusakWN5psNEXJ8Cxj/9cJSWDfT Pz7xV3o59v5Qy6grGgYlCFd2KfNNkQGrm9V6i+XxFQWLPYh8p98grzVeRJEvz9Zn +TU+J1nJ1Kd3D9RZBne6fiaEri5g3dQ5tiFxHgzbDXYGXI33BMcuXLyMi7iGGwEY s4nxuStgd6+XfDVxj707YUbRVfByH1c06QC/nbjUJFD0mQHqe4A86wkHRfXw== 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=1739496516; x= 1739582916; bh=q8B6ZSMLNSJBGfPmB3tWWzqZ7+U98kelJ1d0kjDhI2Q=; b=d +afpIbZ+RgDpoyh4de+F+qZb3Qv+Vl9iLq3KGj0yMqMm2FyXiLt2gWAYQ7FLfcjH voICUTjQDu+WsWtAYFFwvsVq0Lf7mn7xodnpgS0WNqwp62Fz0Ub0ts+NLzwS4XS5 HZYmMUjrHyg4qT6b30wXCD4uYdKdWq8b7J4GQEvFgybRaUJudTbXvTlhWP3bG90J u5KJKBhBR9C04E7Sdr3S/+zVGFS6wGhCAbKdJf2olcAxmZQf0gTUJJBji1DlnILO ZBDHIUUyliXXdV56/RDjTE1At2Rs2a8HjAjNlcjhe8yBO9E8WW49D2veV1KkqYXa dFBjDAnz1SHzPOC7rKZdQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdegkeeffecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefhvfevufffkffojghfgggtgfesthekredtredt jeenucfhrhhomhepofgrrhgvkhcuofgrrhgtiiihkhhofihskhhiqdfikphrvggtkhhiuc eomhgrrhhmrghrvghksehinhhvihhsihgslhgvthhhihhnghhslhgrsgdrtghomheqnecu ggftrfgrthhtvghrnhepgfeuudehgfdvfeehhedujeehfeduveeugefhkefhheelgeevud etueeiudfggfffnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhf rhhomhepmhgrrhhmrghrvghksehinhhvihhsihgslhgvthhhihhnghhslhgrsgdrtghomh dpnhgspghrtghpthhtohepgedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepgigv nhdquggvvhgvlheslhhishhtshdrgigvnhhprhhojhgvtghtrdhorhhgpdhrtghpthhtoh epmhgrrhhmrghrvghksehinhhvihhsihgslhgvthhhihhnghhslhgrsgdrtghomhdprhgt phhtthhopegtrghrughovgestggrrhguohgvrdgtohhmpdhrtghpthhtohepshhsthgrsg gvlhhlihhniheskhgvrhhnvghlrdhorhhg X-ME-Proxy: Feedback-ID: i1568416f:Fastmail From: =?utf-8?q?Marek_Marczykowski-G=C3=B3recki?= To: xen-devel@lists.xenproject.org Cc: =?utf-8?q?Marek_Marczykowski-G=C3=B3recki?= , Doug Goldstein , Stefano Stabellini Subject: [PATCH v2 4/4] automation: add tools/tests jobs on the AMD Zen3+ runner too Date: Fri, 14 Feb 2025 02:28:10 +0100 Message-ID: <82cb819ef4d54705b3a79ce5b77003380382ebbf.1739496480.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 If those tests are sensitive to underlying hardware, I guess it makes sense to run them on other runners too. Are they? Similarly - does it matter if dom0 is PV or PVH for those tests? If not, probably better to put just one of those jobs (PV?) to save CI time. --- 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: