[PATCH 3/5] qtest/qom-test: Traverse entire QOM tree

Markus Armbruster posted 5 patches 3 months, 3 weeks ago
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>, Eduardo Habkost <eduardo@habkost.net>, Fabiano Rosas <farosas@suse.de>, Laurent Vivier <lvivier@redhat.com>
[PATCH 3/5] qtest/qom-test: Traverse entire QOM tree
Posted by Markus Armbruster 3 months, 3 weeks ago
This test traverses the QOM sub-tree rooted at /machine.  Traverse the
entire tree instead.

The x86_64 test runs some 40 additional QMP commands, and stays under
5s for me.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 tests/qtest/qom-test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/qtest/qom-test.c b/tests/qtest/qom-test.c
index 40bdc3639f..d358b69c7e 100644
--- a/tests/qtest/qom-test.c
+++ b/tests/qtest/qom-test.c
@@ -211,7 +211,7 @@ static void test_machine(gconstpointer data)
 
     test_properties(qts, "/machine", true);
 
-    qlist_append_str(paths, "/machine");
+    qlist_append_str(paths, "/");
     test_list_get(qts, paths);
     test_list_get_value(qts);
 
-- 
2.49.0
Re: [PATCH 3/5] qtest/qom-test: Traverse entire QOM tree
Posted by Steven Sistare 3 months, 1 week ago
On 7/25/2025 9:50 AM, Markus Armbruster wrote:
> This test traverses the QOM sub-tree rooted at /machine.  Traverse the
> entire tree instead.
> 
> The x86_64 test runs some 40 additional QMP commands, and stays under
> 5s for me.
> 
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
>   tests/qtest/qom-test.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/qtest/qom-test.c b/tests/qtest/qom-test.c
> index 40bdc3639f..d358b69c7e 100644
> --- a/tests/qtest/qom-test.c
> +++ b/tests/qtest/qom-test.c
> @@ -211,7 +211,7 @@ static void test_machine(gconstpointer data)
>   
>       test_properties(qts, "/machine", true);
>   
> -    qlist_append_str(paths, "/machine");
> +    qlist_append_str(paths, "/");
>       test_list_get(qts, paths);
>       test_list_get_value(qts);

Reviewed-by: Steve Sistare <steven.sistare@oracle.com>