mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-29 04:52:22 -06:00
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>
This commit is contained in:
parent
2177801a48
commit
45de81735b
1 changed files with 5 additions and 2 deletions
|
@ -164,8 +164,8 @@ static void test_dynamic_globalprop_subprocess(void)
|
||||||
{
|
{
|
||||||
MyType *mt;
|
MyType *mt;
|
||||||
static GlobalProperty props[] = {
|
static GlobalProperty props[] = {
|
||||||
{ TYPE_DYNAMIC_PROPS, "prop1", "101" },
|
{ TYPE_DYNAMIC_PROPS, "prop1", "101", true },
|
||||||
{ TYPE_DYNAMIC_PROPS, "prop2", "102" },
|
{ TYPE_DYNAMIC_PROPS, "prop2", "102", true },
|
||||||
{ TYPE_DYNAMIC_PROPS"-bad", "prop3", "103", 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);
|
g_assert_cmpuint(mt->prop2, ==, 102);
|
||||||
all_used = qdev_prop_check_global();
|
all_used = qdev_prop_check_global();
|
||||||
g_assert_cmpuint(all_used, ==, 1);
|
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)
|
static void test_dynamic_globalprop(void)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue