qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: John Snow <jsnow@redhat.com>
To: Kevin Wolf <kwolf@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 15:32:25 -0400	[thread overview]
Message-ID: <4c54f13d-d8db-ee00-798d-bbda7a05a99c@redhat.com> (raw)
In-Reply-To: <20200514154059.GK5518@linux.fritz.box>



On 5/14/20 11:40 AM, Kevin Wolf wrote:
> 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>
> 

Whoops. I favor those too, so I'll put it back.



  reply	other threads:[~2020-05-14 19:40 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 [this message]
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=4c54f13d-d8db-ee00-798d-bbda7a05a99c@redhat.com \
    --to=jsnow@redhat.com \
    --cc=crosa@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=kwolf@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).