[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 10/21] iotests: Replace IMGOPTS= by -o
From: |
Max Reitz |
Subject: |
Re: [PATCH v2 10/21] iotests: Replace IMGOPTS= by -o |
Date: |
Thu, 7 Nov 2019 10:20:59 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1 |
On 06.11.19 16:47, Maxim Levitsky wrote:
> On Tue, 2019-10-15 at 16:27 +0200, Max Reitz wrote:
>> Tests should not overwrite all user-supplied image options, but only add
>> to it (which will effectively overwrite conflicting values). Accomplish
>> this by passing options to _make_test_img via -o instead of $IMGOPTS.
>>
>> For some tests, there is no functional change because they already only
>> appended options to IMGOPTS. For these, this patch is just a
>> simplification.
>>
>> For others, this is a change, so they now heed user-specified $IMGOPTS.
>> Some of those tests do not work with all image options, though, so we
>> need to disable them accordingly.
>>
>> Signed-off-by: Max Reitz <address@hidden>
>> ---
>> tests/qemu-iotests/031 | 9 ++++---
>> tests/qemu-iotests/039 | 24 ++++++------------
>> tests/qemu-iotests/059 | 18 ++++++-------
>> tests/qemu-iotests/060 | 6 ++---
>> tests/qemu-iotests/061 | 57 ++++++++++++++++++++++--------------------
>> tests/qemu-iotests/079 | 3 +--
>> tests/qemu-iotests/106 | 2 +-
>> tests/qemu-iotests/108 | 2 +-
>> tests/qemu-iotests/112 | 32 ++++++++++++------------
>> tests/qemu-iotests/115 | 3 +--
>> tests/qemu-iotests/121 | 6 ++---
>> tests/qemu-iotests/125 | 2 +-
>> tests/qemu-iotests/137 | 2 +-
>> tests/qemu-iotests/138 | 3 +--
>> tests/qemu-iotests/175 | 2 +-
>> tests/qemu-iotests/190 | 2 +-
>> tests/qemu-iotests/191 | 3 +--
>> tests/qemu-iotests/220 | 4 ++-
>> tests/qemu-iotests/243 | 6 +++--
>> tests/qemu-iotests/244 | 10 +++++---
>> tests/qemu-iotests/250 | 3 +--
>> tests/qemu-iotests/265 | 2 +-
>> 22 files changed, 100 insertions(+), 101 deletions(-)
[...]
>> @@ -161,7 +161,7 @@ _cleanup_test_img
>>
>> echo
>> echo "=== Testing 4TB monolithicFlat creation and IO ==="
>> -IMGOPTS="subformat=monolithicFlat" _make_test_img 4T
>> +_make_test_img -o "subformat=monolithicFlat" 4T
>> _img_info
>> $QEMU_IO -c "write -P 0xa 900G 512" "$TEST_IMG" | _filter_qemu_io
>> $QEMU_IO -c "read -v 900G 1024" "$TEST_IMG" | _filter_qemu_io
>> @@ -170,7 +170,7 @@ _cleanup_test_img
>> echo
>> echo "=== Testing qemu-img map on extents ==="
>> for fmt in monolithicSparse twoGbMaxExtentSparse; do
>> - IMGOPTS="subformat=$fmt" _make_test_img 31G
>> + _make_test_img -o "subformat=$fmt" 31G
>> $QEMU_IO -c "write 65024 1k" "$TEST_IMG" | _filter_qemu_io
>> $QEMU_IO -c "write 2147483136 1k" "$TEST_IMG" | _filter_qemu_io
>> $QEMU_IO -c "write 5G 1k" "$TEST_IMG" | _filter_qemu_io
>
> Looks good. Another test that pokes at guessed locations... :-)
Actually, no. These are writes on the format, not the file itself. The
monolithicSparse subformat will store everything in a single file,
whereas twoGbMaxExtentSparse will create one file per 2 GB of guest
disk. So the locations are chosen accordingly to that 2 GB limit ((1)
something somewhere in the first extent, (2) something that wraps around
the first 2 GB limit, so hits extents #0 and #1, and (3) something in
the middle of extent #2.)
(The following qemu-img map call then verifies that it lands in the
different files for twoGbMaxExtentSparse, and that monolithicSparse is
at least indeed sparsely allocated.)
Max
signature.asc
Description: OpenPGP digital signature