qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 00/10] iotests: Fix 129 and expand 297’s reach
@ 2021-01-14 17:02 Max Reitz
  2021-01-14 17:02 ` [PATCH v3 01/10] iotests.py: Assume a couple of variables as given Max Reitz
                   ` (10 more replies)
  0 siblings, 11 replies; 29+ messages in thread
From: Max Reitz @ 2021-01-14 17:02 UTC (permalink / raw)
  To: qemu-block
  Cc: Kevin Wolf, Vladimir Sementsov-Ogievskiy, qemu-devel, Max Reitz

Cover letters:
v1: https://lists.nongnu.org/archive/html/qemu-block/2021-01/msg00254.html
v2: https://lists.nongnu.org/archive/html/qemu-block/2021-01/msg00296.html

git:
https://github.com/XanClic/qemu.git fix-129-2-v3
https://git.xanclic.moe/XanClic/qemu.git fix-129-2-v3


Hi,

See the v1 cover letter above for the main point of this series (it’s
just that all patch indices are shifted up by two).


The main change in v2 is the extension of iotest 297 to run pylint and
mypy not only on iotests.py, but on every Python file in the
qemu-iotests/ directory that isn’t part of a skip list.

The main changes in v3 are that 297 is rewritten in Python, that patch 1
is added (which helps tests to pass mypy scrutiny without having to
assert that vital variables such as iotests.test_dir are not None), and
that patch 10 is added (because I was already modifying 300 in patch 1,
so I thought i might as well).


Changes in v3 (from v2):
- Patch 1: Some vital environment variables such as TEST_DIR are
  currently fetched with os.environ.get(), which returns an
  Optional[str] type.  Every test wanting to use them has to assert they
  are not None, or mypy will complain.
  This new patch makes iotests.py use os.environ[] for those vital
  variables instead, which makes them of plain str type.

- Patch 2:
  - Rewrite 297 in Python
  - As in v2, make it check all Python files in qemu-iotests/ by
    default, skipping “only” files given in an explicit list.  This list
    is extremely long right now, but at least patches 9 and 10 make it
    one entry shorter each.
  - Drop the list of checked files from the reference output, because
    that may lead to conflicts when backporting patches etc.

- Patch 9: Drop 'assert iotests.test_dir is not None', because patch 1
  makes that unnecessary.  (Also, some changes in how 297 is treated,
  thanks to the changes in patch 2.)

- Patch 10: When writing patch 1, I looked for iotests that contained
  such 'assert iotests.* is not None' lines, and 300 was the one I
  found.  That made it look to me like it was already written with mypy
  acceptance in mind.  Turned out there were still a couple of things to
  fix, but then I was already working on it and decided there’s no point
  in not making a patch out of it.


git-backport-diff against v2:

Key:
[----] : patches are identical
[####] : number of functional differences between upstream/downstream patch
[down] : patch is downstream-only
The flags [FC] indicate (F)unctional and (C)ontextual differences, respectively

001/10:[down] 'iotests.py: Assume a couple of variables as given'
002/10:[down] 'iotests/297: Rewrite in Python and extend reach'
003/10:[----] [--] 'iotests: Move try_remove to iotests.py'
004/10:[----] [--] 'iotests/129: Remove test images in tearDown()'
005/10:[----] [--] 'iotests/129: Do not check @busy'
006/10:[----] [--] 'iotests/129: Use throttle node'
007/10:[----] [--] 'iotests/129: Actually test a commit job'
008/10:[----] [--] 'iotests/129: Limit mirror job's buffer size'
009/10:[0007] [FC] 'iotests/129: Clean up pylint and mypy complaints'
010/10:[down] 'iotests/300: Clean up pylint and mypy complaints'


Max Reitz (10):
  iotests.py: Assume a couple of variables as given
  iotests/297: Rewrite in Python and extend reach
  iotests: Move try_remove to iotests.py
  iotests/129: Remove test images in tearDown()
  iotests/129: Do not check @busy
  iotests/129: Use throttle node
  iotests/129: Actually test a commit job
  iotests/129: Limit mirror job's buffer size
  iotests/129: Clean up pylint and mypy complaints
  iotests/300: Clean up pylint and mypy complaints

 tests/qemu-iotests/124        |   8 +--
 tests/qemu-iotests/129        |  72 +++++++++++++---------
 tests/qemu-iotests/297        | 109 +++++++++++++++++++++++++++-------
 tests/qemu-iotests/297.out    |   5 +-
 tests/qemu-iotests/300        |  19 ++++--
 tests/qemu-iotests/iotests.py |  37 ++++++------
 6 files changed, 168 insertions(+), 82 deletions(-)

-- 
2.29.2



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

end of thread, other threads:[~2021-01-15 14:51 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-14 17:02 [PATCH v3 00/10] iotests: Fix 129 and expand 297’s reach Max Reitz
2021-01-14 17:02 ` [PATCH v3 01/10] iotests.py: Assume a couple of variables as given Max Reitz
2021-01-15  9:19   ` Vladimir Sementsov-Ogievskiy
2021-01-14 17:02 ` [PATCH v3 02/10] iotests/297: Rewrite in Python and extend reach Max Reitz
2021-01-15 11:13   ` Vladimir Sementsov-Ogievskiy
2021-01-15 11:57     ` Max Reitz
2021-01-15 12:37       ` Vladimir Sementsov-Ogievskiy
2021-01-14 17:02 ` [PATCH v3 03/10] iotests: Move try_remove to iotests.py Max Reitz
2021-01-15 11:14   ` Vladimir Sementsov-Ogievskiy
2021-01-14 17:02 ` [PATCH v3 04/10] iotests/129: Remove test images in tearDown() Max Reitz
2021-01-15 14:48   ` Willian Rampazzo
2021-01-14 17:02 ` [PATCH v3 05/10] iotests/129: Do not check @busy Max Reitz
2021-01-14 17:03 ` [PATCH v3 06/10] iotests/129: Use throttle node Max Reitz
2021-01-15 11:16   ` Vladimir Sementsov-Ogievskiy
2021-01-15 11:58     ` Max Reitz
2021-01-14 17:03 ` [PATCH v3 07/10] iotests/129: Actually test a commit job Max Reitz
2021-01-14 17:03 ` [PATCH v3 08/10] iotests/129: Limit mirror job's buffer size Max Reitz
2021-01-15 14:49   ` Willian Rampazzo
2021-01-14 17:03 ` [PATCH v3 09/10] iotests/129: Clean up pylint and mypy complaints Max Reitz
2021-01-14 20:02   ` Willian Rampazzo
2021-01-15  9:30     ` Max Reitz
2021-01-15 14:43       ` Willian Rampazzo
2021-01-15 11:18   ` Vladimir Sementsov-Ogievskiy
2021-01-14 17:03 ` [PATCH v3 10/10] iotests/300: " Max Reitz
2021-01-15 11:30   ` Vladimir Sementsov-Ogievskiy
2021-01-15 11:59     ` Max Reitz
2021-01-15 11:53 ` [PATCH v3 11/10] iotests: add flake8 linter Vladimir Sementsov-Ogievskiy
2021-01-15 12:03   ` Max Reitz
2021-01-15 13:30     ` Vladimir Sementsov-Ogievskiy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).