On 04.05.2017 05:07, Eric Blake wrote: > Although _filter_qemu_img_map documents that it scrubs offsets, it > was only doing so for human mode. Of the existing tests using the > filter (97, 122, 150, 154, 176), two of them are affected, but it > does not hurt the validity of the tests to not require particular > mappings (another test, 66, uses offsets but intentionally does not > pass through _filter_qemu_img_map, because it checks that offsets > are unchanged before and after an operation). > > Another justification for this patch is that it will allow a future > patch to utilize 'qemu-img map --output=json' to check the status of > preallocated zero clusters without regards to the mapping (since > the qcow2 mapping can be very sensitive to the chosen cluster size, > when preallocation is not in use). > > Signed-off-by: Eric Blake <ebl...@redhat.com> > > --- > v12: new patch > --- > tests/qemu-iotests/common.filter | 4 +++- > tests/qemu-iotests/122.out | 16 ++++++++-------- > tests/qemu-iotests/154.out | 30 +++++++++++++++--------------- > 3 files changed, 26 insertions(+), 24 deletions(-) > > diff --git a/tests/qemu-iotests/common.filter > b/tests/qemu-iotests/common.filter > index f58548d..2c14f15 100644 > --- a/tests/qemu-iotests/common.filter > +++ b/tests/qemu-iotests/common.filter > @@ -152,10 +152,12 @@ _filter_img_info() > -e "/log_size: [0-9]\\+/d" > } > > -# filter out offsets and file names from qemu-img map > +# filter out offsets and file names from qemu-img map; good for both > +# human and json output > _filter_qemu_img_map() > { > sed -e 's/\([0-9a-fx]* *[0-9a-fx]* *\)[0-9a-fx]* */\1/g' \ > + -e 's/"offset": [0-9]\+/"offset": OFFSET/g' \> -e 's/Mapped to > *//' | _filter_testdir | _filter_imgfmt
This makes my OCD very sad. With the alignment fixed: Reviewed-by: Max Reitz <mre...@redhat.com> (Without this fixed: Will-change-when-applying-and-then-add-the-R-b) > }
signature.asc
Description: OpenPGP digital signature