QDict *response, *tuple, *tmp;
QList *list;
QListEntry *entry;
+ GSList *children = NULL, *links = NULL;
g_test_message("Obtaining properties of %s", path);
response = qtest_qmp(qts, "{ 'execute': 'qom-list',"
if (is_child || is_link) {
child_path = g_strdup_printf("%s/%s",
path, qdict_get_str(tuple, "name"));
- test_properties(qts, child_path, is_child);
- g_free(child_path);
+ if (is_child) {
+ children = g_slist_prepend(children, child_path);
+ } else {
+ links = g_slist_prepend(links, child_path);
+ }
} else {
const char *prop = qdict_get_str(tuple, "name");
- g_test_message("Testing property %s.%s", path, prop);
+ g_test_message("-> %s", prop);
tmp = qtest_qmp(qts,
"{ 'execute': 'qom-get',"
" 'arguments': { 'path': %s, 'property': %s } }",
qobject_unref(tmp);
}
}
+
+ while (links) {
+ test_properties(qts, links->data, false);
+ g_free(links->data);
+ links = g_slist_delete_link(links, links);
+ }
+ while (children) {
+ test_properties(qts, children->data, true);
+ g_free(children->data);
+ children = g_slist_delete_link(children, children);
+ }
+
qobject_unref(response);
}