mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
tests/qtest/qom-test: Test retrieval of machine class properties
There were recently some crashes that occurred when trying to retrieve the properties of machines. Let's add a test to avoid regression here. Message-ID: <20250123204956.1561463-1-thuth@redhat.com> Reviewed-by: Fabiano Rosas <farosas@suse.de> Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
parent
4098c6b7b6
commit
d8b913f7c7
1 changed files with 11 additions and 0 deletions
|
@ -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' }");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue