From: Max Reitz Date: Fri, 24 Oct 2014 13:57:41 +0000 (+0200) Subject: iotests: Add _filter_qemu_img_map X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=f67ac71edb42f764004a3d4564d2a9f3cdfe59bc;p=qemu.git iotests: Add _filter_qemu_img_map As different image formats most probably map guest addresses to different host addresses, add a filter to filter the host addresses out; also, the image filename should be filtered. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Kevin Wolf Message-id: 1414159063-25977-13-git-send-email-mreitz@redhat.com Signed-off-by: Stefan Hajnoczi --- diff --git a/tests/qemu-iotests/common.filter b/tests/qemu-iotests/common.filter index f69cb6b916..3acdb307f4 100644 --- a/tests/qemu-iotests/common.filter +++ b/tests/qemu-iotests/common.filter @@ -213,5 +213,12 @@ _filter_img_info() -e "s/archipelago:a/TEST_DIR\//g" } +# filter out offsets and file names from qemu-img map +_filter_qemu_img_map() +{ + sed -e 's/\([0-9a-fx]* *[0-9a-fx]* *\)[0-9a-fx]* */\1/g' \ + -e 's/Mapped to *//' | _filter_testdir | _filter_imgfmt +} + # make sure this script returns success /bin/true