iotests: add JobRunner framework
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest3 patches 11 repliesIn review
- v33 patches 0 repliesSuperseded
- v23 patches 0 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 | 2 patches | 6 replies | Superseded |
Changes in v4 from the cover letter
- Rebased on current master.
- Converted new usages is test 055.
Patches in v4 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | qmp.py: change event_wait to use a dictpython/ tests/ tests/ +1 more | +22 | 6 replies | |
| 2/3 | iotests: add JobRunner classtests/ tests/ tests/ +3 more | +225 | 2 replies | |
| 3/3 | iotests: modify test 040 to use JobRunnertests/ | +25 | 3 replies |
Reviews trailers per patch
1 of 3 patches has a Reviewed-by or Acked-by.
| Patch | Kevin Wolf |
|---|---|
| 1/3 | |
| 2/3 | R-b |
| 3/3 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v4 0/3] iotests: add JobRunner framework
The basic idea is to make a generic job runtime manager and allow callers to subclass the manager. Then, instead of adding callback arguments to the function all the time, we have à la carte customization of the loop.
To showcase this a little bit, I removed the pre_finalization argument and made existing callers use a custom JobRunner; and then converted test 040 to use this style of job runner.
Is it a simplification? No. Is it cool? Maybe. Did it remove the duplicated job-running code in 040? yes.
As of V4, I'm not sure I really want to pursue this at the moment; it does feel a bit harder to use than the old interface; though it's more "complete". I might look into refining the idea and trying to include it directly in python/qemu; and providing some more 'bespoke' wrappers in iotests that make using it in the test framework a little less cumbersome.
Regardless, I am posting it to the list for archiving for now.
v4:
- Rebased on current master.
- Converted new usages is test 055.
V3:
- Rebased on logging series v8
- Converted 155's new usage of job_run
V2:
- Rebased on logging series; logging conditionals are pretty now.
- Inlined callback login in 257
- No longer based on bitmap-populate job (no test 287)
- Moved super() call to the beginning of test 040's callback
- Added docstrings and type annotations
John Snow (3):
qmp.py: change event_wait to use a dict
iotests: add JobRunner class
iotests: modify test 040 to use JobRunner
python/qemu/machine.py | 10 +- tests/qemu-iotests/040 | 51 +++++---- tests/qemu-iotests/055 | 17 +-- tests/qemu-iotests/155 | 11 +- tests/qemu-iotests/255 | 9 +- tests/qemu-iotests/257 | 54 +++++---- tests/qemu-iotests/260 | 5 +- tests/qemu-iotests/iotests.py | 206 +++++++++++++++++++++++++--------- tests/qemu-iotests/pylintrc | 11 ++ 9 files changed, 258 insertions(+), 116 deletions(-)
Signature · 1 line
2.21.1