mbox series

[0/2] iotests: complicate run_job with this one weird trick?

Message ID 20200226004425.1303-1-jsnow@redhat.com
Headers show
Series iotests: complicate run_job with this one weird trick? | expand

Message

John Snow Feb. 26, 2020, 12:44 a.m. UTC
Requires: 20200225005641.5478-1-jsnow@redhat.com

I'm kidding, but do treat this as an RFC. I doodled a little code
change and wasn't sure if it was appropriate because it's not really a
simplification.

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.

Letmeknowwhatchathink.

John Snow (2):
  iotests: add JobRunner class
  iotests: modify test 040 to use JobRunner

 tests/qemu-iotests/040        |  51 +++++-----
 tests/qemu-iotests/255        |   9 +-
 tests/qemu-iotests/257        |  12 ++-
 tests/qemu-iotests/287        |  19 +++-
 tests/qemu-iotests/iotests.py | 176 ++++++++++++++++++++++++----------
 5 files changed, 183 insertions(+), 84 deletions(-)