From patchwork Fri Dec 1 15:12:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 748999 Delivered-To: patch@linaro.org Received: by 2002:adf:f9cb:0:b0:32d:baff:b0ca with SMTP id w11csp332174wrr; Fri, 1 Dec 2023 07:14:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IG3QlInQepw9zV60GKw/EYhU+xn49ngn6HvJaBjQxiJAlaGy5+J4BoysTyyzZmnJhrKAieR X-Received: by 2002:a05:6102:4a9:b0:464:4e2b:55e8 with SMTP id r9-20020a05610204a900b004644e2b55e8mr9010395vsa.33.1701443692485; Fri, 01 Dec 2023 07:14:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701443692; cv=none; d=google.com; s=arc-20160816; b=jOSDZqhZWP2xEYqL21Bzo/JjRfrt5TM+VYYQmHkCP3UJfi2bPIe9z9jIjCdPmnGr5o JSPBr3mFTbRArUej9Zvr88vFDY/oM5gEnBwqrRL1x56Y1417e3kLik6P5LgjyBWz6qWS IMCpQApv+SPDIymEM/rCxKDRdhTN+lKnS6v1XEoEpO1gK8I/Ll/hdCcoIQ5mm51uXU1F JexpwMAsLrHjz7EKx9pQjRqaJ5dTCK5gusRRb8pqsO3M2J6UK4994ax/drEOyFEoZC83 pDEKBynBuBlMhP03eJbBKygfl5/jAyhrJmf/H/5pRTBNx6CPnukNbii+yzQ0htLt2eDZ Dy0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=5LRig+tQmW4bH55Vbco9n1/RCIy3/FKKNzzRuQiv8bw=; fh=OP/WzVpCQMNcqN2ohnefVAU1Iwu+pKeugK/8oBq396s=; b=HD0dsx2RSwIvxitvsXS/3QM4sIDVDTjaEYx47Ge7lmPAnD4NmFQDA7Zc2w+I4IlIrp IU1uHUL6RsrOur6pu3pwGjLfaTToNfgGM0DZnjTPX+Oy2doMTtjV9/3JXFRbWhJBApxm JKs8X1ve62fKAQurwKHmipGZT0oJmXptSsyjY+GNfMMfFHem/e4bkX+JbuDCBcfuOHvn aeztVjWAzY89BV04O0YVpd3iBIssev9eWh+lZh3OsSlcV9r+/j9SD4sU9lUZY/MoH1Qy p6bBnrPjwrhBm82PmW58ap5pmK5IUuUz6MvusvsZukiqS4hL/WdVnoi+Ccylskskhc1D Gp3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yeOsBj9j; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id n9-20020a67fb89000000b004644db177a6si752490vsr.718.2023.12.01.07.14.52 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 01 Dec 2023 07:14:52 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yeOsBj9j; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r95CY-000532-6J; Fri, 01 Dec 2023 10:13:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r95C4-0004rE-36 for qemu-devel@nongnu.org; Fri, 01 Dec 2023 10:12:42 -0500 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r95By-0003tc-Uo for qemu-devel@nongnu.org; Fri, 01 Dec 2023 10:12:39 -0500 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-40a4848c6e1so19382795e9.1 for ; Fri, 01 Dec 2023 07:12:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701443552; x=1702048352; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=5LRig+tQmW4bH55Vbco9n1/RCIy3/FKKNzzRuQiv8bw=; b=yeOsBj9jqQQnk0Vn7/s1MOPC/2JGV4/VZn7dq4YUlRLNURJP7ua3GSqbINEz7/CrZk 8pQhfkjKS6jGM+WAOISQYj2qxZEjFL3Q614HQT12XjfhwiB5bPGzRXnemFBkhr1+t+e2 kTq8yzcT+9PnmBt6zzVIVy4r9DE6OJ3GHZfjVLrXRwgLa0SsfJzoQOwNgj8KE89Np0gy /J1eKwC3U15UTUbi4r6WE9Yq4UGEzrVjcmgFUa4nVKViBBlYF92VyM80Eebdf5LLvTBh x8bjHnLlD2u7yvb4y2m8QSXb8Kg5qUzq8CL0u2aQ0DDTu0h9YGDkIe1UYipC/1ZnG6Uy x1UA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701443552; x=1702048352; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5LRig+tQmW4bH55Vbco9n1/RCIy3/FKKNzzRuQiv8bw=; b=U1ZBh6OUm+ycq27kglortlHSTKQ2et1o5oamrqMzmU52qs7z2IGBfVsvFWMutblYMb 5OmmT8QKnw1yNMM5mRWqpXnqB9NUBc1ff2RDM0seAOhCTs2P+gd7gHZdzc5/yWFBrRXL J8gDFcSZHlOvXTqogW+U3Ufb7c4iptGLFjUIBa7OT4nvu6FtapXyvoJyFo2F6IKeQ9qs KuY7Jyo3tbC+qYgCEma9P/pP0J3U8Ibx4mPBrAZrkMuFJ/KH7Js+rpgI2ySfW9/StCQo AhzJ5c1ouyya4jypBHo7xkmMXhWX3pAAqIUUsQW0PThKXZWU8ia1R8NBngRqBBvak0CO kjjA== X-Gm-Message-State: AOJu0YwvPeZ0KKGbIjDxl/sUzgkqSiz+J+jAwwo9k7jBtdF1DWznRdHs alif3aJVbEy+yxjNFiamQCHs4w== X-Received: by 2002:a05:600c:4f46:b0:40b:5e4a:4068 with SMTP id m6-20020a05600c4f4600b0040b5e4a4068mr376375wmq.136.1701443552133; Fri, 01 Dec 2023 07:12:32 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id j7-20020a5d4527000000b00332fda15056sm4387336wra.110.2023.12.01.07.12.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Dec 2023 07:12:31 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 782DF5FB6B; Fri, 1 Dec 2023 15:12:29 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Richard Henderson , Stefan Hajnoczi , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Thomas Huth , Wainer dos Santos Moschetta , Beraldo Leal , Cleber Rosa , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Peter Maydell , Andrew Jeffery , Joel Stanley , Aurelien Jarno , Yoshinori Sato , Halil Pasic , Christian Borntraeger , Eric Farman , Pavel Dovgalyuk , Paolo Bonzini , Eric Auger , qemu-arm@nongnu.org (open list:ASPEED BMCs), qemu-s390x@nongnu.org (open list:S390 Virtio-ccw) Subject: [PULL 6/6] gitlab: add optional job to run flaky avocado tests Date: Fri, 1 Dec 2023 15:12:28 +0000 Message-Id: <20231201151228.2610209-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231201151228.2610209-1-alex.bennee@linaro.org> References: <20231201151228.2610209-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x335.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org One problem with flaky tests is they often only fail under CI conditions which makes it hard to debug. We add an optional allow_fail job so developers can trigger the only the flaky tests in the CI environment if they are debugging. Reviewed-by: Richard Henderson Acked-by: Stefan Hajnoczi Signed-off-by: Alex Bennée Message-Id: <20231201093633.2551497-8-alex.bennee@linaro.org> diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst index 76465b8f3d..bd132306c1 100644 --- a/docs/devel/testing.rst +++ b/docs/devel/testing.rst @@ -1387,16 +1387,17 @@ the code snippet below: def test(self): do_something() -Tests should not live in this state forever and should either be fixed -or eventually removed. - -To run such tests locally you will need to set the environment -variable. For example: +You can also add ``:avocado: tags=flaky`` to the test meta-data so +only the flaky tests can be run as a group: .. code:: - env QEMU_TEST_FLAKY_TESTS=1 ./pyvenv/bin/avocado run \ - tests/avocado/boot_linux.py:BootLinuxPPC64.test_pseries_tcg + env QEMU_TEST_FLAKY_TESTS=1 ./pyvenv/bin/avocado \ + run tests/avocado -filter-by-tags=flaky + +Tests should not live in this state forever and should either be fixed +or eventually removed. + Uninstalling Avocado ~~~~~~~~~~~~~~~~~~~~ diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml index 62b5379a5e..91663946de 100644 --- a/.gitlab-ci.d/buildtest.yml +++ b/.gitlab-ci.d/buildtest.yml @@ -217,6 +217,36 @@ avocado-system-opensuse: MAKE_CHECK_ARGS: check-avocado AVOCADO_TAGS: arch:s390x arch:x86_64 arch:aarch64 +# +# Flaky tests. We don't run these by default and they are allow fail +# but often the CI system is the only way to trigger the failures. +# + +build-system-flaky: + extends: + - .native_build_job_template + - .native_build_artifact_template + needs: + job: amd64-debian-container + variables: + IMAGE: debian + QEMU_JOB_OPTIONAL: 1 + TARGETS: aarch64-softmmu arm-softmmu mips64el-softmmu + ppc64-softmmu rx-softmmu s390x-softmmu sh4-softmmu x86_64-softmmu + MAKE_CHECK_ARGS: check-build + +avocado-system-flaky: + extends: .avocado_test_job_template + needs: + - job: build-system-flaky + artifacts: true + allow_failure: true + variables: + IMAGE: debian + MAKE_CHECK_ARGS: check-avocado + QEMU_JOB_OPTIONAL: 1 + QEMU_TEST_FLAKY_TESTS: 1 + AVOCADO_TAGS: flaky # This jobs explicitly disable TCG (--disable-tcg), KVM is detected by # the configure script. The container doesn't contain Xen headers so diff --git a/tests/avocado/boot_linux.py b/tests/avocado/boot_linux.py index 9e9773e6e1..7c4769904e 100644 --- a/tests/avocado/boot_linux.py +++ b/tests/avocado/boot_linux.py @@ -99,6 +99,7 @@ def test_pseries_tcg(self): """ :avocado: tags=machine:pseries :avocado: tags=accel:tcg + :avocado: tags=flaky """ self.require_accelerator("tcg") self.vm.add_args("-accel", "tcg") @@ -118,6 +119,7 @@ def test_s390_ccw_virtio_tcg(self): """ :avocado: tags=machine:s390-ccw-virtio :avocado: tags=accel:tcg + :avocado: tags=flaky """ self.require_accelerator("tcg") self.vm.add_args("-accel", "tcg") diff --git a/tests/avocado/boot_linux_console.py b/tests/avocado/boot_linux_console.py index ba2f99b53a..7487337f46 100644 --- a/tests/avocado/boot_linux_console.py +++ b/tests/avocado/boot_linux_console.py @@ -1384,6 +1384,7 @@ def test_sh4_r2d(self): """ :avocado: tags=arch:sh4 :avocado: tags=machine:r2d + :avocado: tags=flaky """ tar_hash = 'fe06a4fd8ccbf2e27928d64472939d47829d4c7e' self.vm.add_args('-append', 'console=ttySC1') diff --git a/tests/avocado/intel_iommu.py b/tests/avocado/intel_iommu.py index 2dd11a6346..f04ee1cf9d 100644 --- a/tests/avocado/intel_iommu.py +++ b/tests/avocado/intel_iommu.py @@ -22,6 +22,7 @@ class IntelIOMMU(LinuxTest): :avocado: tags=machine:q35 :avocado: tags=accel:kvm :avocado: tags=intel_iommu + :avocado: tags=flaky """ IOMMU_ADDON = ',iommu_platform=on,disable-modern=off,disable-legacy=on' diff --git a/tests/avocado/linux_initrd.py b/tests/avocado/linux_initrd.py index c40a987bd1..aad5b19bd9 100644 --- a/tests/avocado/linux_initrd.py +++ b/tests/avocado/linux_initrd.py @@ -57,6 +57,8 @@ def test_with_2gib_file_should_exit_error_msg_with_linux_v3_6(self): def test_with_2gib_file_should_work_with_linux_v4_16(self): """ + :avocado: tags=flaky + QEMU has supported up to 4 GiB initrd for recent kernel Expect guest can reach 'Unpacking initramfs...' """ diff --git a/tests/avocado/machine_aspeed.py b/tests/avocado/machine_aspeed.py index 258fb50c47..6fa5459a07 100644 --- a/tests/avocado/machine_aspeed.py +++ b/tests/avocado/machine_aspeed.py @@ -317,6 +317,7 @@ def test_arm_ast2500_evb_sdk(self): """ :avocado: tags=arch:arm :avocado: tags=machine:ast2500-evb + :avocado: tags=flaky """ image_url = ('https://github.com/AspeedTech-BMC/openbmc/releases/' @@ -336,6 +337,7 @@ def test_arm_ast2600_evb_sdk(self): """ :avocado: tags=arch:arm :avocado: tags=machine:ast2600-evb + :avocado: tags=flaky """ image_url = ('https://github.com/AspeedTech-BMC/openbmc/releases/' diff --git a/tests/avocado/machine_mips_malta.py b/tests/avocado/machine_mips_malta.py index 959dcf5602..99bee49e9a 100644 --- a/tests/avocado/machine_mips_malta.py +++ b/tests/avocado/machine_mips_malta.py @@ -109,6 +109,7 @@ def test_mips_malta_i6400_framebuffer_logo_7cores(self): :avocado: tags=machine:malta :avocado: tags=cpu:I6400 :avocado: tags=mips:smp + :avocado: tags=flaky """ self.do_test_i6400_framebuffer_logo(7) @@ -120,6 +121,7 @@ def test_mips_malta_i6400_framebuffer_logo_8cores(self): :avocado: tags=machine:malta :avocado: tags=cpu:I6400 :avocado: tags=mips:smp + :avocado: tags=flaky """ self.do_test_i6400_framebuffer_logo(8) diff --git a/tests/avocado/machine_rx_gdbsim.py b/tests/avocado/machine_rx_gdbsim.py index 350a73fbbb..412a7a5089 100644 --- a/tests/avocado/machine_rx_gdbsim.py +++ b/tests/avocado/machine_rx_gdbsim.py @@ -31,6 +31,7 @@ def test_uboot(self): :avocado: tags=arch:rx :avocado: tags=machine:gdbsim-r5f562n8 :avocado: tags=endian:little + :avocado: tags=flaky """ uboot_url = ('https://acc.dl.osdn.jp/users/23/23888/u-boot.bin.gz') uboot_hash = '9b78dbd43b40b2526848c0b1ce9de02c24f4dcdb' @@ -56,6 +57,7 @@ def test_linux_sash(self): :avocado: tags=arch:rx :avocado: tags=machine:gdbsim-r5f562n7 :avocado: tags=endian:little + :avocado: tags=flaky """ dtb_url = ('https://acc.dl.osdn.jp/users/23/23887/rx-virt.dtb') dtb_hash = '7b4e4e2c71905da44e86ce47adee2210b026ac18' diff --git a/tests/avocado/machine_s390_ccw_virtio.py b/tests/avocado/machine_s390_ccw_virtio.py index 61e75d8f9e..26e938c9e9 100644 --- a/tests/avocado/machine_s390_ccw_virtio.py +++ b/tests/avocado/machine_s390_ccw_virtio.py @@ -167,6 +167,7 @@ def test_s390x_fedora(self): :avocado: tags=device:virtio-gpu :avocado: tags=device:virtio-crypto :avocado: tags=device:virtio-net + :avocado: tags=flaky """ kernel_url = ('https://archives.fedoraproject.org/pub/archive' diff --git a/tests/avocado/replay_kernel.py b/tests/avocado/replay_kernel.py index 0d32cc280e..af086eab08 100644 --- a/tests/avocado/replay_kernel.py +++ b/tests/avocado/replay_kernel.py @@ -88,6 +88,7 @@ def test_x86_64_pc(self): """ :avocado: tags=arch:x86_64 :avocado: tags=machine:pc + :avocado: tags=flaky """ kernel_url = ('https://archives.fedoraproject.org/pub/archive/fedora' '/linux/releases/29/Everything/x86_64/os/images/pxeboot' @@ -186,6 +187,7 @@ def test_arm_cubieboard_initrd(self): """ :avocado: tags=arch:arm :avocado: tags=machine:cubieboard + :avocado: tags=flaky """ deb_url = ('https://apt.armbian.com/pool/main/l/' 'linux-5.10.16-sunxi/linux-image-current-sunxi_21.02.2_armhf.deb') diff --git a/tests/avocado/reverse_debugging.py b/tests/avocado/reverse_debugging.py index 9a468321e5..4cce5a5598 100644 --- a/tests/avocado/reverse_debugging.py +++ b/tests/avocado/reverse_debugging.py @@ -255,6 +255,7 @@ def test_ppc64_pseries(self): """ :avocado: tags=arch:ppc64 :avocado: tags=machine:pseries + :avocado: tags=flaky """ # SLOF branches back to its entry point, which causes this test # to take the 'hit a breakpoint again' path. That's not a problem, @@ -269,6 +270,7 @@ def test_ppc64_powernv(self): """ :avocado: tags=arch:ppc64 :avocado: tags=machine:powernv + :avocado: tags=flaky """ self.endian_is_le = False self.reverse_debugging() diff --git a/tests/avocado/smmu.py b/tests/avocado/smmu.py index 05b34418a5..21ff030ca7 100644 --- a/tests/avocado/smmu.py +++ b/tests/avocado/smmu.py @@ -22,6 +22,7 @@ class SMMU(LinuxTest): :avocado: tags=machine:virt :avocado: tags=distro:fedora :avocado: tags=smmu + :avocado: tags=flaky """ IOMMU_ADDON = ',iommu_platform=on,disable-modern=off,disable-legacy=on' diff --git a/tests/avocado/tuxrun_baselines.py b/tests/avocado/tuxrun_baselines.py index 5f859f4e6f..a936a3b780 100644 --- a/tests/avocado/tuxrun_baselines.py +++ b/tests/avocado/tuxrun_baselines.py @@ -561,6 +561,7 @@ def test_sh4(self): :avocado: tags=image:zImage :avocado: tags=root:sda :avocado: tags=console:ttySC1 + :avocado: tags=flaky """ sums = { "rootfs.ext4.zst" : "3592a7a3d5a641e8b9821449e77bc43c9904a56c30d45da0694349cfd86743fd",