[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/1] tests/qtest: add scenario for -readconfig handling
From: |
Markus Armbruster |
Subject: |
Re: [PATCH 1/1] tests/qtest: add scenario for -readconfig handling |
Date: |
Tue, 09 Aug 2022 08:18:35 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) |
Daniel P. Berrangé <berrange@redhat.com> writes:
> On Mon, Aug 08, 2022 at 07:55:50AM +0200, Thomas Huth wrote:
>> On 05/08/2022 13.55, Daniel P. Berrangé wrote:
>> > This test of -readconfig validates the last three regressions we
>> > have fixed with -readconfig:
>> >
>> > * Interpretation of memory size units as MiB not bytes
>> > * Allow use of [spice]
>> > * Allow use of [object]
>>
>> Good idea!
>>
>> > Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
[...]
>> > diff --git a/tests/qtest/readconfig-test.c b/tests/qtest/readconfig-test.c
>> > new file mode 100644
>> > index 0000000000..2e604d7c2d
>> > --- /dev/null
>> > +++ b/tests/qtest/readconfig-test.c
[...]
>> > +#ifdef CONFIG_SPICE
>> > +static void test_spice_resp(QObject *res)
>> > +{
>> > + Visitor *v;
>> > + g_autoptr(SpiceInfo) spice = NULL;
>> > +
>> > + g_assert(res);
>> > + v = qobject_input_visitor_new(res);
>> > + visit_type_SpiceInfo(v, "spcie", &spice, &error_abort);
>>
>> That "spcie" looks like a typo?
>
> Yes, but I believe this argument is ignored by the visitor in this
> scenario - it didn't fail for me at least.
include/qapi/visitor.h:
* The @name parameter of visit_type_FOO() describes the relation
* between this QAPI value and its parent container. When visiting
* the root of a tree, @name is ignored; when visiting a member of an
* object, @name is the key associated with the value; when visiting a
* member of a list, @name is NULL; and when visiting the member of an
* alternate, @name should equal the name used for visiting the
* alternate.
> Regardless, sHould be fixed of course
>
>
> With regards,
> Daniel