On Mon 26 Feb 2018 04:12:22 PM CET, Eric Blake wrote:
>> +# Create an empty image, fill half of it with data and compress it.
>> +# The L2 entries of the two compressed clusters are located at
>> +# 0x800000 and 0x800008, their original values are 0x4008000000a00000
>> +# and 0x4008000000a00802 (5 sectors for compressed data each).
>> +TEST_IMG="$TEST_IMG".1 _make_test_img 8M
>> +$QEMU_IO -c "write -P 0x11 0 4M" "$TEST_IMG".1 2>&1 | _filter_qemu_io | 
>> _filter_testdir
>> +$QEMU_IMG convert -c -O qcow2 -o cluster_size=2M "$TEST_IMG".1 "$TEST_IMG"
>
> Is it worth a $QEMU_IO -c "read -v 0x800000 16" so that our .out file
> validates that we indeed see the values we expect (if some other qcow2
> change causes us to stick the L2 table at a different offset, the
> verbose read will make it a bit more obvious why this test starts
> failing).

I don't think it's necessary, the success of the rest of the tests after
this one requires that we modify these exact L2 entries. If we're
touching something else then one of them will fail.

Berto

Reply via email to