Skip to contentSkip to conversation

tests/qemu-iotest: fix iotest 024 with qed images

PATCH In review Alberto Garcia 3 participants 4 messages Nov 12, 2025 – Nov 13, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests/qemu-iotest: fix iotest 024 with qed images

Use 'qemu-io -c map' instead of 'qemu-img map' to get an output that works with both image types.

Cc qemu-stable <[email protected]>
Fixes 909852ba6b4a ("qemu-img rebase: don't exceed IO_BUF_SIZE in one operation")
---
 tests/qemu-iotests/024     | 2 +-
 tests/qemu-iotests/024.out | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)
tests/qemu-iotests/024 +1 -1
index 021169b4a1..10be2bd845 100755
@@ -359,7 +359,7 @@ $QEMU_IO "$OVERLAY" -c "read -P 0x00  0 1M" | _filter_qemu_io
 $QEMU_IO "$OVERLAY" -c "read -P 0xff 1M 2M" | _filter_qemu_io
 $QEMU_IO "$OVERLAY" -c "read -P 0x00 3M 1M" | _filter_qemu_io
 
-$QEMU_IMG map "$OVERLAY" | _filter_qemu_img_map
+$QEMU_IO -c map "$OVERLAY" | _filter_qemu_io
 
 echo
 
tests/qemu-iotests/024.out +1 -2
index 1b7522ba71..da8fedc08b 100644
@@ -266,7 +266,6 @@ read 2097152/2097152 bytes at offset 1048576
 2 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 read 1048576/1048576 bytes at offset 3145728
 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-Offset          Length          File
-0               0x400000        TEST_DIR/subdir/t.IMGFMT
+4 MiB (0x400000) bytes     allocated at offset 0 bytes (0x0)
 
 *** done
Signature · 1 line
2.47.3
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Alberto Garcia

Use 'qemu-io -c map' instead of 'qemu-img map' to get an output that works with both image types.

Cc qemu-stable <[email protected]>
Fixes 909852ba6b4a ("qemu-img rebase: don't exceed IO_BUF_SIZE in one operation")
---
 tests/qemu-iotests/024     | 2 +-
 tests/qemu-iotests/024.out | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)
Signature · 3 lines
Eric Blake, Principal Software Engineer
Red Hat, Inc.
Virtualization:  qemu.org | libguestfs.org
Tested-by on v1 1/1
#2 lore raw
In reply to Alberto Garcia
Quoted 29 lines · Alberto Garcia

Use 'qemu-io -c map' instead of 'qemu-img map' to get an output that works with both image types.

Cc qemu-stable <[email protected]>
Fixes 909852ba6b4a ("qemu-img rebase: don't exceed IO_BUF_SIZE in one operation")
---
  tests/qemu-iotests/024     | 2 +-
  tests/qemu-iotests/024.out | 3 +--
  2 files changed, 2 insertions(+), 3 deletions(-)
tests/qemu-iotests/024 +1 -1
index 021169b4a1..10be2bd845 100755
@@ -359,7 +359,7 @@ $QEMU_IO "$OVERLAY" -c "read -P 0x00  0 1M" | _filter_qemu_io
  $QEMU_IO "$OVERLAY" -c "read -P 0xff 1M 2M" | _filter_qemu_io
  $QEMU_IO "$OVERLAY" -c "read -P 0x00 3M 1M" | _filter_qemu_io
 
-$QEMU_IMG map "$OVERLAY" | _filter_qemu_img_map
+$QEMU_IO -c map "$OVERLAY" | _filter_qemu_io
 
  echo
 
tests/qemu-iotests/024.out +0 -0
index 1b7522ba71..da8fedc08b 100644

tests/qemu-iotests/024.out read 2097152/2097152 bytes at offset 1048576 · line 271

Quoted 8 lines
tests/qemu-iotests/024.out +1 -2
@@ -266,7 +266,6 @@ read 2097152/2097152 bytes at offset 1048576
  2 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
  read 1048576/1048576 bytes at offset 3145728
  1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-Offset          Length          File
-0               0x400000        TEST_DIR/subdir/t.IMGFMT
+4 MiB (0x400000) bytes     allocated at offset 0 bytes (0x0)
 
  *** done

Thanks!

#3 lore raw
Quoted 37 lines · Thomas Huth
Quoted 26 lines · Alberto Garcia

Use 'qemu-io -c map' instead of 'qemu-img map' to get an output that works with both image types.

Cc qemu-stable <[email protected]>
Fixes 909852ba6b4a ("qemu-img rebase: don't exceed IO_BUF_SIZE in one operation")
---
  tests/qemu-iotests/024     | 2 +-
  tests/qemu-iotests/024.out | 3 +--
  2 files changed, 2 insertions(+), 3 deletions(-)
tests/qemu-iotests/024 +1 -1
index 021169b4a1..10be2bd845 100755
@@ -359,7 +359,7 @@ $QEMU_IO "$OVERLAY" -c "read -P 0x00  0 1M" | _filter_qemu_io
  $QEMU_IO "$OVERLAY" -c "read -P 0xff 1M 2M" | _filter_qemu_io
  $QEMU_IO "$OVERLAY" -c "read -P 0x00 3M 1M" | _filter_qemu_io
-$QEMU_IMG map "$OVERLAY" | _filter_qemu_img_map
+$QEMU_IO -c map "$OVERLAY" | _filter_qemu_io
  echo
tests/qemu-iotests/024.out +0 -0
index 1b7522ba71..da8fedc08b 100644

tests/qemu-iotests/024.out read 2097152/2097152 bytes at offset 1048576 · line 270

Quoted 7 lines
tests/qemu-iotests/024.out +1 -2
@@ -266,7 +266,6 @@ read 2097152/2097152 bytes at offset 1048576
  2 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
  read 1048576/1048576 bytes at offset 3145728
  1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-Offset          Length          File
-0               0x400000        TEST_DIR/subdir/t.IMGFMT
+4 MiB (0x400000) bytes     allocated at offset 0 bytes (0x0)
  *** done

Thanks!

Quoted 1 line

Not exactly NBD related, but since I wanted a cleaner iotests run before submitting my pull request, I went ahead and queued this through my tree.

Signature · 3 lines
Eric Blake, Principal Software Engineer
Red Hat, Inc.
Virtualization:  qemu.org | libguestfs.org