From 002375895c10df40615fc615e2639f49e0c442fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Benn=C3=A9e?= Date: Tue, 25 Feb 2020 20:20:09 +0000 Subject: [PATCH] tests/iotests: be a little more forgiving on the size test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit At least on ZFS this was failing as 512 was less than or equal to 512. I suspect the reason is additional compression done by ZFS and however qemu-img gets the actual size. Loosen the criteria to make sure after is not bigger than before and also dump the values in the report. Signed-off-by: Alex Bennée Reviewed-by: Robert Foley Reviewed-by: Stefan Berger Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20200225124710.14152-9-alex.bennee@linaro.org> --- tests/qemu-iotests/214 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/214 b/tests/qemu-iotests/214 index 3500e0c47a..af677d90b8 100755 --- a/tests/qemu-iotests/214 +++ b/tests/qemu-iotests/214 @@ -125,9 +125,9 @@ $QEMU_IO -c "write -P 0xcc $offset $data_size" "json:{\ sizeB=$($QEMU_IMG info --output=json "$TEST_IMG" | sed -n '/"actual-size":/ s/[^0-9]//gp') -if [ $sizeA -le $sizeB ] +if [ $sizeA -lt $sizeB ] then - echo "Compression ERROR" + echo "Compression ERROR ($sizeA < $sizeB)" fi $QEMU_IMG check --output=json "$TEST_IMG" |