On 9/7/25 17:17, Steven Sistare wrote:
On 7/8/2025 6:02 PM, Philippe Mathieu-Daudé wrote:
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.
I don't follow. It unconditionally traverses the whole tree and asserts
that properties are present. Plus, for V >= 2, it prints paths.
It is patterned after test_properties() in the same file.
Indeed, sorry. Good enough for me then, so:
Reviewed-by: Philippe Mathieu-Daudé <phi...@linaro.org>