qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Cédric Le Goater" <clg@redhat.com>
Subject: [PULL 16/16] tests/avocado/machine_s390_ccw_virtio: Skip the flaky virtio-gpu test by default
Date: Mon, 24 Jul 2023 18:53:49 +0200	[thread overview]
Message-ID: <20230724165349.55714-17-thuth@redhat.com> (raw)
In-Reply-To: <20230724165349.55714-1-thuth@redhat.com>

The virtio-gpu test is known to be flaky - that's why we also did
not enable the test_s390x_fedora in the gitlab CI. However, a flaky
test can also be annoying when testing locally, so let's rather skip
this subtest by default and start running the test_s390x_fedora test
in the gitlab CI again (since the other things that are tested here
are quite valuable).

Message-Id: <20230724084851.24251-1-thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 tests/avocado/machine_s390_ccw_virtio.py | 51 +++++++++++++-----------
 1 file changed, 27 insertions(+), 24 deletions(-)

diff --git a/tests/avocado/machine_s390_ccw_virtio.py b/tests/avocado/machine_s390_ccw_virtio.py
index 78152f2ad1..e7a2a20ba6 100644
--- a/tests/avocado/machine_s390_ccw_virtio.py
+++ b/tests/avocado/machine_s390_ccw_virtio.py
@@ -159,7 +159,6 @@ def test_s390x_devices(self):
                                           'MemTotal:         115640 kB')
 
 
-    @skipIf(os.getenv('GITLAB_CI'), 'Running on GitLab')
     def test_s390x_fedora(self):
 
         """
@@ -229,31 +228,35 @@ def test_s390x_fedora(self):
         # writing to the framebuffer. Since the PPM is uncompressed, we then
         # can simply read the written "magic bytes" back from the PPM file to
         # check whether the framebuffer is working as expected.
-        self.log.info("Test screendump of virtio-gpu device")
-        exec_command_and_wait_for_pattern(self,
+        # Unfortunately, this test is flaky, so we don't run it by default
+        if os.getenv('QEMU_TEST_FLAKY_TESTS'):
+            self.log.info("Test screendump of virtio-gpu device")
+            exec_command_and_wait_for_pattern(self,
                         'while ! (dmesg | grep gpudrmfb) ; do sleep 1 ; done',
                         'virtio_gpudrmfb frame buffer device')
-        exec_command_and_wait_for_pattern(self,
-            'echo -e "\e[?25l" > /dev/tty0', ':/#')
-        exec_command_and_wait_for_pattern(self, 'for ((i=0;i<250;i++)); do '
-            'echo " The  qu ick  fo x j ump s o ver  a  laz y d og" >> fox.txt;'
-            'done',
-            ':/#')
-        exec_command_and_wait_for_pattern(self,
-            'dd if=fox.txt of=/dev/fb0 bs=1000 oflag=sync,nocache ; rm fox.txt',
-            '12+0 records out')
-        with tempfile.NamedTemporaryFile(suffix='.ppm',
-                                         prefix='qemu-scrdump-') as ppmfile:
-            self.vm.command('screendump', filename=ppmfile.name)
-            ppmfile.seek(0)
-            line = ppmfile.readline()
-            self.assertEqual(line, b"P6\n")
-            line = ppmfile.readline()
-            self.assertEqual(line, b"1280 800\n")
-            line = ppmfile.readline()
-            self.assertEqual(line, b"255\n")
-            line = ppmfile.readline(256)
-            self.assertEqual(line, b"The quick fox jumps over a lazy dog\n")
+            exec_command_and_wait_for_pattern(self,
+                'echo -e "\e[?25l" > /dev/tty0', ':/#')
+            exec_command_and_wait_for_pattern(self, 'for ((i=0;i<250;i++)); do '
+                'echo " The  qu ick  fo x j ump s o ver  a  laz y d og" >> fox.txt;'
+                'done',
+                ':/#')
+            exec_command_and_wait_for_pattern(self,
+                'dd if=fox.txt of=/dev/fb0 bs=1000 oflag=sync,nocache ; rm fox.txt',
+                '12+0 records out')
+            with tempfile.NamedTemporaryFile(suffix='.ppm',
+                                             prefix='qemu-scrdump-') as ppmfile:
+                self.vm.command('screendump', filename=ppmfile.name)
+                ppmfile.seek(0)
+                line = ppmfile.readline()
+                self.assertEqual(line, b"P6\n")
+                line = ppmfile.readline()
+                self.assertEqual(line, b"1280 800\n")
+                line = ppmfile.readline()
+                self.assertEqual(line, b"255\n")
+                line = ppmfile.readline(256)
+                self.assertEqual(line, b"The quick fox jumps over a lazy dog\n")
+        else:
+            self.log.info("Skipped flaky screendump of virtio-gpu device test")
 
         # Hot-plug a virtio-crypto device and see whether it gets accepted
         self.log.info("Test hot-plug virtio-crypto device")
-- 
2.39.3



  parent reply	other threads:[~2023-07-24 16:55 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-24 16:53 [PULL 00/16] s390x fixes Thomas Huth
2023-07-24 16:53 ` [PULL 01/16] target/s390x: Make CKSM raise an exception if R2 is odd Thomas Huth
2023-07-24 16:53 ` [PULL 02/16] target/s390x: Fix CLM with M3=0 Thomas Huth
2023-07-24 16:53 ` [PULL 03/16] target/s390x: Fix CONVERT TO LOGICAL/FIXED with out-of-range inputs Thomas Huth
2023-07-24 16:53 ` [PULL 04/16] target/s390x: Fix ICM with M3=0 Thomas Huth
2023-07-24 16:53 ` [PULL 05/16] target/s390x: Make MC raise specification exception when class >= 16 Thomas Huth
2023-07-24 16:53 ` [PULL 06/16] target/s390x: Fix assertion failure in VFMIN/VFMAX with type 13 Thomas Huth
2023-07-24 16:53 ` [PULL 07/16] tests/tcg/s390x: Test CKSM Thomas Huth
2023-07-24 16:53 ` [PULL 08/16] tests/tcg/s390x: Test CLGEBR and CGEBRA Thomas Huth
2023-07-24 16:53 ` [PULL 09/16] tests/tcg/s390x: Test CLM Thomas Huth
2023-07-24 16:53 ` [PULL 10/16] tests/tcg/s390x: Test ICM Thomas Huth
2023-07-24 16:53 ` [PULL 11/16] tests/tcg/s390x: Test MC Thomas Huth
2023-07-24 16:53 ` [PULL 12/16] tests/tcg/s390x: Test STPQ Thomas Huth
2023-07-24 16:53 ` [PULL 13/16] tests/tcg/s390x: Test VCKSM Thomas Huth
2023-07-24 16:53 ` [PULL 14/16] tests/avocado/migration: Remove the malfunctioning s390x tests Thomas Huth
2023-07-24 16:53 ` [PULL 15/16] target/loongarch: Fix the CSRRD CPUID instruction on big endian hosts Thomas Huth
2023-07-24 16:53 ` Thomas Huth [this message]
2023-07-25 11:44 ` [PULL 00/16] s390x fixes Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230724165349.55714-17-thuth@redhat.com \
    --to=thuth@redhat.com \
    --cc=clg@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).