[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 3/3] tests/qdev-global-props: Manually add an instan
From: |
Marcel Apfelbaum |
Subject: |
[Qemu-devel] [PATCH 3/3] tests/qdev-global-props: Manually add an instance of a QOM machine |
Date: |
Tue, 11 Mar 2014 17:35:56 +0200 |
The machine is no longer a container. Add null-machine to
the QOM tree.
Signed-off-by: Marcel Apfelbaum <address@hidden>
---
tests/Makefile | 2 +-
tests/test-qdev-global-props.c | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
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);
--
1.8.3.1