From: Max Reitz <mreitz@redhat.com>
To: John Snow <jsnow@redhat.com>, qemu-block@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
qemu-devel@nongnu.org, Eric Blake <eblake@redhat.com>
Subject: Re: [Qemu-devel] [Qemu-block] [PATCH] iotests: Filter second BLOCK_JOB_ERROR from 229
Date: Fri, 1 Feb 2019 15:23:11 +0100 [thread overview]
Message-ID: <c9df3659-ccea-1be9-2feb-31324f8f9559@redhat.com> (raw)
In-Reply-To: <2a6ece79-0e51-4707-2427-57825f957990@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 3333 bytes --]
On 31.01.19 03:21, John Snow wrote:
>
>
> On 1/30/19 6:52 PM, Max Reitz wrote:
>> Without this filter, this test sometimes fails.
>>
>> Signed-off-by: Max Reitz <mreitz@redhat.com>
>> ---
>> I intended to send this as part of my iotest fixes series, but it ended
>> up on the wrong branch... Doesn't really matter, though, as there is no
>> functional dependency.
>> ---
>> tests/qemu-iotests/229 | 6 +++++-
>> tests/qemu-iotests/229.out | 1 -
>> 2 files changed, 5 insertions(+), 2 deletions(-)
>>
>> diff --git a/tests/qemu-iotests/229 b/tests/qemu-iotests/229
>> index 893d098ad2..b0d4885fa6 100755
>> --- a/tests/qemu-iotests/229
>> +++ b/tests/qemu-iotests/229
>> @@ -81,11 +81,15 @@ echo
>> echo '=== Force cancel job paused in error state ==='
>> echo
>>
>> +# Filter out BLOCK_JOB_ERROR events because they may or may not occur.
>> +# Cancelling the job means resuming it for a bit before it is actually
>> +# aborted, and in that time it may or may not re-encounter the error.
>
> Oh, because the job is "paused" and cancelling it involves job_enter,
> which we then allow the job to gracefully fail through it's own pathways
> -- but depending on where it failed originally, it may-or-may-not wind
> up trying something else that fails before it finds the "exit
> gracefully" signal, is that right?
That's at least how I explained it to me, yes.
> I guess there's no real way to adjust that behavior.
>
>> success_or_failure="y" _send_qemu_cmd $QEMU_HANDLE \
>> "{'execute': 'block-job-cancel',
>> 'arguments': { 'device': 'testdisk',
>> 'force': true}}" \
>> - "BLOCK_JOB_CANCELLED" "Assertion"
>> + "BLOCK_JOB_CANCELLED" "Assertion" \
>> + | grep -v '"BLOCK_JOB_ERROR"'
>>
>> # success, all done
>> echo "*** done"
>> diff --git a/tests/qemu-iotests/229.out b/tests/qemu-iotests/229.out
>> index 4c4112805f..a3eb33788a 100644
>> --- a/tests/qemu-iotests/229.out
>> +++ b/tests/qemu-iotests/229.out
>> @@ -17,7 +17,6 @@ wrote 2097152/2097152 bytes at offset 0
>>
>> {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "testdisk"}}
>> {"return": {}}
>> -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_ERROR", "data": {"device": "testdisk", "operation": "write", "action": "stop"}}
>> {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "aborting", "id": "testdisk"}}
>> {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_CANCELLED", "data": {"device": "testdisk", "len": 2097152, "offset": 1048576, "speed": 0, "type": "mirror"}}
>> *** done
>>
>
> I think this is fine, if we cannot help to make this any more
> deterministic, so I'm fine with:
>
> Reviewed-by: John Snow <jsnow@redhat.com>
>
> but I am curious to know if this poses any theoretical problems for
> libvirt having to deal with possibly an extra hiccup before the cancel
> registers.
Hm... I would say the bigger issue is the error event appearing than
that not being the case. Because it appears most of the time, I think
libvirt can deal with it.
Max
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2019-02-01 14:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-30 23:52 [Qemu-devel] [PATCH] iotests: Filter second BLOCK_JOB_ERROR from 229 Max Reitz
2019-01-31 2:21 ` [Qemu-devel] [Qemu-block] " John Snow
2019-02-01 14:23 ` Max Reitz [this message]
2019-01-31 8:59 ` [Qemu-devel] " 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=c9df3659-ccea-1be9-2feb-31324f8f9559@redhat.com \
--to=mreitz@redhat.com \
--cc=eblake@redhat.com \
--cc=jsnow@redhat.com \
--cc=kwolf@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).