* [PATCH] tests/qtest/qom-test: Test retrieval of machine class properties
@ 2025-01-23 20:49 Thomas Huth
2025-01-28 21:00 ` Fabiano Rosas
0 siblings, 1 reply; 2+ messages in thread
From: Thomas Huth @ 2025-01-23 20:49 UTC (permalink / raw)
To: Fabiano Rosas
Cc: Laurent Vivier, Paolo Bonzini, qemu-devel, Daniel P . Berrange,
Eduardo Habkost
There were recently some crashes that occurred when trying to
retrieve the properties of machines. Let's add a test to avoid
regression here.
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
Based-on: <20250117192106.471029-1-thuth@redhat.com>
Based-on: <20250123204708.1560305-1-thuth@redhat.com>
tests/qtest/qom-test.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/tests/qtest/qom-test.c b/tests/qtest/qom-test.c
index d677f87c8e..50064ed951 100644
--- a/tests/qtest/qom-test.c
+++ b/tests/qtest/qom-test.c
@@ -88,6 +88,17 @@ static void test_machine(gconstpointer data)
qts = qtest_initf("-machine %s", machine);
+ if (g_test_slow()) {
+ /* Make sure we can get the machine class properties: */
+ g_autofree char *qom_machine = g_strdup_printf("%s-machine", machine);
+
+ response = qtest_qmp(qts, "{ 'execute': 'qom-list-properties',"
+ " 'arguments': { 'typename': %s } }",
+ qom_machine);
+ g_assert(response);
+ qobject_unref(response);
+ }
+
test_properties(qts, "/machine", true);
response = qtest_qmp(qts, "{ 'execute': 'quit' }");
--
2.48.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-01-28 21:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-23 20:49 [PATCH] tests/qtest/qom-test: Test retrieval of machine class properties Thomas Huth
2025-01-28 21:00 ` Fabiano Rosas
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.