diff options
author | Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> | 2022-07-05 18:37:08 +0300 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2022-07-12 13:21:02 +0530 |
commit | 05b47eec90849b9b40c95f7ab52377385c6c64e2 (patch) | |
tree | 21d241f05473b646d918f6081f28d568024d5e70 | |
parent | f085ba292bb399b029add02269dd395b16d211bd (diff) | |
download | qemu-05b47eec90849b9b40c95f7ab52377385c6c64e2.zip qemu-05b47eec90849b9b40c95f7ab52377385c6c64e2.tar.gz qemu-05b47eec90849b9b40c95f7ab52377385c6c64e2.tar.bz2 |
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>
-rwxr-xr-x | tests/qemu-iotests/tests/copy-before-write | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/qemu-iotests/tests/copy-before-write b/tests/qemu-iotests/tests/copy-before-write index 16efebb..56937b9 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') self.assertEqual(log, """\ wrote 524288/524288 bytes at offset 0 512 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) |