[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 02/14] iotests.py: qemu_img*("create"): support IMGOPTS='comp
Re: [PATCH 02/14] iotests.py: qemu_img*("create"): support IMGOPTS='compression_type=zstd'
Mon, 19 Jul 2021 16:51:13 +0300
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0
19.07.2021 15:58, Vladimir Sementsov-Ogievskiy wrote:
Could also be done with something like
imgopts = os.environ.get('IMGOPTS')
imgopts is a string after it. So you don't need to join it?
opts = optstr2dict(','.join(([imgopts] if imgopts else ) + parsed.o))
Build a string to be than parsed looks strange IMHO..
Oh, but that's exactly what I should do anyway to cover several -o options. Now
I see that what you write is correct.
if parsed.f != 'qcow2' or (opts.get('compat') in ['v2', '0.10']):
(Never tested, of course)
Because optstr2dict() prioritizes later options over earlier ones. (Which is
good, because that’s also qemu-img’s behavior.)
Ok, I'll think about this all when prepare v2, and we'll see how it goes
This way you also drop compression_type if test specify it. I think we
shouldn't touch test specified options. Let it clearly fail instead.
We only want to ignore compression_type in IMGOPTS when create non-qcow2 image.
I think I'll drop checking for compat: the only user for this check ic 065 and
it's simpler to explicitly set compression_type in it even for compat=0.10
[PATCH 05/14] iotests.py: filter compression type out, Vladimir Sementsov-Ogievskiy, 2021/07/05
[PATCH 03/14] iotest 303: explicit compression type, Vladimir Sementsov-Ogievskiy, 2021/07/05
[PATCH 07/14] qcow2: simple case support for downgrading of qcow2 images with zstd, Vladimir Sementsov-Ogievskiy, 2021/07/05
[PATCH 12/14] iotests 60: more accurate set dirty bit in qcow2 header, Vladimir Sementsov-Ogievskiy, 2021/07/05
[PATCH 13/14] iotest 39: use _qcow2_dump_header, Vladimir Sementsov-Ogievskiy, 2021/07/05
- [PATCH 06/14] iotest 302: use img_info_log() helper, (continued)