From: Hanna Reitz <hreitz@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>,
qemu-block@nongnu.org
Cc: qemu-devel@nongnu.org, kwolf@redhat.com, thuth@redhat.com,
jsnow@redhat.com, richard.henderson@linaro.org
Subject: Re: [PATCH] iotests: fix copy-before-write for macOS and FreeBSD
Date: Wed, 6 Jul 2022 18:51:44 +0200 [thread overview]
Message-ID: <bde6f81b-af05-ce03-343c-3754ae8a1e4e@redhat.com> (raw)
In-Reply-To: <28788b2a-2144-17e9-b7b0-daf498bcbf49@yandex-team.ru>
On 06.07.22 16:46, Vladimir Sementsov-Ogievskiy wrote:
> On 7/6/22 13:26, Hanna Reitz wrote:
>> On 05.07.22 17:37, Vladimir Sementsov-Ogievskiy wrote:
>>> strerror() represents ETIMEDOUT a bit different in Linux and macOS /
>>> FreeBSD. Let's support the latter too.
>>>
>>> Fixes: 9d05a87b77 ("iotests: copy-before-write: add cases for
>>> cbw-timeout option")
>>> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
>>> ---
>>>
>>> As John and Thomas noted, the new iotests fails for FreeBSD and maxOS.
>>> Here is a fix. Would be great if someone can test it.
>>>
>>> I tried to push it by
>>>
>>> git push --force -o ci.variable="QEMU_CI=1"
>>>
>>> to my block branch, I get a blocked pipeline
>>> https://gitlab.com/vsementsov/qemu/-/pipelines/580573238
>>> but it doesn't have neither freebsd nor macos jobs.. How to get them?
>>>
>>> tests/qemu-iotests/tests/copy-before-write | 5 +++++
>>> 1 file changed, 5 insertions(+)
>>>
>>> diff --git a/tests/qemu-iotests/tests/copy-before-write
>>> b/tests/qemu-iotests/tests/copy-before-write
>>> index 16efebbf8f..56937b9dff 100755
>>> --- a/tests/qemu-iotests/tests/copy-before-write
>>> +++ b/tests/qemu-iotests/tests/copy-before-write
>>> @@ -192,6 +192,11 @@ read 1048576/1048576 bytes at offset 0
>>> def test_timeout_break_guest(self):
>>> log = self.do_cbw_timeout('break-guest-write')
>>> + # macOS and FreeBSD tend to represent ETIMEDOUT as
>>> + # "Operation timed out", when Linux prefer
>>> + # "Connection timed out"
>>> + log = log.replace('Operation timed out',
>>> + 'Connection timed out')
>>
>> If we know for sure that it’s ETIMEDOUT, how about
>> os.strerror(errno.ETIMEDOUT)?
>
> I've checked this with make vm-build-freebsd, but it doesn't work:
>
> ---
> /home/qemu/qemu-test.fxwm16/src/tests/qemu-iotests/tests/copy-before-write.out
> +++
> /usr/home/qemu/qemu-test.fxwm16/build/tests/qemu-iotests/scratch/copy-before-write.out.bad
> @@ -1,5 +1,22 @@
> -....
> +..F.
> +======================================================================
> +FAIL: test_timeout_break_guest (__main__.TestCbwError)
> +----------------------------------------------------------------------
> +Traceback (most recent call last):
> + File
> "/usr/home/qemu/qemu-test.fxwm16/src/tests/qemu-iotests/tests/copy-before-write",
> line 207, in test_timeout_break_guest
> + """)
> +AssertionError: 'wrot[102 chars]led: Connection timed out\nread
> 1048576/104857[73 chars]c)\n' != 'wrot[102 chars]led: Operation timed
> out\nread 1048576/1048576[72 chars]c)\n'
> + wrote 524288/524288 bytes at offset 0
> + 512 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
> +- write failed: Connection timed out
> +? ^^^^ ^
> ++ write failed: Operation timed out
> +? ^^ ^^
> + read 1048576/1048576 bytes at offset 0
> + 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
> +
> +
> ----------------------------------------------------------------------
> Ran 4 tests
>
:(
> Probably pythonic os.strerror doesn't correspond to what we have in C..
Great...
> So, let's just go with my fix.
Sounds good, then.
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
next prev parent reply other threads:[~2022-07-06 16:53 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-05 15:37 [PATCH] iotests: fix copy-before-write for macOS and FreeBSD Vladimir Sementsov-Ogievskiy
2022-07-05 17:22 ` Richard Henderson
2022-07-05 18:18 ` Vladimir Sementsov-Ogievskiy
2022-07-06 7:34 ` Thomas Huth
2022-07-06 8:56 ` Peter Maydell
2022-07-06 7:28 ` Thomas Huth
2022-07-06 10:26 ` Hanna Reitz
2022-07-06 11:29 ` Vladimir Sementsov-Ogievskiy
2022-07-06 14:46 ` Vladimir Sementsov-Ogievskiy
2022-07-06 16:51 ` Hanna Reitz [this message]
2022-07-12 7:15 ` Richard Henderson
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=bde6f81b-af05-ce03-343c-3754ae8a1e4e@redhat.com \
--to=hreitz@redhat.com \
--cc=jsnow@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=thuth@redhat.com \
--cc=vsementsov@yandex-team.ru \
/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).