All of lore.kernel.org
 help / color / mirror / Atom feed
* [PULL 0/3] Block patches for 5.1
@ 2020-07-27 14:38 Max Reitz
  2020-07-27 14:38 ` [PULL 1/3] block/amend: Check whether the node exists Max Reitz
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Max Reitz @ 2020-07-27 14:38 UTC (permalink / raw)
  To: qemu-block; +Cc: Kevin Wolf, Peter Maydell, qemu-devel, Max Reitz

The following changes since commit 4215d3413272ad6d1c6c9d0234450b602e46a74c:

  Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-5.1-20200727' into staging (2020-07-27 09:33:04 +0100)

are available in the Git repository at:

  https://github.com/XanClic/qemu.git tags/pull-block-2020-07-27

for you to fetch changes up to 1855536256eb0a5708b04b85f744de69559ea323:

  iotests/197: Fix for compat=0.10 (2020-07-27 16:35:17 +0200)

----------------------------------------------------------------
Block patches for 5.1:
- Coverity fix
- iotests fix for rx and avr
- iotests fix for qcow2 -o compat=0.10

----------------------------------------------------------------
Max Reitz (2):
  block/amend: Check whether the node exists
  iotests/197: Fix for compat=0.10

Thomas Huth (1):
  iotests: Select a default machine for the rx and avr targets

 block/amend.c            |  6 +++++-
 tests/qemu-iotests/197   |  4 +++-
 tests/qemu-iotests/check | 14 +++++++++-----
 3 files changed, 17 insertions(+), 7 deletions(-)

-- 
2.26.2



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

* [PULL 1/3] block/amend: Check whether the node exists
  2020-07-27 14:38 [PULL 0/3] Block patches for 5.1 Max Reitz
@ 2020-07-27 14:38 ` Max Reitz
  2020-07-27 14:38 ` [PULL 2/3] iotests: Select a default machine for the rx and avr targets Max Reitz
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Max Reitz @ 2020-07-27 14:38 UTC (permalink / raw)
  To: qemu-block; +Cc: Kevin Wolf, Peter Maydell, qemu-devel, Max Reitz

We should check whether the user-specified node-name actually refers to
a node.  The simplest way to do that is to use bdrv_lookup_bs() instead
of bdrv_find_node() (the former wraps the latter, and produces an error
message if necessary).

Reported-by: Coverity (CID 1430268)
Fixes: ced914d0ab9fb2c900f873f6349a0b8eecd1fdbe
Signed-off-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20200710095037.10885-1-mreitz@redhat.com>
Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
---
 block/amend.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/block/amend.c b/block/amend.c
index f4612dcf08..392df9ef83 100644
--- a/block/amend.c
+++ b/block/amend.c
@@ -69,8 +69,12 @@ void qmp_x_blockdev_amend(const char *job_id,
     BlockdevAmendJob *s;
     const char *fmt = BlockdevDriver_str(options->driver);
     BlockDriver *drv = bdrv_find_format(fmt);
-    BlockDriverState *bs = bdrv_find_node(node_name);
+    BlockDriverState *bs;
 
+    bs = bdrv_lookup_bs(NULL, node_name, errp);
+    if (!bs) {
+        return;
+    }
 
     if (!drv) {
         error_setg(errp, "Block driver '%s' not found or not supported", fmt);
-- 
2.26.2



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

* [PULL 2/3] iotests: Select a default machine for the rx and avr targets
  2020-07-27 14:38 [PULL 0/3] Block patches for 5.1 Max Reitz
  2020-07-27 14:38 ` [PULL 1/3] block/amend: Check whether the node exists Max Reitz
@ 2020-07-27 14:38 ` Max Reitz
  2020-07-27 14:38 ` [PULL 3/3] iotests/197: Fix for compat=0.10 Max Reitz
  2020-07-28 10:19 ` [PULL 0/3] Block patches for 5.1 Peter Maydell
  3 siblings, 0 replies; 7+ messages in thread
From: Max Reitz @ 2020-07-27 14:38 UTC (permalink / raw)
  To: qemu-block; +Cc: Kevin Wolf, Peter Maydell, qemu-devel, Max Reitz

From: Thomas Huth <thuth@redhat.com>

If you are building only with either the new rx-softmmu or avr-softmmu
target, "make check-block" fails a couple of tests since there is no
default machine defined in these new targets. We have to select a machine
in the "check" script for these, just like we already do for the arm- and
tricore-softmmu targets.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20200722161908.25383-1-thuth@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
---
 tests/qemu-iotests/check | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check
index e0d8049012..0657f7286c 100755
--- a/tests/qemu-iotests/check
+++ b/tests/qemu-iotests/check
@@ -595,15 +595,19 @@ then
 fi
 export QEMU_PROG="$(type -p "$QEMU_PROG")"
 
+export QEMU_OPTIONS="-nodefaults -display none -accel qtest"
 case "$QEMU_PROG" in
     *qemu-system-arm|*qemu-system-aarch64)
-        export QEMU_OPTIONS="-nodefaults -display none -machine virt -accel qtest"
+        export QEMU_OPTIONS="$QEMU_OPTIONS -machine virt"
         ;;
-    *qemu-system-tricore)
-        export QEMU_OPTIONS="-nodefaults -display none -machine tricore_testboard -accel qtest"
+    *qemu-system-avr)
+        export QEMU_OPTIONS="$QEMU_OPTIONS -machine mega2560"
+        ;;
+    *qemu-system-rx)
+        export QEMU_OPTIONS="$QEMU_OPTIONS -machine gdbsim-r5f562n8"
         ;;
-    *)
-        export QEMU_OPTIONS="-nodefaults -display none -accel qtest"
+    *qemu-system-tricore)
+        export QEMU_OPTIONS="-$QEMU_OPTIONS -machine tricore_testboard"
         ;;
 esac
 
-- 
2.26.2



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

* [PULL 3/3] iotests/197: Fix for compat=0.10
  2020-07-27 14:38 [PULL 0/3] Block patches for 5.1 Max Reitz
  2020-07-27 14:38 ` [PULL 1/3] block/amend: Check whether the node exists Max Reitz
  2020-07-27 14:38 ` [PULL 2/3] iotests: Select a default machine for the rx and avr targets Max Reitz
@ 2020-07-27 14:38 ` Max Reitz
  2020-07-28 10:19 ` [PULL 0/3] Block patches for 5.1 Peter Maydell
  3 siblings, 0 replies; 7+ messages in thread
From: Max Reitz @ 2020-07-27 14:38 UTC (permalink / raw)
  To: qemu-block; +Cc: Kevin Wolf, Peter Maydell, qemu-devel, Max Reitz

Writing zeroes to a qcow2 v2 images without a backing file results in an
unallocated cluster as of 61b3043965.  197 has a test for COR-ing a
cluster on an image without a backing file, which means that the data
will be zero, so now on a v2 image that cluster will just stay
unallocated, and so the test fails.  Just force compat=1.1 for that
particular case to enforce the cluster to get allocated.

Fixes: 61b3043965fe3552ee2684a97e7cc809ca7a71b3
Signed-off-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20200727135237.1096841-1-mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
---
 tests/qemu-iotests/197 | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tests/qemu-iotests/197 b/tests/qemu-iotests/197
index 95f05b0e34..121959a09c 100755
--- a/tests/qemu-iotests/197
+++ b/tests/qemu-iotests/197
@@ -112,7 +112,9 @@ echo
 echo '=== Partial final cluster ==='
 echo
 
-_make_test_img 1024
+# Force compat=1.1, because writing zeroes on a v2 image without a
+# backing file would just result in an unallocated cluster
+_make_test_img -o compat=1.1 1024
 $QEMU_IO -f $IMGFMT -C -c 'read 0 1024' "$TEST_IMG" | _filter_qemu_io
 $QEMU_IO -f $IMGFMT -c map "$TEST_IMG"
 _check_test_img
-- 
2.26.2



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

* Re: [PULL 0/3] Block patches for 5.1
  2020-07-27 14:38 [PULL 0/3] Block patches for 5.1 Max Reitz
                   ` (2 preceding siblings ...)
  2020-07-27 14:38 ` [PULL 3/3] iotests/197: Fix for compat=0.10 Max Reitz
@ 2020-07-28 10:19 ` Peter Maydell
  2020-07-28 16:12   ` Peter Maydell
  3 siblings, 1 reply; 7+ messages in thread
From: Peter Maydell @ 2020-07-28 10:19 UTC (permalink / raw)
  To: Max Reitz; +Cc: Kevin Wolf, QEMU Developers, Qemu-block

On Mon, 27 Jul 2020 at 15:38, Max Reitz <mreitz@redhat.com> wrote:
>
> The following changes since commit 4215d3413272ad6d1c6c9d0234450b602e46a74c:
>
>   Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-5.1-20200727' into staging (2020-07-27 09:33:04 +0100)
>
> are available in the Git repository at:
>
>   https://github.com/XanClic/qemu.git tags/pull-block-2020-07-27
>
> for you to fetch changes up to 1855536256eb0a5708b04b85f744de69559ea323:
>
>   iotests/197: Fix for compat=0.10 (2020-07-27 16:35:17 +0200)
>
> ----------------------------------------------------------------
> Block patches for 5.1:
> - Coverity fix
> - iotests fix for rx and avr
> - iotests fix for qcow2 -o compat=0.10
>


Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/5.1
for any user-visible changes.

-- PMM


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

* Re: [PULL 0/3] Block patches for 5.1
  2020-07-28 10:19 ` [PULL 0/3] Block patches for 5.1 Peter Maydell
@ 2020-07-28 16:12   ` Peter Maydell
  2020-07-28 16:22     ` Thomas Huth
  0 siblings, 1 reply; 7+ messages in thread
From: Peter Maydell @ 2020-07-28 16:12 UTC (permalink / raw)
  To: Max Reitz; +Cc: Kevin Wolf, QEMU Developers, Qemu-block

On Tue, 28 Jul 2020 at 11:19, Peter Maydell <peter.maydell@linaro.org> wrote:
>
> On Mon, 27 Jul 2020 at 15:38, Max Reitz <mreitz@redhat.com> wrote:
> > ----------------------------------------------------------------
> > Block patches for 5.1:
> > - Coverity fix
> > - iotests fix for rx and avr
> > - iotests fix for qcow2 -o compat=0.10
> >
>
> Applied, thanks.

This seems to have broken the "tcg disabled" build on gitlab:
https://gitlab.com/qemu-project/qemu/-/jobs/659352096


197       [1m [31mfail       [0m [10:57:48] [10:59:34]
   output mismatch (see 197.out.bad)
--- /builds/qemu-project/qemu/tests/qemu-iotests/197.out 2020-07-28
10:47:16.000000000 +0000
+++ /builds/qemu-project/qemu/build/tests/qemu-iotests/197.out.bad
2020-07-28 10:59:33.000000000 +0000
@@ -26,9 +26,9 @@

 === Partial final cluster ===

-Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1024
+qemu-img: TEST_DIR/t.IMGFMT: Invalid parameter 'compat'
 read 1024/1024 bytes at offset 0
 1 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-1 KiB (0x400) bytes     allocated at offset 0 bytes (0x0)
+4 GiB (0x100000000) bytes     allocated at offset 0 bytes (0x0)
 No errors were found on the image.
 *** done


thanks
-- PMM


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

* Re: [PULL 0/3] Block patches for 5.1
  2020-07-28 16:12   ` Peter Maydell
@ 2020-07-28 16:22     ` Thomas Huth
  0 siblings, 0 replies; 7+ messages in thread
From: Thomas Huth @ 2020-07-28 16:22 UTC (permalink / raw)
  To: Peter Maydell, Max Reitz; +Cc: Kevin Wolf, QEMU Developers, Qemu-block

On 28/07/2020 18.12, Peter Maydell wrote:
> On Tue, 28 Jul 2020 at 11:19, Peter Maydell <peter.maydell@linaro.org> wrote:
>>
>> On Mon, 27 Jul 2020 at 15:38, Max Reitz <mreitz@redhat.com> wrote:
>>> ----------------------------------------------------------------
>>> Block patches for 5.1:
>>> - Coverity fix
>>> - iotests fix for rx and avr
>>> - iotests fix for qcow2 -o compat=0.10
>>>
>>
>> Applied, thanks.
> 
> This seems to have broken the "tcg disabled" build on gitlab:
> https://gitlab.com/qemu-project/qemu/-/jobs/659352096

Max already sent another pull request that contains the fix for this
issue, look for "[PULL 0/3] Block patches for 5.1.0-rc2?"

 Thomas



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

end of thread, other threads:[~2020-07-28 16:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-27 14:38 [PULL 0/3] Block patches for 5.1 Max Reitz
2020-07-27 14:38 ` [PULL 1/3] block/amend: Check whether the node exists Max Reitz
2020-07-27 14:38 ` [PULL 2/3] iotests: Select a default machine for the rx and avr targets Max Reitz
2020-07-27 14:38 ` [PULL 3/3] iotests/197: Fix for compat=0.10 Max Reitz
2020-07-28 10:19 ` [PULL 0/3] Block patches for 5.1 Peter Maydell
2020-07-28 16:12   ` Peter Maydell
2020-07-28 16:22     ` Thomas Huth

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.