qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iotests: fix copy-before-write for macOS and FreeBSD
@ 2022-07-05 15:37 Vladimir Sementsov-Ogievskiy
  2022-07-05 17:22 ` Richard Henderson
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Vladimir Sementsov-Ogievskiy @ 2022-07-05 15:37 UTC (permalink / raw)
  To: qemu-block
  Cc: qemu-devel, hreitz, kwolf, thuth, jsnow, vsementsov,
	richard.henderson

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')
         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)
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2022-07-12  7:23 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2022-07-12  7:15 ` Richard Henderson

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).