diff mbox

[3/3] tests/qdev-global-props: Manually add an instance of a QOM machine

Message ID 1394552156-18901-4-git-send-email-marcel.a@redhat.com
State New
Headers show

Commit Message

Marcel Apfelbaum March 11, 2014, 3:35 p.m. UTC
The machine is no longer a container. Add null-machine to
the QOM tree.

Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com>
---
 tests/Makefile                 | 2 +-
 tests/test-qdev-global-props.c | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/tests/Makefile b/tests/Makefile
index b17d41e..b86446d 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -182,7 +182,7 @@  tests/test-cutils$(EXESUF): tests/test-cutils.o util/cutils.o
 tests/test-int128$(EXESUF): tests/test-int128.o
 tests/test-qdev-global-props$(EXESUF): tests/test-qdev-global-props.o \
 	hw/core/qdev.o hw/core/qdev-properties.o hw/core/hotplug.o\
-	hw/core/irq.o \
+	hw/core/irq.o hw/core/machine.o hw/core/null-machine.o \
 	$(qom-core-obj) \
 	$(test-qapi-obj-y) \
 	libqemuutil.a libqemustub.a
diff --git a/tests/test-qdev-global-props.c b/tests/test-qdev-global-props.c
index e4ad173..964ae96 100644
--- a/tests/test-qdev-global-props.c
+++ b/tests/test-qdev-global-props.c
@@ -170,6 +170,9 @@  int main(int argc, char **argv)
     type_register_static(&static_prop_type);
     type_register_static(&dynamic_prop_type);
 
+    object_property_add_child(object_get_root(), "machine",
+                              object_new("none-machine"), &error_abort);
+
     g_test_add_func("/qdev/properties/static/default", test_static_prop);
     g_test_add_func("/qdev/properties/static/global", test_static_globalprop);
     g_test_add_func("/qdev/properties/dynamic/global", test_dynamic_globalprop);