All of lore.kernel.org
 help / color / mirror / Atom feed
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 2/3] iotests: add JobRunner class
Date: Thu, 14 May 2020 17:40:59 +0200	[thread overview]
Message-ID: <20200514154059.GK5518@linux.fritz.box> (raw)
In-Reply-To: <20200514022536.2568-3-jsnow@redhat.com>

Am 14.05.2020 um 04:25 hat John Snow geschrieben:
> The idea is that instead of increasing the arguments to job_run all the
> time, create a more general-purpose job runner that can be subclassed to
> do interesting things with.
> 
> pylint note: the 'callbacks' option guards against unused warning
> arguments in functions designated as callbacks. It does not currently
> guard against "no-self-use" though; hence a once-off ignore.
> 
> mypy note: QapiEvent is only a weak alias; it's fully interchangable
> with the type it's declared as. In the future, we may wish to tighten
> these types. For now, this communicates the rough shape of the type and
> (more importantly) the intent.
> 
> Signed-off-by: John Snow <jsnow@redhat.com>

> +        # Listen for these events with these parameters:
> +        self._events = {
> +            'BLOCK_JOB_COMPLETED': match_device,
> +            'BLOCK_JOB_CANCELLED': match_device,
> +            'BLOCK_JOB_ERROR': match_device,
> +            'BLOCK_JOB_READY': match_device,
> +            'BLOCK_JOB_PENDING': match_id,
> +            'JOB_STATUS_CHANGE': match_id
> +        }

The old code had a trailing comma here in case we need to add more
events later. Anyway:

Reviewed-by: Kevin Wolf <kwolf@redhat.com>



  reply	other threads:[~2020-05-14 15:41 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 [this message]
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

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=20200514154059.GK5518@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.