From: Kevin Wolf <kwolf@redhat.com>
To: John Snow <jsnow@redhat.com>
Cc: Eduardo Habkost <ehabkost@redhat.com>,
Max Reitz <mreitz@redhat.com>,
qemu-devel@nongnu.org, qemu-block@nongnu.org,
Cleber Rosa <crosa@redhat.com>
Subject: Re: [PATCH v4 3/3] iotests: modify test 040 to use JobRunner
Date: Fri, 15 May 2020 11:46:28 +0200 [thread overview]
Message-ID: <20200515094628.GD93011@linux.fritz.box> (raw)
In-Reply-To: <6f88db54-b311-2952-9bba-0f99df049f44@redhat.com>
Am 14.05.2020 um 21:37 hat John Snow geschrieben:
>
>
> On 5/14/20 11:53 AM, Kevin Wolf wrote:
> > Am 14.05.2020 um 04:25 hat John Snow geschrieben:
> >> Instead of having somewhat reproduced it for itself.
> >>
> >> Signed-off-by: John Snow <jsnow@redhat.com>
> >
> > I think you should pass auto_dismiss=True to the JobRunner, or (probably
> > preferable) change prepare_and_start_job() to start the job with
> > auto_dismiss=False.
> >
> > Kevin
> >
>
> okay, I'll try that out and see if I like it.
>
>
> Wild tangents, as is my normal:
>
> I also think it would be neat, in some sense, to provide a job creation
> abstraction where creating the QMP command in python also creates the
> runner with the right parameters based on how you initialized it.
>
> I've not given these even a proper three minutes think, but some
> generalized interface for managing the creation of jobs to use in
> concert with the job runner would be slick.
JobRunner could have a static method that starts a job (it would take
the same options as qmp() and forward everything to qmp(), except that
it parses auto_* first) and returns a JobRunner object that you can run
later.
> (What reminds me of this is needing to remember and understand if I
> started something with auto_dismiss or not, which jobs it defaults to
> which for, etc. Streamlining the creation and runner could be slick for
> faster test-writing in normative cases.)
Yes.
In general, I think we should keep tests simple (even if that means some
duplication) and avoid overengineering testing infrastructure because we
could well sink more time there than we'll ever get back, but I guess
small and simple wrappers like in this case can't hurt.
Kevin
prev parent reply other threads:[~2020-05-15 9:47 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-14 2:25 [PATCH v4 0/3] iotests: add JobRunner framework John Snow
2020-05-14 2:25 ` [PATCH v4 1/3] qmp.py: change event_wait to use a dict John Snow
2020-05-14 14:47 ` Kevin Wolf
2020-05-14 15:07 ` John Snow
2020-05-14 15:59 ` Kevin Wolf
2020-05-14 19:31 ` John Snow
2020-06-16 21:41 ` Eric Blake
2020-06-17 2:49 ` John Snow
2020-05-14 2:25 ` [PATCH v4 2/3] iotests: add JobRunner class John Snow
2020-05-14 15:40 ` Kevin Wolf
2020-05-14 19:32 ` John Snow
2020-05-14 2:25 ` [PATCH v4 3/3] iotests: modify test 040 to use JobRunner John Snow
2020-05-14 15:53 ` Kevin Wolf
2020-05-14 19:37 ` John Snow
2020-05-15 9:46 ` Kevin Wolf [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200515094628.GD93011@linux.fritz.box \
--to=kwolf@redhat.com \
--cc=crosa@redhat.com \
--cc=ehabkost@redhat.com \
--cc=jsnow@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).