Browse Source

tests/qemu-iotests: Use "gsed" for expressions that require GNU sed

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>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
pull/316/head
Thomas Huth 3 months ago
committed by Michael Tokarev
parent
commit
28e8b25f7d
  1. 2
      tests/qemu-iotests/286
  2. 2
      tests/qemu-iotests/common.rc

2
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)/' \

2
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" \

Loading…
Cancel
Save