All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/15] iotests: add enhanced debugging info to qemu-io failures
@ 2022-03-18 20:36 John Snow
  2022-03-18 20:36 ` [PATCH 01/15] iotests: replace calls to log(qemu_io(...)) with qemu_io_log() John Snow
                   ` (15 more replies)
  0 siblings, 16 replies; 54+ messages in thread
From: John Snow @ 2022-03-18 20:36 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kevin Wolf, Hanna Reitz, John Snow, qemu-block

Howdy,

This series does for qemu_io() what we've done for qemu_img() and makes
this 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().

RFC:

- 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.

- Several patches in this patchset ("fixup" in the title) are designed to
be merged-on-commit. I know that's not usually how we do things, but I
thought it was actually nicer than pre-squashing it because it gives me
more flexibility on re-spin.

- Uh, actually, test 040 fails with this patchset and I don't understand
  if it's intentional, harmless, a test design problem, or worse:

======================================================================
ERROR: test_filterless_commit (__main__.TestCommitWithFilters)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/jsnow/src/qemu/tests/qemu-iotests/040", line 822, in tearDown
    self.do_test_io('read')
  File "/home/jsnow/src/qemu/tests/qemu-iotests/040", line 751, in do_test_io
    qemu_io('-f', iotests.imgfmt,
  File "/home/jsnow/src/qemu/tests/qemu-iotests/iotests.py", line 365, in qemu_io
    return qemu_tool(*qemu_io_wrap_args(args),
  File "/home/jsnow/src/qemu/tests/qemu-iotests/iotests.py", line 242, in qemu_tool
    raise VerboseProcessError(

qemu.utils.VerboseProcessError: Command
  '('/home/jsnow/src/qemu/bin/git/tests/qemu-iotests/../../qemu-io',
  '--cache', 'writeback', '--aio', 'threads', '-f', 'qcow2', '-c',
  'read -P 4 3M 1M',
  '/home/jsnow/src/qemu/bin/git/tests/qemu-iotests/scratch/3.img')'
  returned non-zero exit status 1.
  ┏━ output ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  ┃ qemu-io: can't open device
  ┃ /home/jsnow/src/qemu/bin/git/tests/qemu-iotests/scratch/3.img:
  ┃ Could not open backing file: Could not open backing file: Throttle
  ┃ group 'tg' does not exist
  ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

It looks like we start with the img chain 3->2->1->0, then we commit 2
down into 1, but checking '3' fails somewhere in the backing
chain. Maybe a real bug?

John Snow (15):
  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: 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: 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                        | 47 +++++-----
 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                        |  4 +-
 tests/qemu-iotests/245                        |  2 +-
 tests/qemu-iotests/255                        |  4 +-
 tests/qemu-iotests/258                        | 12 +--
 tests/qemu-iotests/298                        | 16 ++--
 tests/qemu-iotests/303                        |  4 +-
 tests/qemu-iotests/310                        | 22 ++---
 tests/qemu-iotests/iotests.py                 | 74 ++++++++--------
 tests/qemu-iotests/tests/image-fleecing       | 14 +--
 .../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, 184 insertions(+), 174 deletions(-)

-- 
2.34.1




^ permalink raw reply	[flat|nested] 54+ messages in thread

end of thread, other threads:[~2022-03-22 19:30 UTC | newest]

Thread overview: 54+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-18 20:36 [PATCH 00/15] iotests: add enhanced debugging info to qemu-io failures John Snow
2022-03-18 20:36 ` [PATCH 01/15] iotests: replace calls to log(qemu_io(...)) with qemu_io_log() John Snow
2022-03-21 13:35   ` Eric Blake
2022-03-22 13:51   ` Hanna Reitz
2022-03-18 20:36 ` [PATCH 02/15] iotests/163: Fix broken qemu-io invocation John Snow
2022-03-21 13:44   ` Eric Blake
2022-03-22 14:07   ` Hanna Reitz
2022-03-18 20:36 ` [PATCH 03/15] iotests: Don't check qemu_io() output for specific error strings John Snow
2022-03-21 13:48   ` Eric Blake
2022-03-22 14:16   ` Hanna Reitz
2022-03-18 20:36 ` [PATCH 04/15] iotests/040: Don't check image pattern on zero-length image John Snow
2022-03-21 14:58   ` Eric Blake
2022-03-22 14:22   ` Hanna Reitz
2022-03-22 16:19     ` John Snow
2022-03-22 17:12       ` Hanna Reitz
2022-03-18 20:36 ` [PATCH 05/15] iotests: create generic qemu_tool() function John Snow
2022-03-21 15:13   ` Eric Blake
2022-03-21 16:20     ` John Snow
2022-03-22 14:49   ` Hanna Reitz
2022-03-22 16:25     ` John Snow
2022-03-18 20:36 ` [PATCH 06/15] iotests: rebase qemu_io() on top of qemu_tool() John Snow
2022-03-21 15:29   ` Eric Blake
2022-03-21 16:57     ` John Snow
2022-03-22 15:04   ` Hanna Reitz
2022-03-22 16:30     ` John Snow
2022-03-18 20:36 ` [PATCH 07/15] iotests/030: fixup John Snow
2022-03-18 20:36 ` [PATCH 08/15] iotests/149: fixup John Snow
2022-03-22 16:29   ` Hanna Reitz
2022-03-18 20:36 ` [PATCH 09/15] iotests/205: fixup John Snow
2022-03-18 20:36 ` [PATCH 10/15] iotests/245: fixup John Snow
2022-03-21 17:42   ` Eric Blake
2022-03-22 16:30   ` Hanna Reitz
2022-03-22 16:36     ` John Snow
2022-03-22 16:38       ` Hanna Reitz
2022-03-22 17:00   ` John Snow
2022-03-18 20:36 ` [PATCH 11/15] iotests/migration-permissions: fixup John Snow
2022-03-18 20:36 ` [PATCH 12/15] iotests/migration-permissions: use assertRaises() for qemu_io() negative test John Snow
2022-03-21 18:07   ` Eric Blake
2022-03-22 16:37   ` Hanna Reitz
2022-03-22 17:12     ` John Snow
2022-03-18 20:36 ` [PATCH 13/15] iotests: remove qemu_io_pipe_and_status() John Snow
2022-03-21 18:09   ` Eric Blake
2022-03-22 16:39   ` Hanna Reitz
2022-03-22 19:28     ` John Snow
2022-03-18 20:36 ` [PATCH 14/15] iotests: remove qemu_io_silent() and qemu_io_silent_check() John Snow
2022-03-21 18:16   ` Eric Blake
2022-03-21 20:07     ` John Snow
2022-03-22 16:59   ` Hanna Reitz
2022-03-22 17:16     ` John Snow
2022-03-18 20:36 ` [PATCH 15/15] iotests: make qemu_io_log() check return codes by default John Snow
2022-03-21 18:22   ` Eric Blake
2022-03-21 20:09     ` John Snow
2022-03-22 17:03   ` Hanna Reitz
2022-03-22 17:18 ` [PATCH 00/15] iotests: add enhanced debugging info to qemu-io failures Hanna Reitz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.