qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 3213bb: tests: add (riscv virt) machine mappi


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 3213bb: tests: add (riscv virt) machine mapping to testenv
Date: Tue, 22 Mar 2022 05:49:39 -0700

  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: 3213bbaf5797cc405e57f122e72c1fb55d0b08ab
      
https://github.com/qemu/qemu/commit/3213bbaf5797cc405e57f122e72c1fb55d0b08ab
  Author: laokz <laokz@foxmail.com>
  Date:   2022-03-22 (Tue, 22 Mar 2022)

  Changed paths:
    M tests/qemu-iotests/testenv.py

  Log Message:
  -----------
  tests: add (riscv virt) machine mapping to testenv

Some qemu-iotests(040 etc) use PCI disk to do test. Without the
mapping, RISC-V flavor use spike as default machine which has no
PCI bus, causing test failure.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/894

Signed-off-by: Kai Zhang <laokz@foxmail.com>
Message-Id: <tencent_E4219E870165A978DB5BBE50BD53D33D2E06@qq.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>


  Commit: cc5387a544325c26dcf124ac7d3999389c24e5c6
      
https://github.com/qemu/qemu/commit/cc5387a544325c26dcf124ac7d3999389c24e5c6
  Author: Stefano Garzarella <sgarzare@redhat.com>
  Date:   2022-03-22 (Tue, 22 Mar 2022)

  Changed paths:
    M block/rbd.c

  Log Message:
  -----------
  block/rbd: fix write zeroes with growing images

Commit d24f80234b ("block/rbd: increase dynamically the image size")
added a workaround to support growing images (eg. qcow2), resizing
the image before write operations that exceed the current size.

We recently added support for write zeroes and without the
workaround we can have problems with qcow2.

So let's move the resize into qemu_rbd_start_co() and do it when
the command is RBD_AIO_WRITE or RBD_AIO_WRITE_ZEROES.

Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=2020993
Fixes: c56ac27d2a ("block/rbd: add write zeroes support")
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Message-Id: <20220317162638.41192-1-sgarzare@redhat.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>


  Commit: ab101297cb120a73c4ef1646fb09438f7f590f34
      
https://github.com/qemu/qemu/commit/ab101297cb120a73c4ef1646fb09438f7f590f34
  Author: Thomas Huth <thuth@redhat.com>
  Date:   2022-03-22 (Tue, 22 Mar 2022)

  Changed paths:
    M tests/qemu-iotests/common.filter

  Log Message:
  -----------
  tests/qemu-iotests: Use GNU sed in two more spots where it is necessary

These two spots have been missed in commit 9086c7639822 ("Rework the
checks and spots using GNU sed") - they need GNU sed, too, since they
are using the "+" address form.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20220309101626.637836-1-thuth@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>


  Commit: e287072b40c8928ed54c275f1e548a9009394ecf
      
https://github.com/qemu/qemu/commit/e287072b40c8928ed54c275f1e548a9009394ecf
  Author: Thomas Huth <thuth@redhat.com>
  Date:   2022-03-22 (Tue, 22 Mar 2022)

  Changed paths:
    M meson.build
    M scripts/mtest2make.py
    M tests/Makefile.include

  Log Message:
  -----------
  tests: Do not treat the iotests as separate meson test target anymore

If there is a failing iotest, the output is currently not logged to
the console anymore. To get this working again, we need to run the
meson test runner with "--print-errorlogs" (and without "--verbose"
due to a current meson bug that will be fixed here:
https://github.com/mesonbuild/meson/commit/c3f145ca2b9f5.patch ).
We could update the "meson test" call in tests/Makefile.include,
but actually it's nicer and easier if we simply do not treat the
iotests as separate test target anymore and integrate them along
with the other test suites. This has the disadvantage of not getting
the detailed progress indication there anymore, but since that was
only working right in single-threaded "make -j1" mode anyway, it's
not a huge loss right now.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20220310075048.2303495-1-thuth@redhat.com>
Tested-by: Hanna Reitz <hreitz@redhat.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>


  Commit: e48093a6c09e429f2bbe69c1e88b5b78f8b531f5
      
https://github.com/qemu/qemu/commit/e48093a6c09e429f2bbe69c1e88b5b78f8b531f5
  Author: Thomas Huth <thuth@redhat.com>
  Date:   2022-03-22 (Tue, 22 Mar 2022)

  Changed paths:
    M tests/qemu-iotests/testrunner.py

  Log Message:
  -----------
  tests/qemu-iotests/testrunner: Supply a test plan in TAP mode

Quoting the TAP specification: "The plan tells how many tests will be
run [...]. It’s a check that the test file hasn’t stopped prematurely."
That's a good idea of course, so let's support that in the iotest
testrunner, too.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20220223095816.2663005-1-thuth@redhat.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>


  Commit: be73231ba836c34502af5ff419ab3ca23c60a6db
      
https://github.com/qemu/qemu/commit/be73231ba836c34502af5ff419ab3ca23c60a6db
  Author: John Snow <jsnow@redhat.com>
  Date:   2022-03-22 (Tue, 22 Mar 2022)

  Changed paths:
    M python/qemu/utils/__init__.py

  Log Message:
  -----------
  python/utils: add add_visual_margin() text decoration utility

>>> print(add_visual_margin(msg, width=72, name="Commit Message"))
┏━ Commit Message ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
┃ add_visual_margin() takes a chunk of text and wraps it in a visual
┃ container that force-wraps to a specified width. An optional title
┃ label may be given, and any of the individual glyphs used to draw the
┃ box may be replaced or specified as well.
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Acked-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20220321201618.903471-2-jsnow@redhat.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>


  Commit: 062fd1dad2640d1c2522b71ddde4ba0bbdc8c6d9
      
https://github.com/qemu/qemu/commit/062fd1dad2640d1c2522b71ddde4ba0bbdc8c6d9
  Author: John Snow <jsnow@redhat.com>
  Date:   2022-03-22 (Tue, 22 Mar 2022)

  Changed paths:
    M python/qemu/utils/__init__.py

  Log Message:
  -----------
  python/utils: add VerboseProcessError

This adds an Exception that extends the Python stdlib
subprocess.CalledProcessError.

The difference is that the str() method of this exception also adds the
stdout/stderr logs. In effect, if this exception goes unhandled, Python
will print the output in a visually distinct wrapper to the terminal so
that it's easy to spot in a sea of traceback information.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20220321201618.903471-3-jsnow@redhat.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>


  Commit: fc272d3ce0094d2c2aff973662536d8d1a6943e5
      
https://github.com/qemu/qemu/commit/fc272d3ce0094d2c2aff973662536d8d1a6943e5
  Author: John Snow <jsnow@redhat.com>
  Date:   2022-03-22 (Tue, 22 Mar 2022)

  Changed paths:
    M tests/qemu-iotests/163
    M tests/qemu-iotests/216
    M tests/qemu-iotests/218
    M tests/qemu-iotests/224
    M tests/qemu-iotests/228
    M tests/qemu-iotests/257
    M tests/qemu-iotests/258
    M tests/qemu-iotests/310
    M tests/qemu-iotests/tests/block-status-cache
    M tests/qemu-iotests/tests/graph-changes-while-io
    M tests/qemu-iotests/tests/image-fleecing
    M tests/qemu-iotests/tests/mirror-ready-cancel-error
    M tests/qemu-iotests/tests/mirror-top-perms
    M tests/qemu-iotests/tests/remove-bitmap-from-backing
    M tests/qemu-iotests/tests/stream-error-on-reset

  Log Message:
  -----------
  iotests: Remove explicit checks for qemu_img() == 0

qemu_img() returning zero ought to be the rule, not the
exception. Remove all explicit checks against the condition in
preparation for making non-zero returns an Exception.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20220321201618.903471-4-jsnow@redhat.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>


  Commit: 2882ccf86a9bc7ea9ae23dce2bad91c8d3e7e135
      
https://github.com/qemu/qemu/commit/2882ccf86a9bc7ea9ae23dce2bad91c8d3e7e135
  Author: John Snow <jsnow@redhat.com>
  Date:   2022-03-22 (Tue, 22 Mar 2022)

  Changed paths:
    M tests/qemu-iotests/257
    M tests/qemu-iotests/iotests.py

  Log Message:
  -----------
  iotests: make qemu_img raise on non-zero rc by default

re-write qemu_img() as a function that will by default raise a
VerboseProcessException (extended from CalledProcessException) on
non-zero return codes. This will produce a stack trace that will show
the command line arguments and return code from the failed process run.

Users that want something more flexible (there appears to be only one)
can use check=False and manage the return themselves. However, when the
return code is negative, the Exception will be raised no matter what.
This is done under the belief that there's no legitimate reason, even in
negative tests, to see a crash from qemu-img.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20220321201618.903471-5-jsnow@redhat.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>


  Commit: 569131d585efb9a2fe9188c0edd12d22619afaca
      
https://github.com/qemu/qemu/commit/569131d585efb9a2fe9188c0edd12d22619afaca
  Author: John Snow <jsnow@redhat.com>
  Date:   2022-03-22 (Tue, 22 Mar 2022)

  Changed paths:
    M tests/qemu-iotests/iotests.py

  Log Message:
  -----------
  iotests: fortify compare_images() against crashes

Fortify compare_images() to be more discerning about the status codes it
receives. If qemu_img() returns an exit code that implies it didn't
actually perform the comparison, treat that as an exceptional
circumstance and force the caller to be aware of the peril.

If a negative test is desired (perhaps to test how qemu_img compare
behaves on malformed images, for instance), it is still possible to
catch the exception in the test and deal with that circumstance
manually.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20220321201618.903471-6-jsnow@redhat.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>


  Commit: 29768d04afe5c87272e8fb7de1290f7a4f530785
      
https://github.com/qemu/qemu/commit/29768d04afe5c87272e8fb7de1290f7a4f530785
  Author: John Snow <jsnow@redhat.com>
  Date:   2022-03-22 (Tue, 22 Mar 2022)

  Changed paths:
    M tests/qemu-iotests/iotests.py

  Log Message:
  -----------
  iotests: add qemu_img_json()

qemu_img_json() is a new helper built on top of qemu_img() that tries to
pull a valid JSON document out of the stdout stream.

In the event that the return code is negative (the program crashed), or
the code is greater than zero and did not produce valid JSON output, the
VerboseProcessError raised by qemu_img() is re-raised.

In the event that the return code is zero but we can't parse valid JSON,
allow the JSON deserialization error to be raised.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20220321201618.903471-7-jsnow@redhat.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>


  Commit: 0f7d7d72aa99c8e48bbbf37262a9c66c83113f76
      
https://github.com/qemu/qemu/commit/0f7d7d72aa99c8e48bbbf37262a9c66c83113f76
  Author: John Snow <jsnow@redhat.com>
  Date:   2022-03-22 (Tue, 22 Mar 2022)

  Changed paths:
    M tests/qemu-iotests/iotests.py

  Log Message:
  -----------
  iotests: use qemu_img_json() when applicable

qemu_img_json() gives better diagnostic information on failure.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20220321201618.903471-8-jsnow@redhat.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>


  Commit: 9ebb2b765b0d6c6fd5228a736e31acfc10a56315
      
https://github.com/qemu/qemu/commit/9ebb2b765b0d6c6fd5228a736e31acfc10a56315
  Author: John Snow <jsnow@redhat.com>
  Date:   2022-03-22 (Tue, 22 Mar 2022)

  Changed paths:
    M tests/qemu-iotests/065
    M tests/qemu-iotests/242
    M tests/qemu-iotests/iotests.py

  Log Message:
  -----------
  iotests: add qemu_img_info()

Add qemu_img_info() by analogy with qemu_img_measure() and
qemu_img_check(). Modify image_size() to use this function instead to
take advantage of the better diagnostic information on failure provided
(ultimately) by qemu_img().

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20220321201618.903471-9-jsnow@redhat.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>


  Commit: ac5bb4861c233c9483d89dff7ef0fa6f799ca1e7
      
https://github.com/qemu/qemu/commit/ac5bb4861c233c9483d89dff7ef0fa6f799ca1e7
  Author: John Snow <jsnow@redhat.com>
  Date:   2022-03-22 (Tue, 22 Mar 2022)

  Changed paths:
    M tests/qemu-iotests/tests/remove-bitmap-from-backing

  Log Message:
  -----------
  iotests/remove-bitmap-from-backing: use qemu_img_info()

This removes two more usages of qemu_img_pipe() and replaces them with
calls to qemu_img(), which provides better diagnostic information on
failure.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20220321201618.903471-10-jsnow@redhat.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>


  Commit: 1670ae7af668958e76be6749f1f729d6dc9861e9
      
https://github.com/qemu/qemu/commit/1670ae7af668958e76be6749f1f729d6dc9861e9
  Author: John Snow <jsnow@redhat.com>
  Date:   2022-03-22 (Tue, 22 Mar 2022)

  Changed paths:
    M tests/qemu-iotests/041
    M tests/qemu-iotests/211
    M tests/qemu-iotests/211.out
    M tests/qemu-iotests/iotests.py
    M tests/qemu-iotests/tests/block-status-cache
    M tests/qemu-iotests/tests/parallels-read-bitmap

  Log Message:
  -----------
  iotests: add qemu_img_map() function

Add a qemu_img_map() function by analogy with qemu_img_measure(),
qemu_img_check(), and qemu_img_info() that all return JSON information.

Replace calls to qemu_img_pipe('map', '--output=json', ...) with this
new function, which provides better diagnostic information on failure.

Note: The output for iotest 211 changes, because logging JSON after it
was deserialized by Python behaves a little differently than logging the
raw JSON document string itself.
(iotests.log() sorts the keys for Python 3.6 support.)

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20220321201618.903471-11-jsnow@redhat.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>


  Commit: 78d04761294c29f115bf8e3a53f4e04521069394
      
https://github.com/qemu/qemu/commit/78d04761294c29f115bf8e3a53f4e04521069394
  Author: John Snow <jsnow@redhat.com>
  Date:   2022-03-22 (Tue, 22 Mar 2022)

  Changed paths:
    M tests/qemu-iotests/iotests.py

  Log Message:
  -----------
  iotests: change supports_quorum to use qemu_img

Similar to other recent changes: use the qemu_img() invocation that
supports throwing loud, nasty exceptions when it fails for surprising
reasons.

(Why would "--help" ever fail? I don't know, but eliminating *all* calls
to qemu-img that do not go through qemu_img() is my goal, so
qemu_img_pipe() has to be removed.)

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20220321201618.903471-12-jsnow@redhat.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>


  Commit: 3d53818ff70ebbb09288c494080cf6717e1713ce
      
https://github.com/qemu/qemu/commit/3d53818ff70ebbb09288c494080cf6717e1713ce
  Author: John Snow <jsnow@redhat.com>
  Date:   2022-03-22 (Tue, 22 Mar 2022)

  Changed paths:
    M tests/qemu-iotests/194
    M tests/qemu-iotests/202
    M tests/qemu-iotests/203
    M tests/qemu-iotests/234
    M tests/qemu-iotests/262
    M tests/qemu-iotests/303

  Log Message:
  -----------
  iotests: replace unchecked calls to qemu_img_pipe()

qemu_img_pipe() discards the return code from qemu-img in favor of
returning just its output. Some tests using this function don't save,
log, or check the output either, though, which is unsafe.

Replace all of these calls with a checked version.

Tests affected are 194, 202, 203, 234, 262, and 303.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20220321201618.903471-13-jsnow@redhat.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>


  Commit: 88baae552dad5c0b91973cae16b0f4a927129f51
      
https://github.com/qemu/qemu/commit/88baae552dad5c0b91973cae16b0f4a927129f51
  Author: John Snow <jsnow@redhat.com>
  Date:   2022-03-22 (Tue, 22 Mar 2022)

  Changed paths:
    M tests/qemu-iotests/149
    M tests/qemu-iotests/149.out

  Log Message:
  -----------
  iotests/149: Remove qemu_img_pipe() call

qemu_img_pipe calls blank their output when the command being run is a
'create' call and the command succeeds. Thus, the normative output for
this command in iotest 149 is to print a blank line. We can remove the
logging from this invocation and use a checked invocation, but we still
need to inspect the actual output to see if we want to retroactively
skip the test due to missing cipher support.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20220321201618.903471-14-jsnow@redhat.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>


  Commit: 4cf661f2c0540d3644b62c0ed64dff14fdd3bd68
      
https://github.com/qemu/qemu/commit/4cf661f2c0540d3644b62c0ed64dff14fdd3bd68
  Author: John Snow <jsnow@redhat.com>
  Date:   2022-03-22 (Tue, 22 Mar 2022)

  Changed paths:
    M tests/qemu-iotests/065
    M tests/qemu-iotests/237
    M tests/qemu-iotests/237.out
    M tests/qemu-iotests/296

  Log Message:
  -----------
  iotests: remove remaining calls to qemu_img_pipe()

As part of moving all python iotest invocations of qemu-img onto a
single qemu_img() implementation, remove a few lingering uses of
qemu_img_pipe() from outside of iotests.py itself.

Several cases here rely on the knowledge that qemu_img_pipe() suppresses
*all* output on a successful case when the command being issued is
'create'.

065: This call's output is inspected, but it appears as if it's expected
     to succeed. Replace this call with the checked qemu_img() variant
     instead to get better diagnostics if/when qemu-img itself fails.

237: "create" call output isn't actually logged. Use qemu_img_create()
     instead, which checks the return code. Remove the empty lines from
     the test output.

296: Two calls;
     -create: Expected to succeed. Like other create calls, the output
              isn't actually logged.  Switch to a checked variant
              (qemu_img_create) instead. The output for this test is
              a mixture of both test styles, so actually replace the
              blank line for readability.
     -amend:  This is expected to fail. Log the output.

After this patch, the only uses of qemu_img_pipe are internal to
iotests.py and will be removed in subsequent patches.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20220321201618.903471-15-jsnow@redhat.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>


  Commit: 97576f8c0a0870578a214caa7a138f929f74166e
      
https://github.com/qemu/qemu/commit/97576f8c0a0870578a214caa7a138f929f74166e
  Author: John Snow <jsnow@redhat.com>
  Date:   2022-03-22 (Tue, 22 Mar 2022)

  Changed paths:
    M tests/qemu-iotests/iotests.py

  Log Message:
  -----------
  iotests: use qemu_img() in has_working_luks()

Admittedly a mostly lateral move, but qemu_img() is essentially the
replacement for qemu_img_pipe_and_status(). It will give slightly better
diagnostics on crash.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20220321201618.903471-16-jsnow@redhat.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>


  Commit: 3c8b7358d6b5b887473b17b8528e042f9581e7b4
      
https://github.com/qemu/qemu/commit/3c8b7358d6b5b887473b17b8528e042f9581e7b4
  Author: John Snow <jsnow@redhat.com>
  Date:   2022-03-22 (Tue, 22 Mar 2022)

  Changed paths:
    M tests/qemu-iotests/255
    M tests/qemu-iotests/255.out
    M tests/qemu-iotests/274
    M tests/qemu-iotests/274.out
    M tests/qemu-iotests/280
    M tests/qemu-iotests/280.out

  Log Message:
  -----------
  iotests: replace qemu_img_log('create', ...) calls

qemu_img_log() calls into qemu_img_pipe(), which always removes output
for 'create' commands on success anyway. Replace all of these calls to
the simpler qemu_img_create(...) which doesn't log, but raises a
detailed exception object on failure instead.

Blank lines are removed from output files where appropriate.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20220321201618.903471-17-jsnow@redhat.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>


  Commit: f400e14da0d4d2d4247df37d01604afcf3612447
      
https://github.com/qemu/qemu/commit/f400e14da0d4d2d4247df37d01604afcf3612447
  Author: John Snow <jsnow@redhat.com>
  Date:   2022-03-22 (Tue, 22 Mar 2022)

  Changed paths:
    M tests/qemu-iotests/iotests.py

  Log Message:
  -----------
  iotests: remove qemu_img_pipe_and_status()

With the exceptional 'create' calls removed in the prior commit, change
qemu_img_log() and img_info_log() to call qemu_img() directly
instead.

For now, allow these calls to qemu-img to return non-zero on the basis
that any unusual output will be logged anyway. The very next commit
begins to enforce a successful exit code by default even for the logged
functions.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20220321201618.903471-18-jsnow@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>


  Commit: 8f685ac391047a8c253c94b165c3e9b8f184cff2
      
https://github.com/qemu/qemu/commit/8f685ac391047a8c253c94b165c3e9b8f184cff2
  Author: John Snow <jsnow@redhat.com>
  Date:   2022-03-22 (Tue, 22 Mar 2022)

  Changed paths:
    M tests/qemu-iotests/242
    M tests/qemu-iotests/266
    M tests/qemu-iotests/iotests.py

  Log Message:
  -----------
  iotests: make qemu_img_log and img_info_log raise on error

Add a `check: bool = True` parameter to both functions and make their
qemu_img() invocations raise on error by default.

users of img_info_log:
206, 207, 210, 211, 212, 213, 237, 242, 266, 274, 302

users of qemu_img_log:
044, 209, 274, 302, 304

iotests 242 and 266 need to use check=False for their negative tests.
iotests 206, 210, 211, 212, 213, 237, 274 and 302 continue working
normally.

As of this commit, all calls to QEMU_IMG made from iotests enforce a
return code of zero by default unless explicitly disabled or suppressed
by passing check=False or with an exception handler.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20220321201618.903471-19-jsnow@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>


  Commit: da9d88d8e6c163fdcfe858cd05e750a6f1016b88
      
https://github.com/qemu/qemu/commit/da9d88d8e6c163fdcfe858cd05e750a6f1016b88
  Author: Hanna Reitz <hreitz@redhat.com>
  Date:   2022-03-22 (Tue, 22 Mar 2022)

  Changed paths:
    M tests/qemu-iotests/iotests.py

  Log Message:
  -----------
  iotests.py: Filters for VM.run_job()

Allow filters for VM.run_job(), and pass the filters given to
VM.blockdev_create() to it.

(Use this opportunity to annotate VM.run_job()'s parameter types;
unfortunately, for the filter, I could not come up with anything better
than Callable[[Any], Any] that would pass mypy's scrutiny.)

At one point, a plain string is logged, so the filters passed to it must
work fine with plain strings.  The only filters passed to it at this
point are the ones from VM.blockdev_create(), which are
filter_qmp_test_files() (by default) and 207's filter_hash().  Both
cannot handle plain strings yet, but we can make them by amending
filter_qmp() to treat them as plain values with a None key.

Signed-off-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20220318125304.66131-2-hreitz@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>


  Commit: 48f1fcd5c87cadef331a2cd08e67e37a789e8347
      
https://github.com/qemu/qemu/commit/48f1fcd5c87cadef331a2cd08e67e37a789e8347
  Author: Hanna Reitz <hreitz@redhat.com>
  Date:   2022-03-22 (Tue, 22 Mar 2022)

  Changed paths:
    M tests/qemu-iotests/207
    M tests/qemu-iotests/207.out

  Log Message:
  -----------
  iotests/207: Filter host fingerprint

Commit e3296cc796aeaf319f3ed4e064ec309baf5e4da4 made the ssh block
driver's error message for fingerprint mismatches more verbose, so it
now prints the actual host key fingerprint and the key type.

iotest 207 tests such errors, but was not amended to filter that
fingerprint (which is host-specific), so do it now.  Filter the key
type, too, because I guess this too can differ depending on the host
configuration.

Fixes: e3296cc796aeaf319f3ed4e064ec309baf5e4da4
       ("block: print the server key type and fingerprint on failure")
Reported-by: John Snow <jsnow@redhat.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20220318125304.66131-3-hreitz@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>


  Commit: 9d36d5f7e0dc905d8cb3dd437e479eb536417d3b
      
https://github.com/qemu/qemu/commit/9d36d5f7e0dc905d8cb3dd437e479eb536417d3b
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2022-03-22 (Tue, 22 Mar 2022)

  Changed paths:
    M block/rbd.c
    M meson.build
    M python/qemu/utils/__init__.py
    M scripts/mtest2make.py
    M tests/Makefile.include
    M tests/qemu-iotests/041
    M tests/qemu-iotests/065
    M tests/qemu-iotests/149
    M tests/qemu-iotests/149.out
    M tests/qemu-iotests/163
    M tests/qemu-iotests/194
    M tests/qemu-iotests/202
    M tests/qemu-iotests/203
    M tests/qemu-iotests/207
    M tests/qemu-iotests/207.out
    M tests/qemu-iotests/211
    M tests/qemu-iotests/211.out
    M tests/qemu-iotests/216
    M tests/qemu-iotests/218
    M tests/qemu-iotests/224
    M tests/qemu-iotests/228
    M tests/qemu-iotests/234
    M tests/qemu-iotests/237
    M tests/qemu-iotests/237.out
    M tests/qemu-iotests/242
    M tests/qemu-iotests/255
    M tests/qemu-iotests/255.out
    M tests/qemu-iotests/257
    M tests/qemu-iotests/258
    M tests/qemu-iotests/262
    M tests/qemu-iotests/266
    M tests/qemu-iotests/274
    M tests/qemu-iotests/274.out
    M tests/qemu-iotests/280
    M tests/qemu-iotests/280.out
    M tests/qemu-iotests/296
    M tests/qemu-iotests/303
    M tests/qemu-iotests/310
    M tests/qemu-iotests/common.filter
    M tests/qemu-iotests/iotests.py
    M tests/qemu-iotests/testenv.py
    M tests/qemu-iotests/testrunner.py
    M tests/qemu-iotests/tests/block-status-cache
    M tests/qemu-iotests/tests/graph-changes-while-io
    M tests/qemu-iotests/tests/image-fleecing
    M tests/qemu-iotests/tests/mirror-ready-cancel-error
    M tests/qemu-iotests/tests/mirror-top-perms
    M tests/qemu-iotests/tests/parallels-read-bitmap
    M tests/qemu-iotests/tests/remove-bitmap-from-backing
    M tests/qemu-iotests/tests/stream-error-on-reset

  Log Message:
  -----------
  Merge tag 'pull-block-2022-03-22' of https://gitlab.com/hreitz/qemu into 
staging

Block patches for 7.0-rc1:
- iotest fixes:
  - Fix some iotests for riscv targets
  - Use GNU sed in more places where required
  - Meson-related fixes (i.e. to print errors when they occur)
  - Have qemu-img calls (from Python tests) generally raise nicely
    formattable exceptions on errors
  - Fix iotest 207
- Allow RBD images to be growable by writing zeroes past the end of
  file, fixing qcow2 on rbd

# gpg: Signature made Tue 22 Mar 2022 11:51:10 GMT
# gpg:                using RSA key CB62D7A0EE3829E45F004D34A1FA40D098019CDF
# gpg:                issuer "hreitz@redhat.com"
# gpg: Good signature from "Hanna Reitz <hreitz@redhat.com>" [marginal]
# gpg: WARNING: This key is not certified with sufficiently trusted signatures!
# gpg:          It is not certain that the signature belongs to the owner.
# Primary key fingerprint: CB62 D7A0 EE38 29E4 5F00  4D34 A1FA 40D0 9801 9CDF

* tag 'pull-block-2022-03-22' of https://gitlab.com/hreitz/qemu: (25 commits)
  iotests/207: Filter host fingerprint
  iotests.py: Filters for VM.run_job()
  iotests: make qemu_img_log and img_info_log raise on error
  iotests: remove qemu_img_pipe_and_status()
  iotests: replace qemu_img_log('create', ...) calls
  iotests: use qemu_img() in has_working_luks()
  iotests: remove remaining calls to qemu_img_pipe()
  iotests/149: Remove qemu_img_pipe() call
  iotests: replace unchecked calls to qemu_img_pipe()
  iotests: change supports_quorum to use qemu_img
  iotests: add qemu_img_map() function
  iotests/remove-bitmap-from-backing: use qemu_img_info()
  iotests: add qemu_img_info()
  iotests: use qemu_img_json() when applicable
  iotests: add qemu_img_json()
  iotests: fortify compare_images() against crashes
  iotests: make qemu_img raise on non-zero rc by default
  iotests: Remove explicit checks for qemu_img() == 0
  python/utils: add VerboseProcessError
  python/utils: add add_visual_margin() text decoration utility
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


Compare: https://github.com/qemu/qemu/compare/5791de9d4874...9d36d5f7e0dc



reply via email to

[Prev in Thread] Current Thread [Next in Thread]