mbox series

[00/18] iotests: Allow ./check -o data_file

Message ID 20190927094242.11152-1-mreitz@redhat.com (mailing list archive)
Headers show
Series iotests: Allow ./check -o data_file | expand

Message

Max Reitz Sept. 27, 2019, 9:42 a.m. UTC
Hi,

It’s my understanding that we want better test coverage for qcow2’s
external data files.  I think the natural thing to do is to let all
tests create images with external data files.

We already have the -o option for ./check for additional image options
(and I regularly use it for recount_bits=1 and compat=0.10).
Unfortunately, we cannot use it directly for data_file, because of
course every test image needs its own data file.  What I think we want
is a pattern: Something like -o 'data_file=$TEST_IMG.data_file', and
then “$TEST_IMG” is replaced by the qcow2 image name.

This is done by the final patch in this series.  There is a lot of
preparatory work to be done, though.

(1) Some tests overwrite IMGOPTS.  This will make them ignore
    user-specified options.  That was always a problem (that means those
    tests ignored my pleas for refcount_bits=1 and compat=0.10) but
    someone needs to fix this at some point, and I guess that’s me right
    now.
    So we need to stop tests from overwriting IMGOPTS.  This is done by
    patches 1 through 9.

    In addition, patch 10 fixes other cases where user-specified options
    are ignored (because some tests use qemu-img create directly instead
    of _make_test_img).

(2) Some tests access image files directly.  This can only work for
    images without external data files.  There are two subcases:
    (A) rm: Fixed by patch 11
    (B) cp/mv: Fixed by patch 12

(3) Some tests are broken with data_file, but we can fix it.  Done by
    patches 13 through 16.

(4) Some tests are broken with data_file, and I don’t think we can fix
    it.  So patch 17 adds _unsupported_imgopts data_file for them.

(5) And then there’s patch 18, which does what we really want.


Future work:
- Python tests currently completely ignore IMGOPTS.  Preexisting
  problem, needs to be addressed in another series, but for the moment
  it at least means they won’t break if you run the tests with
  data_file.

- data_file_raw=on needs to be addressed in another series.  I suspect
  this will mainly consist of making it unsupported in all tests that
  use backing files.


Max Reitz (18):
  iotests: Filter refcount_order in 036
  iotests: Replace IMGOPTS by _unsupported_imgopts
  iotests: Drop compat=1.1 in 050
  iotests: Let _make_test_img parse its parameters
  iotests: Add -o and --no-opts to _make_test_img
  iotests: Inject space into -ocompat=0.10 in 051
  iotests: Replace IMGOPTS= by -o
  iotests: Replace IMGOPTS='' by --no-opts
  iotests: Drop IMGOPTS use in 267
  iotests: Avoid qemu-img create
  iotests: Use _rm_test_img for deleting test images
  iotests: Avoid cp/mv of test images
  iotests: Make 091 work with data_file
  iotests: Make 110 work with data_file
  iotests: Make 137 work with data_file
  iotests: Make 198 work with data_file
  iotests: Disable data_file where it cannot be used
  iotests: Allow check -o data_file

 tests/qemu-iotests/005           |  2 +-
 tests/qemu-iotests/007           |  5 +--
 tests/qemu-iotests/014           |  2 ++
 tests/qemu-iotests/015           |  5 +--
 tests/qemu-iotests/019           |  6 ++--
 tests/qemu-iotests/020           |  6 ++--
 tests/qemu-iotests/024           | 10 +++---
 tests/qemu-iotests/026           |  5 ++-
 tests/qemu-iotests/028           |  2 +-
 tests/qemu-iotests/029           |  7 ++--
 tests/qemu-iotests/031           |  9 +++--
 tests/qemu-iotests/036           | 15 ++++----
 tests/qemu-iotests/036.out       |  6 ++--
 tests/qemu-iotests/039           | 27 ++++++--------
 tests/qemu-iotests/043           |  4 ++-
 tests/qemu-iotests/046           |  2 ++
 tests/qemu-iotests/048           |  4 ++-
 tests/qemu-iotests/050           |  8 ++---
 tests/qemu-iotests/051           |  7 ++--
 tests/qemu-iotests/053           |  4 +--
 tests/qemu-iotests/058           |  7 ++--
 tests/qemu-iotests/059           | 20 +++++------
 tests/qemu-iotests/060           | 12 ++++---
 tests/qemu-iotests/061           | 61 +++++++++++++++++---------------
 tests/qemu-iotests/062           |  3 +-
 tests/qemu-iotests/063           | 18 +++++-----
 tests/qemu-iotests/063.out       |  3 +-
 tests/qemu-iotests/066           |  3 +-
 tests/qemu-iotests/067           |  6 ++--
 tests/qemu-iotests/068           |  4 ++-
 tests/qemu-iotests/069           |  2 +-
 tests/qemu-iotests/071           |  7 ++--
 tests/qemu-iotests/073           |  2 ++
 tests/qemu-iotests/074           |  4 ++-
 tests/qemu-iotests/079           |  3 +-
 tests/qemu-iotests/080           |  7 ++--
 tests/qemu-iotests/081           |  6 ++--
 tests/qemu-iotests/085           | 18 +++++-----
 tests/qemu-iotests/085.out       |  8 ++---
 tests/qemu-iotests/088           |  2 +-
 tests/qemu-iotests/090           |  2 ++
 tests/qemu-iotests/091           |  3 +-
 tests/qemu-iotests/091.out       |  1 -
 tests/qemu-iotests/092           |  2 +-
 tests/qemu-iotests/094           |  4 +--
 tests/qemu-iotests/095           |  5 +--
 tests/qemu-iotests/098           |  5 +--
 tests/qemu-iotests/099           | 10 +++---
 tests/qemu-iotests/103           |  5 +--
 tests/qemu-iotests/106           |  2 +-
 tests/qemu-iotests/108           |  8 +++--
 tests/qemu-iotests/109           |  4 +--
 tests/qemu-iotests/110           | 11 +++---
 tests/qemu-iotests/110.out       |  4 +--
 tests/qemu-iotests/111           |  3 +-
 tests/qemu-iotests/112           | 37 +++++++++----------
 tests/qemu-iotests/114           |  2 ++
 tests/qemu-iotests/115           |  3 +-
 tests/qemu-iotests/121           |  9 +++--
 tests/qemu-iotests/122           |  6 ++--
 tests/qemu-iotests/123           |  4 +--
 tests/qemu-iotests/125           |  2 +-
 tests/qemu-iotests/137           | 12 ++++---
 tests/qemu-iotests/137.out       |  4 +--
 tests/qemu-iotests/138           |  5 +--
 tests/qemu-iotests/141           |  4 ++-
 tests/qemu-iotests/142           |  2 +-
 tests/qemu-iotests/144           |  4 ++-
 tests/qemu-iotests/153           | 12 +++----
 tests/qemu-iotests/156           | 10 ++++--
 tests/qemu-iotests/159           |  2 +-
 tests/qemu-iotests/160           |  3 +-
 tests/qemu-iotests/161           |  4 +--
 tests/qemu-iotests/170           |  2 +-
 tests/qemu-iotests/172           |  6 ++--
 tests/qemu-iotests/173           |  3 +-
 tests/qemu-iotests/174           |  2 +-
 tests/qemu-iotests/175           |  2 +-
 tests/qemu-iotests/176           |  7 ++--
 tests/qemu-iotests/178           |  6 ++--
 tests/qemu-iotests/182           |  2 +-
 tests/qemu-iotests/183           |  2 +-
 tests/qemu-iotests/185           |  4 +--
 tests/qemu-iotests/187           |  6 ++--
 tests/qemu-iotests/190           |  4 +--
 tests/qemu-iotests/191           | 11 +++---
 tests/qemu-iotests/195           |  2 +-
 tests/qemu-iotests/197           |  6 ++--
 tests/qemu-iotests/198           |  6 ++--
 tests/qemu-iotests/198.out       |  4 +--
 tests/qemu-iotests/200           |  7 ++--
 tests/qemu-iotests/201           |  6 ++--
 tests/qemu-iotests/214           |  3 +-
 tests/qemu-iotests/215           |  6 ++--
 tests/qemu-iotests/217           |  3 +-
 tests/qemu-iotests/220           |  5 ++-
 tests/qemu-iotests/225           |  2 +-
 tests/qemu-iotests/229           |  3 +-
 tests/qemu-iotests/232           |  4 ++-
 tests/qemu-iotests/243           | 10 ++++--
 tests/qemu-iotests/244           | 15 ++++----
 tests/qemu-iotests/247           |  4 ++-
 tests/qemu-iotests/249           |  4 +--
 tests/qemu-iotests/250           |  5 +--
 tests/qemu-iotests/252           |  2 +-
 tests/qemu-iotests/265           |  2 +-
 tests/qemu-iotests/267           | 17 +++++----
 tests/qemu-iotests/common.filter | 21 +++++++++--
 tests/qemu-iotests/common.rc     | 51 +++++++++++++++++++++-----
 109 files changed, 455 insertions(+), 316 deletions(-)