public inbox for qemu-trivial@nongnu.org
 help / color / mirror / Atom feed
* [PATCH] tests/qemu-iotests: Use "gsed" for expressions that require GNU sed
@ 2026-01-13 14:14 Thomas Huth
  2026-01-13 14:34 ` Daniel P. Berrangé
  2026-01-14 18:40 ` Eric Blake
  0 siblings, 2 replies; 3+ messages in thread
From: Thomas Huth @ 2026-01-13 14:14 UTC (permalink / raw)
  To: Kevin Wolf, qemu-block; +Cc: Hanna Reitz, qemu-devel, qemu-trivial, Thomas Huth

From: Thomas Huth <thuth@redhat.com>

A bunch of tests are currently failing e.g. on FreeBSD like this:

 082   fail       [13:38:58] [13:38:59]   0.5s                 output
  mismatch (see .../build/tests/qemu-iotests/scratch/qcow2-file-082/082.out.bad)
 --- .../src/tests/qemu-iotests/082.out
 +++ .../build/tests/qemu-iotests/scratch/qcow2-file-082/082.out.bad
 @@ -17,7 +17,7 @@
  cluster_size: 4096
  Format specific information:
      compat: 1.1
 -    compression type: COMPRESSION_TYPE
 +    compression type: zlib
      lazy refcounts: true
      refcount bits: 16
      corrupt: false

This happens because the sed statements require GNU sed. Let's use
gsed in these spots to get it fixed.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 tests/qemu-iotests/286       | 2 +-
 tests/qemu-iotests/common.rc | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/qemu-iotests/286 b/tests/qemu-iotests/286
index 38216c2a0e2..cc6aacf0228 100755
--- a/tests/qemu-iotests/286
+++ b/tests/qemu-iotests/286
@@ -62,7 +62,7 @@ wait=yes _cleanup_qemu
 
 echo 'Output structure:'
 $QEMU_IMG snapshot -l "$TEST_IMG" | tail -n 1 | tr -s ' ' \
-    | sed -e 's/\S\+/./g' \
+    | gsed -e 's/\S\+/./g' \
     | sed -e 's/\./(snapshot ID)/' \
           -e 's/\./(snapshot name)/' \
           -e 's/\./(VM state size value)/' \
diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc
index c0f8f0f8dfa..731e4b2b998 100644
--- a/tests/qemu-iotests/common.rc
+++ b/tests/qemu-iotests/common.rc
@@ -719,7 +719,7 @@ _img_info()
     regex_json_spec_start='^ *"format-specific": \{'
     regex_json_child_start='^ *"children": \['
     $QEMU_IMG info $QEMU_IMG_EXTRA_ARGS "$@" "$TEST_IMG" 2>&1 | \
-        sed -e "s#$REMOTE_TEST_DIR#TEST_DIR#g" \
+        gsed -e "s#$REMOTE_TEST_DIR#TEST_DIR#g" \
             -e "s#$IMGPROTO:$TEST_DIR#TEST_DIR#g" \
             -e "s#$TEST_DIR#TEST_DIR#g" \
             -e "s#$SOCK_DIR/fuse-#TEST_DIR/#g" \
-- 
2.52.0



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

end of thread, other threads:[~2026-01-14 18:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-13 14:14 [PATCH] tests/qemu-iotests: Use "gsed" for expressions that require GNU sed Thomas Huth
2026-01-13 14:34 ` Daniel P. Berrangé
2026-01-14 18:40 ` Eric Blake

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox