Philippe Mathieu-Daudé <phi...@linaro.org> writes: > Hi Steve, > > On 8/7/25 19:24, Steve Sistare wrote: >> Add a unit test for qom-list-getv. >> Signed-off-by: Steve Sistare <steven.sist...@oracle.com> >> --- >> tests/qtest/qom-test.c | 64 >> ++++++++++++++++++++++++++++++++++++++++++++++++++ >> 1 file changed, 64 insertions(+) >> diff --git a/tests/qtest/qom-test.c b/tests/qtest/qom-test.c >> index 27d70bc..4defff1 100644 >> --- a/tests/qtest/qom-test.c >> +++ b/tests/qtest/qom-test.c >> @@ -11,11 +11,72 @@ >> #include "qobject/qdict.h" >> #include "qobject/qlist.h" >> +#include "qobject/qstring.h" >> #include "qemu/cutils.h" >> #include "libqtest.h" >> static int verbosity_level; >> +static void test_getv(QTestState *qts, QList *paths) >> +{ >> + QListEntry *entry, *prop_entry, *path_entry; >> + g_autoptr(QDict) response = NULL; >> + QDict *args = qdict_new(); >> + QDict *prop; >> + QList *return_list; >> + >> + if (verbosity_level >= 2) { > > Tested-by: Philippe Mathieu-Daudé <phi...@linaro.org> > > But I note this doesn't assert anything except if you use V=3 and > look at the output. > > Maybe stick it to a particular machine and check for a particular > path and its properties?
Or create some suitable thing with -object, and get that. No machine dependence. [...]