qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 0c8347: tests/qemu-iotests: Fix 051 for binar


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 0c8347: tests/qemu-iotests: Fix 051 for binaries without '...
Date: Tue, 01 Feb 2022 08:38:29 -0800

  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: 0c83471bd75d329f4945e27dc1aa3a6cc2fda3bf
      
https://github.com/qemu/qemu/commit/0c83471bd75d329f4945e27dc1aa3a6cc2fda3bf
  Author: Thomas Huth <thuth@redhat.com>
  Date:   2022-02-01 (Tue, 01 Feb 2022)

  Changed paths:
    M tests/qemu-iotests/051

  Log Message:
  -----------
  tests/qemu-iotests: Fix 051 for binaries without 'lsi53c895a'

The lsi53c895a SCSI adaptor might not be enabled in each and every
x86 QEMU binary, e.g. it's disabled in the RHEL/CentOS build.
Thus let's add a check to the 051 test so that it does not fail if
this device is not available.

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


  Commit: fc2c3996a59683685a663deb3af12183ad24e4a7
      
https://github.com/qemu/qemu/commit/fc2c3996a59683685a663deb3af12183ad24e4a7
  Author: Hanna Reitz <hreitz@redhat.com>
  Date:   2022-02-01 (Tue, 01 Feb 2022)

  Changed paths:
    M tests/qemu-iotests/tests/mirror-ready-cancel-error

  Log Message:
  -----------
  iotests/MRCE: Write data to source

This test assumes that mirror flushes the source when entering the READY
state, and that the format level will pass that flush on to the protocol
level (where we intercept it with blkdebug).

However, apparently that does not happen when using a VMDK image with
zeroed_grain=on, which actually is the default set by testenv.py.  Right
now, Python tests ignore IMGOPTS, though, so this has no effect; but
Vladimir has a series that will change this, so we need to fix this test
before that series lands.

We can fix it by writing data to the source before we start the mirror
job; apparently that makes the (VMDK) format layer change its mind and
pass on the pre-READY flush to the protocol level, so the test passes
again.  (I presume, without any data written, mirror just does a 64M
zero write on the target, which VMDK with zeroed_grain=on basically just
ignores.)

Without this, we do not get a flush, and so blkdebug only sees a single
flush at the end of the job instead of two, and therefore does not
inject an error, which makes the block job complete instead of raising
an error.

Signed-off-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20211223165308.103793-1-hreitz@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>


  Commit: 3bd2b942d9a8a10bb7a504a1ecf4a3e70803840e
      
https://github.com/qemu/qemu/commit/3bd2b942d9a8a10bb7a504a1ecf4a3e70803840e
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
  Date:   2022-02-01 (Tue, 01 Feb 2022)

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

  Log Message:
  -----------
  iotests.py: img_info_log(): rename imgopts argument

We are going to support IMGOPTS environment variable like in bash
tests. Corresponding global variable in iotests.py should be called
imgopts. So to not interfere with function argument, rename it in
advance.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20211223160144.1097696-2-vsementsov@virtuozzo.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>


  Commit: 7c15400cdd06b7b9b26c86eac1858fb9c0d77c1c
      
https://github.com/qemu/qemu/commit/7c15400cdd06b7b9b26c86eac1858fb9c0d77c1c
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
  Date:   2022-02-01 (Tue, 01 Feb 2022)

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

  Log Message:
  -----------
  iotests.py: implement unsupported_imgopts

We are going to support some addition IMGOPTS in python iotests like
in bash iotests. Similarly to bash iotests, we want a way to skip some
tests which can't work with specific IMGOPTS.

Globally for python iotests we will not support things like
'data_file=$TEST_IMG.ext_data_file' in IMGOPTS, so, forbid this
globally in iotests.py.

Suggested-by: Hanna Reitz <hreitz@redhat.com>
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20211223160144.1097696-3-vsementsov@virtuozzo.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>


  Commit: b30b8077243ea5dc93a540eedfecee3c74b19fa2
      
https://github.com/qemu/qemu/commit/b30b8077243ea5dc93a540eedfecee3c74b19fa2
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
  Date:   2022-02-01 (Tue, 01 Feb 2022)

  Changed paths:
    M tests/qemu-iotests/044
    M tests/qemu-iotests/065
    M tests/qemu-iotests/163
    M tests/qemu-iotests/165
    M tests/qemu-iotests/196
    M tests/qemu-iotests/242
    M tests/qemu-iotests/246
    M tests/qemu-iotests/254
    M tests/qemu-iotests/260
    M tests/qemu-iotests/274
    M tests/qemu-iotests/281
    M tests/qemu-iotests/303
    M tests/qemu-iotests/tests/migrate-bitmaps-postcopy-test
    M tests/qemu-iotests/tests/migrate-bitmaps-test
    M tests/qemu-iotests/tests/remove-bitmap-from-backing

  Log Message:
  -----------
  iotests: specify some unsupported_imgopts for python iotests

We are going to support IMGOPTS for python iotests. Still some iotests
will not work with common IMGOPTS used with bash iotests like
specifying refcount_bits and compat qcow2 options. So we
should define corresponding unsupported_imgopts for now.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20211223160144.1097696-4-vsementsov@virtuozzo.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>


  Commit: 22e29bcea12ccf0e127b91917d959c69bebbd952
      
https://github.com/qemu/qemu/commit/22e29bcea12ccf0e127b91917d959c69bebbd952
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
  Date:   2022-02-01 (Tue, 01 Feb 2022)

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

  Log Message:
  -----------
  iotests.py: qemu_img*("create"): support IMGOPTS='compression_type=zstd'

Adding support of IMGOPTS (like in bash tests) allows user to pass a
lot of different options. Still, some may require additional logic.

Now we want compression_type option, so add some smart logic around it:
ignore compression_type=zstd in IMGOPTS, if test want qcow2 in
compatibility mode. As well, ignore compression_type for non-qcow2
formats.

Note that we may instead add support only to qemu_img_create(), but
that works bad:

1. We'll have to update a lot of tests to use qemu_img_create instead
   of qemu_img('create'). (still, we may want do it anyway, but no
   reason to create a dependancy between task of supporting IMGOPTS and
   updating a lot of tests)

2. Some tests use qemu_img_pipe('create', ..) - even more work on
   updating

3. Even if we update all tests to go through qemu_img_create, we'll
   need a way to avoid creating new tests using qemu_img*('create') -
   add assertions.. That doesn't seem good.

So, let's add support of IMGOPTS to most generic
qemu_img_pipe_and_status().

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20211223160144.1097696-5-vsementsov@virtuozzo.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>


  Commit: 8f9e54ccfd047cbef09fe10fa75d59333052fb78
      
https://github.com/qemu/qemu/commit/8f9e54ccfd047cbef09fe10fa75d59333052fb78
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
  Date:   2022-02-01 (Tue, 01 Feb 2022)

  Changed paths:
    M tests/qemu-iotests/044
    M tests/qemu-iotests/044.out
    M tests/qemu-iotests/209
    M tests/qemu-iotests/209.out
    M tests/qemu-iotests/iotests.py

  Log Message:
  -----------
  iotests: drop qemu_img_verbose() helper

qemu_img_verbose() has a drawback of not going through generic
qemu_img_pipe_and_status(). qemu_img_verbose() is not very popular, so
update the only two users to qemu_img_log() and drop qemu_img_verbose()
at all.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20211223160144.1097696-6-vsementsov@virtuozzo.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>


  Commit: 28a5ad93da08ae55c8dfac0db8615936ca14b822
      
https://github.com/qemu/qemu/commit/28a5ad93da08ae55c8dfac0db8615936ca14b822
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
  Date:   2022-02-01 (Tue, 01 Feb 2022)

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

  Log Message:
  -----------
  iotests.py: rewrite default luks support in qemu_img

Move the logic to more generic qemu_img_pipe_and_status(). Also behave
better when we have several -o options. And reuse argument parser of
course.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20211223160144.1097696-7-vsementsov@virtuozzo.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>


  Commit: 677e0bae686e7c670a71d1f6a491a7f06f77de73
      
https://github.com/qemu/qemu/commit/677e0bae686e7c670a71d1f6a491a7f06f77de73
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
  Date:   2022-02-01 (Tue, 01 Feb 2022)

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

  Log Message:
  -----------
  iotest 303: explicit compression type

The test prints qcow2 header fields which depends on chosen compression
type. So, let's be explicit in what compression type we want and
independent of IMGOPTS. Test both existing compression types.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20211223160144.1097696-8-vsementsov@virtuozzo.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>


  Commit: 12a936171d71f839dc907fff7887358a05ac20f8
      
https://github.com/qemu/qemu/commit/12a936171d71f839dc907fff7887358a05ac20f8
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
  Date:   2022-02-01 (Tue, 01 Feb 2022)

  Changed paths:
    M tests/qemu-iotests/065

  Log Message:
  -----------
  iotest 065: explicit compression type

The test checks different options. It of course fails if set
IMGOPTS='compression_type=zstd'. So, let's be explicit in what
compression type we want and independent of IMGOPTS. Test both existing
compression types.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20211223160144.1097696-9-vsementsov@virtuozzo.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>


  Commit: a70eeb3d4725ce6c0d18e57ea952ec9e2b09e69c
      
https://github.com/qemu/qemu/commit/a70eeb3d4725ce6c0d18e57ea952ec9e2b09e69c
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
  Date:   2022-02-01 (Tue, 01 Feb 2022)

  Changed paths:
    M tests/qemu-iotests/149.out
    M tests/qemu-iotests/237.out
    M tests/qemu-iotests/255.out
    M tests/qemu-iotests/274.out
    M tests/qemu-iotests/280.out
    M tests/qemu-iotests/296.out
    M tests/qemu-iotests/iotests.py

  Log Message:
  -----------
  iotests.py: filter out successful output of qemu-img create

The only "feature" of this "Formatting ..." line is that we have to
update it every time we add new option. Let's drop it.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20211223160144.1097696-10-vsementsov@virtuozzo.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>


  Commit: e877bba308c38033f73f444395b3cdcde48a3393
      
https://github.com/qemu/qemu/commit/e877bba308c38033f73f444395b3cdcde48a3393
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
  Date:   2022-02-01 (Tue, 01 Feb 2022)

  Changed paths:
    M tests/qemu-iotests/206.out
    M tests/qemu-iotests/242.out
    M tests/qemu-iotests/274.out
    M tests/qemu-iotests/iotests.py

  Log Message:
  -----------
  iotests.py: filter compression type out

We want iotests pass with both the default zlib compression and with
IMGOPTS='compression_type=zstd'.

Actually the only test that is interested in real compression type in
test output is 287 (test for qcow2 compression type) and it's in bash.
So for now we can safely filter out compression type in all qcow2
tests.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20211223160144.1097696-11-vsementsov@virtuozzo.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>


  Commit: c30175d6fbc73a86a8013da195471d1a3490178f
      
https://github.com/qemu/qemu/commit/c30175d6fbc73a86a8013da195471d1a3490178f
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
  Date:   2022-02-01 (Tue, 01 Feb 2022)

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

  Log Message:
  -----------
  iotest 302: use img_info_log() helper

Instead of qemu_img_log("info", ..) use generic helper img_info_log().

img_info_log() has smarter logic. For example it use filter_img_info()
to filter output, which in turns filter a compression type. So it will
help us in future when we implement a possibility to use zstd
compression by default (with help of some runtime config file or maybe
build option). For now to test you should recompile qemu with a small
addition into block/qcow2.c before
"if (qcow2_opts->has_compression_type":

    if (!qcow2_opts->has_compression_type && version >= 3) {
        qcow2_opts->has_compression_type = true;
        qcow2_opts->compression_type = QCOW2_COMPRESSION_TYPE_ZSTD;
    }

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20211223160144.1097696-12-vsementsov@virtuozzo.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>


  Commit: 083c24561a1f52829b5b31a0fb2f7c77efb979c0
      
https://github.com/qemu/qemu/commit/083c24561a1f52829b5b31a0fb2f7c77efb979c0
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
  Date:   2022-02-01 (Tue, 01 Feb 2022)

  Changed paths:
    M block/qcow2.c

  Log Message:
  -----------
  qcow2: simple case support for downgrading of qcow2 images with zstd

If image doesn't have any compressed cluster we can easily switch to
zlib compression, which may allow to downgrade the image.

That's mostly needed to support IMGOPTS='compression_type=zstd' in some
iotests which do qcow2 downgrade.

While being here also fix checkpatch complain against '#' in printf
formatting.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20211223160144.1097696-13-vsementsov@virtuozzo.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>


  Commit: c5e627a6ecdccea64a1b600857ed671a83377847
      
https://github.com/qemu/qemu/commit/c5e627a6ecdccea64a1b600857ed671a83377847
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
  Date:   2022-02-01 (Tue, 01 Feb 2022)

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

  Log Message:
  -----------
  iotests/common.rc: introduce _qcow2_dump_header helper

We'll use it in tests instead of explicit qcow2.py. Then we are going
to add some filtering in _qcow2_dump_header.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20211223160144.1097696-14-vsementsov@virtuozzo.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>


  Commit: 984d7a52d5ca33a79e09f2617fe43e368dce4068
      
https://github.com/qemu/qemu/commit/984d7a52d5ca33a79e09f2617fe43e368dce4068
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
  Date:   2022-02-01 (Tue, 01 Feb 2022)

  Changed paths:
    M tests/qemu-iotests/031
    M tests/qemu-iotests/036
    M tests/qemu-iotests/039
    M tests/qemu-iotests/060
    M tests/qemu-iotests/061
    M tests/qemu-iotests/137
    M tests/qemu-iotests/287

  Log Message:
  -----------
  iotests: massive use _qcow2_dump_header

We are going to add filtering in _qcow2_dump_header and want all tests
use it.

The patch is generated by commands:
  cd tests/qemu-iotests
  sed -ie 's/$PYTHON qcow2.py "$TEST_IMG" dump-header\($\| 
\)/_qcow2_dump_header\1/' ??? tests/*

(the difficulty is to avoid converting dump-header-exts)

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20211223160144.1097696-15-vsementsov@virtuozzo.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>


  Commit: 72be51ddb3d10974da5128ad20ee5ca7a13ddd54
      
https://github.com/qemu/qemu/commit/72be51ddb3d10974da5128ad20ee5ca7a13ddd54
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
  Date:   2022-02-01 (Tue, 01 Feb 2022)

  Changed paths:
    M tests/qemu-iotests/039

  Log Message:
  -----------
  iotest 39: use _qcow2_dump_header

_qcow2_dump_header has filter for compression type, so this change
makes test pass with IMGOPTS='compression_type=zstd'.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20211223160144.1097696-16-vsementsov@virtuozzo.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>


  Commit: dba5aee4da9ce0a81e5a870c22a19926212dc87e
      
https://github.com/qemu/qemu/commit/dba5aee4da9ce0a81e5a870c22a19926212dc87e
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
  Date:   2022-02-01 (Tue, 01 Feb 2022)

  Changed paths:
    M tests/qemu-iotests/060.out
    M tests/qemu-iotests/061.out
    M tests/qemu-iotests/082.out
    M tests/qemu-iotests/198.out
    M tests/qemu-iotests/287
    M tests/qemu-iotests/common.filter
    M tests/qemu-iotests/common.rc

  Log Message:
  -----------
  iotests: bash tests: filter compression type

We want iotests pass with both the default zlib compression and with
IMGOPTS='compression_type=zstd'.

Actually the only test that is interested in real compression type in
test output is 287 (test for qcow2 compression type), so implement
specific option for it.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20211223160144.1097696-17-vsementsov@virtuozzo.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>


  Commit: 3a0e60a065ee32027684314a0d886d43bc6ce34b
      
https://github.com/qemu/qemu/commit/3a0e60a065ee32027684314a0d886d43bc6ce34b
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
  Date:   2022-02-01 (Tue, 01 Feb 2022)

  Changed paths:
    M tests/qemu-iotests/060

  Log Message:
  -----------
  iotests 60: more accurate set dirty bit in qcow2 header

Don't touch other incompatible bits, like compression-type. This makes
the test pass with IMGOPTS='compression_type=zstd'.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20211223160144.1097696-18-vsementsov@virtuozzo.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>


  Commit: da87d5f83a23dd9b252fabc7787383ce6d2454a3
      
https://github.com/qemu/qemu/commit/da87d5f83a23dd9b252fabc7787383ce6d2454a3
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
  Date:   2022-02-01 (Tue, 01 Feb 2022)

  Changed paths:
    M tests/qemu-iotests/214

  Log Message:
  -----------
  iotest 214: explicit compression type

The test-case "Corrupted size field in compressed cluster descriptor"
heavily depends on zlib compression type. So, make it explicit. This
way test passes with IMGOPTS='compression_type=zstd'.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20211223160144.1097696-19-vsementsov@virtuozzo.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>


  Commit: e287a351db13f3f6670f4a3f2896f2dde47d07d1
      
https://github.com/qemu/qemu/commit/e287a351db13f3f6670f4a3f2896f2dde47d07d1
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
  Date:   2022-02-01 (Tue, 01 Feb 2022)

  Changed paths:
    M tests/qemu-iotests/031
    M tests/qemu-iotests/051
    M tests/qemu-iotests/061
    M tests/qemu-iotests/112
    M tests/qemu-iotests/290

  Log Message:
  -----------
  iotests: declare lack of support for compresion_type in IMGOPTS

compression_type can't be used if we want to create image with
compat=0.10. So, skip these tests, not many of them.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20211223160144.1097696-20-vsementsov@virtuozzo.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>


  Commit: 492a119610129f65217580790971fa038e5492d3
      
https://github.com/qemu/qemu/commit/492a119610129f65217580790971fa038e5492d3
  Author: Hanna Reitz <hreitz@redhat.com>
  Date:   2022-02-01 (Tue, 01 Feb 2022)

  Changed paths:
    M block/block-backend.c

  Log Message:
  -----------
  block-backend: Retain permissions after migration

After migration, the permissions the guest device wants to impose on its
BlockBackend are stored in blk->perm and blk->shared_perm.  In
blk_root_activate(), we take our permissions, but keep all shared
permissions open by calling `blk_set_perm(blk->perm, BLK_PERM_ALL)`.

Only afterwards (immediately or later, depending on the runstate) do we
restrict the shared permissions by calling
`blk_set_perm(blk->perm, blk->shared_perm)`.  Unfortunately, our first
call with shared_perm=BLK_PERM_ALL has overwritten blk->shared_perm to
be BLK_PERM_ALL, so this is a no-op and the set of shared permissions is
not restricted.

Fix this bug by saving the set of shared permissions before invoking
blk_set_perm() with BLK_PERM_ALL and restoring it afterwards.

Fixes: 5f7772c4d0cf32f4e779fcd5a69ae4dae24aeebf
       ("block-backend: Defer shared_perm tightening migration
       completion")
Reported-by: Peng Liang <liangpeng10@huawei.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20211125135317.186576-2-hreitz@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Peng Liang <liangpeng10@huawei.com>


  Commit: 95fc339c1b189b03ad051359ef9c7868833d3fd5
      
https://github.com/qemu/qemu/commit/95fc339c1b189b03ad051359ef9c7868833d3fd5
  Author: Hanna Reitz <hreitz@redhat.com>
  Date:   2022-02-01 (Tue, 01 Feb 2022)

  Changed paths:
    A tests/qemu-iotests/tests/migration-permissions
    A tests/qemu-iotests/tests/migration-permissions.out

  Log Message:
  -----------
  iotests/migration-permissions: New test

This test checks that a raw image in use by a virtio-blk device does not
share the WRITE permission both before and after migration.

Signed-off-by: Hanna Reitz <hreitz@redhat.com>


  Commit: 751486c18555169ca4baf59440275d5831140822
      
https://github.com/qemu/qemu/commit/751486c18555169ca4baf59440275d5831140822
  Author: Emanuele Giuseppe Esposito <eesposit@redhat.com>
  Date:   2022-02-01 (Tue, 01 Feb 2022)

  Changed paths:
    M include/block/block.h

  Log Message:
  -----------
  block.h: remove outdated comment

The comment "disk I/O throttling" doesn't make any sense at all
any more. It was added in commit 0563e191516 to describe
bdrv_io_limits_enable()/disable(), which were removed in commit
97148076, so the comment is just a forgotten leftover.

Suggested-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Message-Id: <20220131125615.74612-1-eesposit@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>


  Commit: 3bbe296c1c7a6ddce7a294e006b8c4a53b385292
      
https://github.com/qemu/qemu/commit/3bbe296c1c7a6ddce7a294e006b8c4a53b385292
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2022-02-01 (Tue, 01 Feb 2022)

  Changed paths:
    M block/block-backend.c
    M block/qcow2.c
    M include/block/block.h
    M tests/qemu-iotests/031
    M tests/qemu-iotests/036
    M tests/qemu-iotests/039
    M tests/qemu-iotests/044
    M tests/qemu-iotests/044.out
    M tests/qemu-iotests/051
    M tests/qemu-iotests/060
    M tests/qemu-iotests/060.out
    M tests/qemu-iotests/061
    M tests/qemu-iotests/061.out
    M tests/qemu-iotests/065
    M tests/qemu-iotests/082.out
    M tests/qemu-iotests/112
    M tests/qemu-iotests/137
    M tests/qemu-iotests/149.out
    M tests/qemu-iotests/163
    M tests/qemu-iotests/165
    M tests/qemu-iotests/196
    M tests/qemu-iotests/198.out
    M tests/qemu-iotests/206.out
    M tests/qemu-iotests/209
    M tests/qemu-iotests/209.out
    M tests/qemu-iotests/210
    M tests/qemu-iotests/214
    M tests/qemu-iotests/237.out
    M tests/qemu-iotests/242
    M tests/qemu-iotests/242.out
    M tests/qemu-iotests/246
    M tests/qemu-iotests/254
    M tests/qemu-iotests/255.out
    M tests/qemu-iotests/260
    M tests/qemu-iotests/274
    M tests/qemu-iotests/274.out
    M tests/qemu-iotests/280.out
    M tests/qemu-iotests/281
    M tests/qemu-iotests/287
    M tests/qemu-iotests/290
    M tests/qemu-iotests/296.out
    M tests/qemu-iotests/302
    M tests/qemu-iotests/302.out
    M tests/qemu-iotests/303
    M tests/qemu-iotests/303.out
    M tests/qemu-iotests/common.filter
    M tests/qemu-iotests/common.rc
    M tests/qemu-iotests/iotests.py
    M tests/qemu-iotests/tests/migrate-bitmaps-postcopy-test
    M tests/qemu-iotests/tests/migrate-bitmaps-test
    A tests/qemu-iotests/tests/migration-permissions
    A tests/qemu-iotests/tests/migration-permissions.out
    M tests/qemu-iotests/tests/mirror-ready-cancel-error
    M tests/qemu-iotests/tests/remove-bitmap-from-backing

  Log Message:
  -----------
  Merge remote-tracking branch 
'remotes/hreitz-gitlab/tags/pull-block-2022-02-01' into staging

Block patches:
- Add support to the iotests to test qcow2's zstd compression mode
- Fix post-migration block node permissions
- iotests fixes (051 and mirror-ready-cancel-error)
- Remove an outdated comment

# gpg: Signature made Tue 01 Feb 2022 13:34:54 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

* remotes/hreitz-gitlab/tags/pull-block-2022-02-01: (24 commits)
  block.h: remove outdated comment
  iotests/migration-permissions: New test
  block-backend: Retain permissions after migration
  iotests: declare lack of support for compresion_type in IMGOPTS
  iotest 214: explicit compression type
  iotests 60: more accurate set dirty bit in qcow2 header
  iotests: bash tests: filter compression type
  iotest 39: use _qcow2_dump_header
  iotests: massive use _qcow2_dump_header
  iotests/common.rc: introduce _qcow2_dump_header helper
  qcow2: simple case support for downgrading of qcow2 images with zstd
  iotest 302: use img_info_log() helper
  iotests.py: filter compression type out
  iotests.py: filter out successful output of qemu-img create
  iotest 065: explicit compression type
  iotest 303: explicit compression type
  iotests.py: rewrite default luks support in qemu_img
  iotests: drop qemu_img_verbose() helper
  iotests.py: qemu_img*("create"): support IMGOPTS='compression_type=zstd'
  iotests: specify some unsupported_imgopts for python iotests
  ...

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


Compare: https://github.com/qemu/qemu/compare/5cbe64110dbe...3bbe296c1c7a



reply via email to

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