aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2014-08-08 16:03:28 -0300
committerMichael S. Tsirkin <mst@redhat.com>2014-09-18 21:51:24 +0300
commit45de81735b01b59fbc45803b2c1c8ca37cb55ead (patch)
tree1fd97208e70408e9a8ee45495701408cccb8a9de /tests
parent2177801a4899bf29108b3d471417a5b4d701ec29 (diff)
downloadqemu-45de81735b01b59fbc45803b2c1c8ca37cb55ead.zip
qemu-45de81735b01b59fbc45803b2c1c8ca37cb55ead.tar.gz
qemu-45de81735b01b59fbc45803b2c1c8ca37cb55ead.tar.bz2
test-qdev-global-props: Initialize not_used=true for all props
This will ensure we are actually testing the code which sets not_used=false when the property is used. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/test-qdev-global-props.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/test-qdev-global-props.c b/tests/test-qdev-global-props.c
index 34223a7..5488937 100644
--- a/tests/test-qdev-global-props.c
+++ b/tests/test-qdev-global-props.c
@@ -164,8 +164,8 @@ static void test_dynamic_globalprop_subprocess(void)
{
MyType *mt;
static GlobalProperty props[] = {
- { TYPE_DYNAMIC_PROPS, "prop1", "101" },
- { TYPE_DYNAMIC_PROPS, "prop2", "102" },
+ { TYPE_DYNAMIC_PROPS, "prop1", "101", true },
+ { TYPE_DYNAMIC_PROPS, "prop2", "102", true },
{ TYPE_DYNAMIC_PROPS"-bad", "prop3", "103", true },
{}
};
@@ -180,6 +180,9 @@ static void test_dynamic_globalprop_subprocess(void)
g_assert_cmpuint(mt->prop2, ==, 102);
all_used = qdev_prop_check_global();
g_assert_cmpuint(all_used, ==, 1);
+ g_assert(!props[0].not_used);
+ g_assert(!props[1].not_used);
+ g_assert(props[2].not_used);
}
static void test_dynamic_globalprop(void)