qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] iotests: complicate run_job with this one weird trick?
@ 2020-02-26  0:44 John Snow
  2020-02-26  0:44 ` [PATCH 1/2] iotests: add JobRunner class John Snow
  2020-02-26  0:44 ` [PATCH 2/2] iotests: modify test 040 to use JobRunner John Snow
  0 siblings, 2 replies; 9+ messages in thread
From: John Snow @ 2020-02-26  0:44 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kevin Wolf, John Snow, qemu-block, Max Reitz

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(-)

-- 
2.21.1



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

end of thread, other threads:[~2020-03-03 21:33 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-26  0:44 [PATCH 0/2] iotests: complicate run_job with this one weird trick? John Snow
2020-02-26  0:44 ` [PATCH 1/2] iotests: add JobRunner class John Snow
2020-02-26 11:18   ` Max Reitz
2020-02-26 17:58     ` John Snow
2020-02-27 11:44       ` Max Reitz
2020-03-03 21:32         ` John Snow
2020-02-26  0:44 ` [PATCH 2/2] iotests: modify test 040 to use JobRunner John Snow
2020-02-26 11:31   ` Max Reitz
2020-02-26 18:04     ` John Snow

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).