On 5/28/20 12:13 PM, Peter Maydell wrote:

v2: fix iotest 190 to not be as sensitive to different sparseness of
qcow2 file on various filesystems, such as FreeBSD (sending only the
changed patch)

----------------------------------------------------------------
bitmaps patches for 2020-05-26

- fix non-blockdev migration of bitmaps when mirror job is in use
- add bitmap sizing to 'qemu-img measure'
- add 'qemu-img convert --bitmaps'


Your fix for iotest 190 doesn't seem to work. Here's the new output
(same on openbsd, freebsd, netbsd):

-required size: SIZE
+required size: 17170432
  fully allocated size: 17170432
  required size: 335806464
  fully allocated size: 2199359062016

I think this is an issue with your sed expression:
+$QEMU_IMG measure -O qcow2 -f raw "$TEST_IMG" |
+    sed '/^required size:/ s/[0-9]\+/SIZE/'

BSD sed seems to strictly implement POSIX basic regexes,
in which '+' is not handled. Compare:

$ echo "required size: 17170432" | sed '/^required size:/ s/[0-9]+/SIZE/'
required size: 17170432
$
$ echo "required size: 17170432" | sed '/^required size:/ s/[0-9][0-9]*/SIZE/'
required size: SIZE

D'oh.  v3 coming up with the long-hand more portable sed usage.

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org


Reply via email to