On Wed, 07/27 16:51, Reda Sallahi wrote: > +for skip in $TEST_SKIP_BLOCKS; do > + echo > + echo "== Creating image ==" > + > + size=1M > + _make_test_img $size > + _check_test_img > + $QEMU_IO -c "write -P 0xa 0 $size" "$TEST_IMG" | _filter_qemu_io
I think the data pattern could to be made less plain (i.e. add some variantion based on the offset), to catch any misplacement bug in qemu-img dd (for example off by one errors). Fam > + > + echo > + echo "== Converting the image with dd with skip=$skip ==" > + > + $QEMU_IMG dd if="$TEST_IMG" of="$TEST_IMG.out" skip="$skip" -O "$IMGFMT" > \ > + 2> /dev/null > + $QEMU_IMG check "$TEST_IMG.out" -f "$IMGFMT" 2>&1 | _filter_testdir | \ > + _filter_qemu_img_check > + dd if="$TEST_IMG" of="$TEST_IMG.out.dd" skip="$skip" status=none > + echo > + echo "== Compare the images with qemu-img compare ==" > + > + $QEMU_IMG compare "$TEST_IMG.out.dd" "$TEST_IMG.out" > +done
