qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] f1f8af: tests/qemu-iotests/meson.build: Impro


From: Richard Henderson
Subject: [Qemu-commits] [qemu/qemu] f1f8af: tests/qemu-iotests/meson.build: Improve the indent...
Date: Wed, 20 Apr 2022 11:11:46 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: f1f8af238bd08cefbfddfb5675d469a998b2f03f
      
https://github.com/qemu/qemu/commit/f1f8af238bd08cefbfddfb5675d469a998b2f03f
  Author: Thomas Huth <thuth@redhat.com>
  Date:   2022-04-20 (Wed, 20 Apr 2022)

  Changed paths:
    M tests/qemu-iotests/meson.build

  Log Message:
  -----------
  tests/qemu-iotests/meson.build: Improve the indentation

By using subdir_done(), we can get rid of one level of indentation
in this file. This will make it easier to add more conditions to
skip the iotests in future patches.

Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20220223093840.2515281-3-thuth@redhat.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>


  Commit: 2cf6a4e3449365a514d99a1f6af3b3d05ab59824
      
https://github.com/qemu/qemu/commit/2cf6a4e3449365a514d99a1f6af3b3d05ab59824
  Author: Thomas Huth <thuth@redhat.com>
  Date:   2022-04-20 (Wed, 20 Apr 2022)

  Changed paths:
    M tests/check-block.sh
    M tests/qemu-iotests/meson.build

  Log Message:
  -----------
  tests/qemu-iotests: Move the bash and sanitizer checks to meson.build

We want to get rid of check-block.sh in the long run, so let's move
the checks for the bash version and sanitizers from check-block.sh
into the meson.build file instead.

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


  Commit: 9ba271f0c77d47dc5e3fef7da0b59b17a6960fdf
      
https://github.com/qemu/qemu/commit/9ba271f0c77d47dc5e3fef7da0b59b17a6960fdf
  Author: Hanna Reitz <hreitz@redhat.com>
  Date:   2022-04-20 (Wed, 20 Apr 2022)

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

  Log Message:
  -----------
  iotests.py: Add supports_qcow2_zstd_compression()

Suggested-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20220323105522.53660-2-hreitz@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <v.sementsov-og@mail.ru>


  Commit: 7253a57007b8dc6ff6c4bdd5106cf8356fcd34e7
      
https://github.com/qemu/qemu/commit/7253a57007b8dc6ff6c4bdd5106cf8356fcd34e7
  Author: Hanna Reitz <hreitz@redhat.com>
  Date:   2022-04-20 (Wed, 20 Apr 2022)

  Changed paths:
    M tests/qemu-iotests/065

  Log Message:
  -----------
  iotests/065: Check for zstd support

Some test cases run in iotest 065 want to run with zstd compression just
for added coverage.  Run them with zlib if there is no zstd support
compiled in.

Reported-by: Thomas Huth <thuth@redhat.com>
Fixes: 12a936171d71f839dc907ff ("iotest 065: explicit compression type")
Signed-off-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20220323105522.53660-3-hreitz@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <v.sementsov-og@mail.ru>


  Commit: 32911369fee72de1932a1ded714319fe0ecb9d2d
      
https://github.com/qemu/qemu/commit/32911369fee72de1932a1ded714319fe0ecb9d2d
  Author: Hanna Reitz <hreitz@redhat.com>
  Date:   2022-04-20 (Wed, 20 Apr 2022)

  Changed paths:
    M tests/qemu-iotests/303

  Log Message:
  -----------
  iotests/303: Check for zstd support

303 runs two test cases, one of which requires zstd support.
Unfortunately, given that this is not a unittest-style test, we cannot
easily skip that single case, and instead can only skip the whole test.

(Alternatively, we could split this test into a zlib and a zstd part,
but that seems excessive, given that this test is not in auto and thus
likely only run by developers who have zstd support compiled in.)

Fixes: 677e0bae686e7c670a71d1f ("iotest 303: explicit compression type")
Signed-off-by: Hanna Reitz <hreitz@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <v.sementsov-og@mail.ru>
Message-Id: <20220323105522.53660-4-hreitz@redhat.com>


  Commit: a8c07ec287554dcefd33733f0e5888a281ddc95e
      
https://github.com/qemu/qemu/commit/a8c07ec287554dcefd33733f0e5888a281ddc95e
  Author: Hanna Reitz <hreitz@redhat.com>
  Date:   2022-04-20 (Wed, 20 Apr 2022)

  Changed paths:
    M block/qcow2-refcount.c

  Log Message:
  -----------
  qcow2: Improve refcount structure rebuilding

When rebuilding the refcount structures (when qemu-img check -r found
errors with refcount = 0, but reference count > 0), the new refcount
table defaults to being put at the image file end[1].  There is no good
reason for that except that it means we will not have to rewrite any
refblocks we already wrote to disk.

Changing the code to rewrite those refblocks is not too difficult,
though, so let us do that.  That is beneficial for images on block
devices, where we cannot really write beyond the end of the image file.

Use this opportunity to add extensive comments to the code, and refactor
it a bit, getting rid of the backwards-jumping goto.

[1] Unless there is something allocated in the area pointed to by the
    last refblock, so we have to write that refblock.  In that case, we
    try to put the reftable in there.

Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1519071
Closes: https://gitlab.com/qemu-project/qemu/-/issues/941
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20220405134652.19278-2-hreitz@redhat.com>


  Commit: 9ffd6d646d1d5ee9087a8cbf0b7d2f96c5656162
      
https://github.com/qemu/qemu/commit/9ffd6d646d1d5ee9087a8cbf0b7d2f96c5656162
  Author: Hanna Reitz <hreitz@redhat.com>
  Date:   2022-04-20 (Wed, 20 Apr 2022)

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

  Log Message:
  -----------
  iotests/108: Test new refcount rebuild algorithm

One clear problem with how qcow2's refcount structure rebuild algorithm
used to be before "qcow2: Improve refcount structure rebuilding" was
that it is prone to failure for qcow2 images on block devices: There is
generally unused space after the actual image, and if that exceeds what
one refblock covers, the old algorithm would invariably write the
reftable past the block device's end, which cannot work.  The new
algorithm does not have this problem.

Test it with three tests:
(1) Create an image with more empty space at the end than what one
    refblock covers, see whether rebuilding the refcount structures
    results in a change in the image file length.  (It should not.)

(2) Leave precisely enough space somewhere at the beginning of the image
    for the new reftable (and the refblock for that place), see whether
    the new algorithm puts the reftable there.  (It should.)

(3) Test the original problem: Create (something like) a block device
    with a fixed size, then create a qcow2 image in there, write some
    data, and then have qemu-img check rebuild the refcount structures.
    Before HEAD^, the reftable would have been written past the image
    file end, i.e. outside of what the block device provides, which
    cannot work.  HEAD^ should have fixed that.
    ("Something like a block device" means a loop device if we can use
    one ("sudo -n losetup" works), or a FUSE block export with
    growable=false otherwise.)

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


  Commit: 0423f75351ab83b844a31349218b0eadd830e07a
      
https://github.com/qemu/qemu/commit/0423f75351ab83b844a31349218b0eadd830e07a
  Author: Hanna Reitz <hreitz@redhat.com>
  Date:   2022-04-20 (Wed, 20 Apr 2022)

  Changed paths:
    M block/qcow2-refcount.c

  Log Message:
  -----------
  qcow2: Add errp to rebuild_refcount_structure()

Instead of fprint()-ing error messages in rebuild_refcount_structure()
and its rebuild_refcounts_write_refblocks() helper, pass them through an
Error object to qcow2_check_refcounts() (which will then print it).

Suggested-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20220405134652.19278-4-hreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>


  Commit: 40a4b96eb08b3a3e83895f46b2394748dac7a641
      
https://github.com/qemu/qemu/commit/40a4b96eb08b3a3e83895f46b2394748dac7a641
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2022-04-20 (Wed, 20 Apr 2022)

  Changed paths:
    M block/qcow2-refcount.c
    M tests/check-block.sh
    M tests/qemu-iotests/065
    M tests/qemu-iotests/108
    M tests/qemu-iotests/108.out
    M tests/qemu-iotests/303
    M tests/qemu-iotests/iotests.py
    M tests/qemu-iotests/meson.build

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

Block patches:
- Some changes for qcow2's refcount repair algorithm to make it work for
  qcow2 images stored on block devices
- Skip test cases that require zstd when support for it is missing
- Some refactoring in the iotests' meson.build

# -----BEGIN PGP SIGNATURE-----
#
# iQJGBAABCAAwFiEEy2LXoO44KeRfAE00ofpA0JgBnN8FAmJf/asSHGhyZWl0ekBy
# ZWRoYXQuY29tAAoJEKH6QNCYAZzfYXUQAKQv5qKQBjU4MTwlS8A4h6B6OJgC1Sik
# 9BB7LO/QFjuuF4vNKpcUlf6i0epxPP8B5pmCjaAolMh6u6wZwL7hHq+SOYXvejTo
# vINW+r097U0qYPkSV+cS6tbW92rYJDD7VxF+34udiWXGjozsBTw/k9DfJaa9Ht66
# 2dw3AxUa4lxN1/ejFzDLx3DNaff+HctLhgVpHeBb0eN2zr2Ug5+ZFgMoiWwU6r6J
# EzTORLAzATerlQVYUkhh4Y/UdVLLw1SzTWOQv5b/NqvaLfKmYsQobSfjC2ajO8XJ
# P2REigcOAij5uWVRf4EY7xoqmADP8pXxuOTzw0hyGNLOLNcXoFbfW45WSPoY+YgH
# EH1TtC4vMsg/MlO/A3PJr9v+SNqxz32cul3MVrY3PuG4Dzz0riy9GhtFUU37igbj
# mR6pP3nSa/f2X4+9B6/UrPjLzusRvc8bvzYqVEnSLABav11npphkYaR9QT1fQUVD
# Zw26igXtmLKUcfop/EqShbhblk0ZLYDTj/Lx7X+thC9OCrK1QgF6qAsIUqiS1iHz
# vwdktRTCofo4ZIT/OCz5QeriJqDz0B7VJ8/4i/uvm2eq8BUsn2mJuyAGD2XtaONV
# rmASrV9VbajdxX5VptjKOOHG6aHtqQlKbyBFog8I4nqVFdjdSMalb++gBMCrPu1A
# 1iZPsOOyz/8+
# =BF0c
# -----END PGP SIGNATURE-----
# gpg: Signature made Wed 20 Apr 2022 05:33:47 AM PDT
# gpg:                using RSA key CB62D7A0EE3829E45F004D34A1FA40D098019CDF
# gpg:                issuer "hreitz@redhat.com"
# gpg: Good signature from "Hanna Reitz <hreitz@redhat.com>" [undefined]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: CB62 D7A0 EE38 29E4 5F00  4D34 A1FA 40D0 9801 9CDF

* tag 'pull-block-2022-04-20' of https://gitlab.com/hreitz/qemu:
  qcow2: Add errp to rebuild_refcount_structure()
  iotests/108: Test new refcount rebuild algorithm
  qcow2: Improve refcount structure rebuilding
  iotests/303: Check for zstd support
  iotests/065: Check for zstd support
  iotests.py: Add supports_qcow2_zstd_compression()
  tests/qemu-iotests: Move the bash and sanitizer checks to meson.build
  tests/qemu-iotests/meson.build: Improve the indentation

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


Compare: https://github.com/qemu/qemu/compare/591e7bb5fdd1...40a4b96eb08b



reply via email to

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