Skip to contentSkip to conversation

tests/qmp-cmd-test: Simplify @qapi-type test

PATCH In review Markus Armbruster 2 participants 2 messages Nov 17

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests/qmp-cmd-test: Simplify @qapi-type test

test_qapi_type() checks that if @qapi-type is present, it resolves in output of query-qmp-schema. Absent @qapi-type is reported with g_test_message except for child and link properties.

The exception became useless when we implemented @qapi-type for child and link properties. Drop it.

Fixes 6955264d5821 ("qom: Convert child and link properties to QAPI-aware registration")
---
 tests/qtest/qmp-cmd-test.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
tests/qtest/qmp-cmd-test.c +1 -2
index acb7b0dd6a9..5138582bb3f 100644
@@ -384,8 +384,7 @@ static void test_qapi_type(void)
 
             if (qapi_type) {
                 g_assert_nonnull(qmp_schema_lookup(&schema, qapi_type));
-            } else if (!g_str_has_prefix(ty, "child<") &&
-                       !g_str_has_prefix(ty, "link<")) {
+            } else {
                 g_test_message("%s.%s %s has no associated qapi-type",
                                name, propname, ty);
             }
Signature · 1 line
2.55.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Markus Armbruster

test_qapi_type() checks that if @qapi-type is present, it resolves in output of query-qmp-schema. Absent @qapi-type is reported with g_test_message except for child and link properties.

Quoted 8 lines

The exception became useless when we implemented @qapi-type for child and link properties. Drop it.

Fixes 6955264d5821 ("qom: Convert child and link properties to QAPI-aware registration")
---
 tests/qtest/qmp-cmd-test.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

With regards,
Daniel

Signature · 3 lines
|: https://berrange.com       ~~        https://hachyderm.io/@berrange :|
|: https://libvirt.org          ~~          https://entangle-photo.org :|
|: https://pixelfed.art/berrange   ~~    https://fstop138.berrange.com :|