From: Max Reitz <mreitz@redhat.com>
To: qemu-block@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>, Alberto Garcia <berto@igalia.com>,
qemu-devel@nongnu.org, Max Reitz <mreitz@redhat.com>
Subject: [Qemu-devel] [PATCH 0/4] iotests: Make 245 faster and more reliable
Date: Wed, 15 May 2019 22:14:59 +0200 [thread overview]
Message-ID: <20190515201503.19069-1-mreitz@redhat.com> (raw)
245 is a bit flakey for me, because it uses block jobs that copy 1 MB of
data but have a buffer size of 512 kB, so they may be done before the
test gets to do the things it wants to do while the check is running.
(Rate limiting doesn’t change this.)
The boring way to fix this would be to increase the amount of data.
The interesting way to fix this is to make use of auto_finalize=false
and thus keep the jobs around until the test is done with them.
However, this has one problem: In one case, 245 tries to make the target
node of a stream job read-only. If the job is still copying data, doing
so will fail because the target node is in COR mode. Otherwise, we get
a cryptic “Block node is read-only” message.
What the message means is “After reopening, the node will be read-only,
and that won’t work, because there is a writer on it.” It doesn’t say
that, though, but it should. So patch 1 makes it say something to that
effect (“Cannot make block node read-only, there is a writer on it”).
245 doesn’t care about the actual error message, both reflect that qemu
correctly detects that this node cannot be made read-only at this time.
So the other thing we have to do is let assert_qmp() accept an array of
valid error messages and choose the one that matches (if any). Then we
can just pass both error messages to it and everything works.
Nice side effect: For me, the test duration goes down from about 12 s to
about 6 s.
(That’s because the test forgot to disable rate limiting on the jobs
before waiting for their completion.)
Max Reitz (4):
block: Improve "Block node is read-only" message
iotests.py: Let assert_qmp() accept an array
iotests.py: Fix VM.run_job
iotests: Make 245 faster and more reliable
block.c | 17 ++++++++++++++++-
tests/qemu-iotests/245 | 22 ++++++++++++++--------
tests/qemu-iotests/245.out | 12 ++++++++++++
tests/qemu-iotests/iotests.py | 20 +++++++++++++++++---
4 files changed, 59 insertions(+), 12 deletions(-)
--
2.21.0
next reply other threads:[~2019-05-15 20:17 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-15 20:14 Max Reitz [this message]
2019-05-15 20:15 ` [Qemu-devel] [PATCH 1/4] block: Improve "Block node is read-only" message Max Reitz
2019-05-16 12:49 ` Alberto Garcia
2019-05-15 20:15 ` [Qemu-devel] [PATCH 2/4] iotests.py: Let assert_qmp() accept an array Max Reitz
2019-05-16 12:50 ` Alberto Garcia
2019-05-15 20:15 ` [Qemu-devel] [PATCH 3/4] iotests.py: Fix VM.run_job Max Reitz
2019-05-16 12:51 ` Alberto Garcia
2019-05-15 20:15 ` [Qemu-devel] [PATCH 4/4] iotests: Make 245 faster and more reliable Max Reitz
2019-05-16 14:27 ` Alberto Garcia
2019-05-20 14:18 ` [Qemu-devel] [PATCH 0/4] " Kevin Wolf
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=20190515201503.19069-1-mreitz@redhat.com \
--to=mreitz@redhat.com \
--cc=berto@igalia.com \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.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).