From: Thomas Huth <thuth@redhat.com>
To: qemu-devel@nongnu.org, Peter Maydell <peter.maydell@linaro.org>
Cc: Alexander Bulekov <alxndr@bu.edu>, Warner Losh <imp@freebsd.org>,
Qiuhao Li <Qiuhao.Li@outlook.com>
Subject: [PULL 14/15] tests/acceptance: Fix race conditions in s390x tests & skip fedora on gitlab-CI
Date: Mon, 11 Jan 2021 14:43:27 +0100 [thread overview]
Message-ID: <20210111134328.157775-15-thuth@redhat.com> (raw)
In-Reply-To: <20210111134328.157775-1-thuth@redhat.com>
There was a race condition in the first test where there was already the
"crw" output in the dmesg, but the "0.0.4711" entry has not been created
in the /sys fs yet. Fix it by waiting until it is there.
The second test has even more problems on gitlab-CI. Even after adding some
more synchronization points (that wait for some messages in the "dmesg"
output to make sure that the modules got loaded correctly), there are still
occasionally some hangs in this test when it is running in the gitlab-CI.
So far I was unable to reproduce these hangs locally on my computer, so
this issue might take a while to debug. Thus disable the 2nd test in the
gitlab-CI until the problems are better understood and fixed.
Signed-off-by: Thomas Huth <thuth@redhat.com>
Tested-by: Willian Rampazzo <willianr@redhat.com>
Reviewed-by: Willian Rampazzo <willianr@redhat.com>
Message-Id: <20210108185645.86351-1-thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
tests/acceptance/machine_s390_ccw_virtio.py | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/tests/acceptance/machine_s390_ccw_virtio.py b/tests/acceptance/machine_s390_ccw_virtio.py
index eccf26b262..4028c99afc 100644
--- a/tests/acceptance/machine_s390_ccw_virtio.py
+++ b/tests/acceptance/machine_s390_ccw_virtio.py
@@ -12,6 +12,7 @@
import os
import tempfile
+from avocado import skipIf
from avocado_qemu import Test
from avocado_qemu import exec_command_and_wait_for_pattern
from avocado_qemu import wait_for_console_pattern
@@ -133,8 +134,10 @@ class S390CCWVirtioMachine(Test):
self.vm.command('device_add', driver='virtio-net-ccw',
devno='fe.0.4711', id='net_4711')
self.wait_for_crw_reports()
- exec_command_and_wait_for_pattern(self, 'ls /sys/bus/ccw/devices/',
- '0.0.4711')
+ exec_command_and_wait_for_pattern(self, 'for i in 1 2 3 4 5 6 7 ; do '
+ 'if [ -e /sys/bus/ccw/devices/*4711 ]; then break; fi ;'
+ 'sleep 1 ; done ; ls /sys/bus/ccw/devices/',
+ '0.0.4711')
# and detach it again
self.clear_guest_dmesg()
self.vm.command('device_del', id='net_4711')
@@ -155,6 +158,7 @@ class S390CCWVirtioMachine(Test):
'MemTotal: 115640 kB')
+ @skipIf(os.getenv('GITLAB_CI'), 'Running on GitLab')
def test_s390x_fedora(self):
"""
@@ -199,6 +203,9 @@ class S390CCWVirtioMachine(Test):
# Some tests to see whether the CLI options have been considered:
self.log.info("Test whether QEMU CLI options have been considered")
+ exec_command_and_wait_for_pattern(self,
+ 'while ! (dmesg | grep enP7p0s0) ; do sleep 1 ; done',
+ 'virtio_net virtio0 enP7p0s0: renamed')
exec_command_and_wait_for_pattern(self, 'lspci',
'0007:00:00.0 Class 0200: Device 1af4:1000')
exec_command_and_wait_for_pattern(self,
@@ -222,6 +229,9 @@ class S390CCWVirtioMachine(Test):
# 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,
+ '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 '
--
2.27.0
next prev parent reply other threads:[~2021-01-11 13:51 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-11 13:43 [PULL 00/15] Testing, CI and bsd-user patches Thomas Huth
2021-01-11 13:43 ` [PULL 01/15] gitlab-ci.yml: Add openSUSE Leap 15.2 for gitlab CI/CD Thomas Huth
2021-01-11 13:43 ` [PULL 02/15] qtest/libqtest: fix heap-buffer-overflow in qtest_cb_for_every_machine() Thomas Huth
2021-01-11 13:43 ` [PULL 03/15] util/oslib-win32: Fix _aligned_malloc() arguments order Thomas Huth
2021-01-11 13:43 ` [PULL 04/15] fuzz: accelerate non-crash detection Thomas Huth
2021-01-11 13:43 ` [PULL 05/15] fuzz: double the IOs to remove for every loop Thomas Huth
2021-01-11 13:43 ` [PULL 06/15] fuzz: split write operand using binary approach Thomas Huth
2021-01-11 13:43 ` [PULL 07/15] fuzz: remove IO commands iteratively Thomas Huth
2021-01-11 13:43 ` [PULL 08/15] fuzz: set bits in operand of write/out to zero Thomas Huth
2021-01-11 13:43 ` [PULL 09/15] fuzz: add minimization options Thomas Huth
2021-01-11 13:43 ` [PULL 10/15] fuzz: heuristic split write based on past IOs Thomas Huth
2021-01-11 13:43 ` [PULL 11/15] bsd-user: regenerate FreeBSD's system call numbers Thomas Huth
2021-01-11 13:43 ` [PULL 12/15] bsd-user: move strace OS/arch dependent code to host/arch dirs Thomas Huth
2021-01-11 13:43 ` [PULL 13/15] bsd-user: Update strace.list for FreeBSD's latest syscalls Thomas Huth
2021-01-11 13:43 ` Thomas Huth [this message]
2021-01-11 13:43 ` [PULL 15/15] fuzz: map all BARs and enable PCI devices Thomas Huth
2021-01-11 13:46 ` [PULL 00/15] Testing, CI and bsd-user patches Peter Maydell
2021-01-11 13:56 ` Thomas Huth
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=20210111134328.157775-15-thuth@redhat.com \
--to=thuth@redhat.com \
--cc=Qiuhao.Li@outlook.com \
--cc=alxndr@bu.edu \
--cc=imp@freebsd.org \
--cc=peter.maydell@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).