mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-15 22:21:57 -06:00
iotests: fix copy-before-write for macOS and FreeBSD
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>
Tested-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20220705153708.186418-1-vsementsov@yandex-team.ru>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
f085ba292b
commit
05b47eec90
1 changed files with 5 additions and 0 deletions
|
@ -192,6 +192,11 @@ read 1048576/1048576 bytes at offset 0
|
||||||
|
|
||||||
def test_timeout_break_guest(self):
|
def test_timeout_break_guest(self):
|
||||||
log = self.do_cbw_timeout('break-guest-write')
|
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')
|
||||||
self.assertEqual(log, """\
|
self.assertEqual(log, """\
|
||||||
wrote 524288/524288 bytes at offset 0
|
wrote 524288/524288 bytes at offset 0
|
||||||
512 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
512 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue