[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] qapi: Improve input_type_enum()'s error message
From: |
Markus Armbruster |
Subject: |
Re: [PATCH] qapi: Improve input_type_enum()'s error message |
Date: |
Tue, 12 Oct 2021 14:06:23 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) |
Kevin Wolf <kwolf@redhat.com> writes:
> Am 11.10.2021 um 15:15 hat Markus Armbruster geschrieben:
>> The error message claims the parameter is invalid:
>>
>> $ qemu-system-x86_64 -object qom-type=nonexistent
>> qemu-system-x86_64: -object qom-type=nonexistent: Invalid parameter
>> 'nonexistent'
>>
>> What's wrong is actually the *value* 'nonexistent'. Improve the
>> message to
>>
>> qemu-system-x86_64: -object qom-type=nonexistent: Parameter 'qom-type'
>> does not accept value 'nonexistent'
>>
>> Signed-off-by: Markus Armbruster <armbru@redhat.com>
>> ---
>> qapi/qapi-visit-core.c | 3 ++-
>> tests/unit/check-qom-proplist.c | 2 +-
>> tests/qemu-iotests/049.out | 6 +++---
>> tests/qemu-iotests/206.out | 2 +-
>> tests/qemu-iotests/237.out | 6 +++---
>> tests/qemu-iotests/245 | 2 +-
>
> Good that you remembered to update iotests cases. I'm afraid there are
> two more that need an update.
>
> 287 contains these lines:
>
> output=$(_make_test_img -o 'compression_type=zstd' 64M; _cleanup_test_img)
> if echo "$output" | grep -q "Invalid parameter 'zstd'"; then
> _notrun "ZSTD is disabled"
> fi
>
> Instead of skipping the test case when zstd support is not compiled in,
> this test fails now.
>
> 308 contains a similar check for FUSE support and fails now when FUSE
> support is disabled.
287 passes for me. I figure that's because I built with CONFIG_ZSTD.
308 I simply missed.
Thanks for your help!