From: John Snow <jsnow@redhat.com>
To: qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>,
John Snow <jsnow@redhat.com>,
qemu-block@nongnu.org
Subject: [PATCH v2 00/17] iotests: add enhanced debugging info to qemu-io failures
Date: Thu, 24 Mar 2022 14:30:01 -0400 [thread overview]
Message-ID: <20220324183018.2476551-1-jsnow@redhat.com> (raw)
GitLab: https://gitlab.com/jsnow/qemu/-/commits/iotests_qemu_io_diagnostics
CI: https://gitlab.com/jsnow/qemu/-/pipelines/499624472
Howdy,
This series does for qemu_io() what we've done for qemu_img() and makes
it a function that checks the return code by default and raises an
Exception when things do not go according to plan.
This series removes qemu_io_pipe_and_status(), qemu_io_silent(), and
qemu_io_silent_check() in favor of just qemu_io().
V2:
- Fixed 040
- Fixed 245 on tmpfs
- Fixed tests/image-fleecing
- I expect to respin a v3 to:
(A) Fix the commit message on the 040 fix
(B) Squash patches 7-12.
001/17:[0004] [FC] 'iotests: replace calls to log(qemu_io(...)) with qemu_io_log()'
rebased on master, changed imports.
Kept RB from Eric.
005/17:[down] 'iotests/040: Fix TestCommitWithFilters test'
New patch, based on feedback from hreitz. Thank you ;_;
006/17:[0013] [FC] 'iotests: create generic qemu_tool() function'
Quoted return types (Needed for older Python versions)
Changed phrasing of "args" param docstring (Hanna)
Removed docstring reflow (It's upstream already)
Kept RBs.
007/17:[0004] [FC] 'iotests: rebase qemu_io() on top of qemu_tool()'
Quoted return types (Needed for older Python versions)
011/17:[0019] [FC] 'iotests/245: fixup'
Rewrite to fix this test on tmpfs (Hanna)
014/17:[down] 'iotests/image-fleecing: switch to qemu_io()'
New, this test needed to be explicitly migrated away from pipe_and_status.
015/17:[0012] [FC] 'iotests: remove qemu_io_pipe_and_status()'
This patch is basically empty after the new 014.
016/17:[0006] [FC] 'iotests: remove qemu_io_silent() and qemu_io_silent_check().'
Reflow some lines (Eric)
Added RBs.
017/17:[0004] [FC] 'iotests: make qemu_io_log() check return codes by default'
Changed commit message phrasing (Hanna, IIRC)
Added RBs.
Notes:
- There are a few remaining uses of qemu-io that don't go through qemu_io;
QemuIoInteractive is a user that is used in 205, 298, 299, and 307. It
... did not appear worth it to morph qemu_tool_popen into something that
could be used by both QemuIoInteractive *and* qemu_io(), so I left it
alone. It's probably fine for now. (But it does bother me, a little.)
- qemu_io_popen itself is used by the nbd-reconnect-on-open test, and it
seems like a legitimate use -- it wants concurrency. Like the above
problem, I couldn't find a way to bring it into the fold, so I
didn't. (Meh.) I eventually plan to add asyncio subprocess management to
machine.py, and I could tackle stuff like this then. It's not worth it
now.
(Maybe I'll bring these in under the fold the next time I get bored, but
I think it's not worth the trouble right now, there are very few
users. I did try, but the benefit to VerboseProcessError is that it
includes stdout/stderr. When using Popen with pipes you lose access to
that information in the management context. Popen does not natively
buffer stdout/stderr, so we'd have to fall back to just using a regular
CalledProcessError. I think I'd have to extend Popen and add
buffering. I think that's something for later. Anyway, that's my
story. How are you today? I hope you are well.)
John Snow (17):
iotests: replace calls to log(qemu_io(...)) with qemu_io_log()
iotests/163: Fix broken qemu-io invocation
iotests: Don't check qemu_io() output for specific error strings
iotests/040: Don't check image pattern on zero-length image
iotests/040: Fix TestCommitWithFilters test
iotests: create generic qemu_tool() function
iotests: rebase qemu_io() on top of qemu_tool()
iotests/030: fixup
iotests/149: fixup
iotests/205: fixup
iotests/245: fixup
iotests/migration-permissions: fixup
iotests/migration-permissions: use assertRaises() for qemu_io()
negative test
iotests/image-fleecing: switch to qemu_io()
iotests: remove qemu_io_pipe_and_status()
iotests: remove qemu_io_silent() and qemu_io_silent_check().
iotests: make qemu_io_log() check return codes by default
tests/qemu-iotests/030 | 85 +++++++++++--------
tests/qemu-iotests/040 | 53 +++++++-----
tests/qemu-iotests/056 | 2 +-
tests/qemu-iotests/149 | 6 +-
tests/qemu-iotests/163 | 5 +-
tests/qemu-iotests/205 | 4 +-
tests/qemu-iotests/216 | 12 +--
tests/qemu-iotests/218 | 5 +-
tests/qemu-iotests/224 | 4 +-
tests/qemu-iotests/242 | 6 +-
tests/qemu-iotests/245 | 17 ++--
tests/qemu-iotests/255 | 4 +-
tests/qemu-iotests/258 | 11 ++-
tests/qemu-iotests/298 | 15 ++--
tests/qemu-iotests/303 | 4 +-
tests/qemu-iotests/310 | 22 ++---
tests/qemu-iotests/iotests.py | 69 ++++++++-------
tests/qemu-iotests/tests/image-fleecing | 30 ++++---
.../qemu-iotests/tests/migration-permissions | 28 +++---
.../tests/mirror-ready-cancel-error | 2 +-
.../qemu-iotests/tests/nbd-reconnect-on-open | 2 +-
.../qemu-iotests/tests/stream-error-on-reset | 4 +-
22 files changed, 210 insertions(+), 180 deletions(-)
--
2.34.1
next reply other threads:[~2022-03-24 18:46 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-24 18:30 John Snow [this message]
2022-03-24 18:30 ` [PATCH v2 01/17] iotests: replace calls to log(qemu_io(...)) with qemu_io_log() John Snow
2022-03-25 13:25 ` Hanna Reitz
2022-03-24 18:30 ` [PATCH v2 02/17] iotests/163: Fix broken qemu-io invocation John Snow
2022-03-24 18:30 ` [PATCH v2 03/17] iotests: Don't check qemu_io() output for specific error strings John Snow
2022-03-24 18:30 ` [PATCH v2 04/17] iotests/040: Don't check image pattern on zero-length image John Snow
2022-03-24 18:30 ` [PATCH v2 05/17] iotests/040: Fix TestCommitWithFilters test John Snow
2022-03-25 1:33 ` Eric Blake
2022-03-31 16:36 ` John Snow
2022-03-25 13:40 ` Hanna Reitz
2022-03-25 15:06 ` John Snow
2022-03-24 18:30 ` [PATCH v2 06/17] iotests: create generic qemu_tool() function John Snow
2022-03-24 18:30 ` [PATCH v2 07/17] iotests: rebase qemu_io() on top of qemu_tool() John Snow
2022-03-24 18:30 ` [PATCH v2 08/17] iotests/030: fixup John Snow
2022-03-24 18:30 ` [PATCH v2 09/17] iotests/149: fixup John Snow
2022-03-24 18:30 ` [PATCH v2 10/17] iotests/205: fixup John Snow
2022-03-24 18:30 ` [PATCH v2 11/17] iotests/245: fixup John Snow
2022-03-24 18:30 ` [PATCH v2 12/17] iotests/migration-permissions: fixup John Snow
2022-03-24 18:30 ` [PATCH v2 13/17] iotests/migration-permissions: use assertRaises() for qemu_io() negative test John Snow
2022-03-25 1:36 ` Eric Blake
2022-03-24 18:30 ` [PATCH v2 14/17] iotests/image-fleecing: switch to qemu_io() John Snow
2022-03-25 1:38 ` Eric Blake
2022-03-25 14:24 ` Hanna Reitz
2022-03-24 18:30 ` [PATCH v2 15/17] iotests: remove qemu_io_pipe_and_status() John Snow
2022-03-25 1:39 ` Eric Blake
2022-03-25 14:25 ` Hanna Reitz
2022-03-24 18:30 ` [PATCH v2 16/17] iotests: remove qemu_io_silent() and qemu_io_silent_check() John Snow
2022-03-24 18:30 ` [PATCH v2 17/17] iotests: make qemu_io_log() check return codes by default John Snow
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=20220324183018.2476551-1-jsnow@redhat.com \
--to=jsnow@redhat.com \
--cc=hreitz@redhat.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).