mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-23 19:49:43 +00:00
tests: qdev_prop_check_globals() doesn't return "all_used"
Instead, it returns 1 if an error was detected, which is the case for: /qdev/properties/dynamic/global/subprocess: warning: global dynamic-prop-type-bad.prop3 has invalid class name warning: global nohotplug-type.prop5=105 not used warning: global nondevice-type.prop6 has invalid class name Clarify the function return value. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20181204142023.15982-2-marcandre.lureau@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
This commit is contained in:
parent
112394af1a
commit
ef24052386
@ -214,7 +214,7 @@ static void test_dynamic_globalprop_subprocess(void)
|
|||||||
{ TYPE_NONDEVICE, "prop6", "106", true },
|
{ TYPE_NONDEVICE, "prop6", "106", true },
|
||||||
{}
|
{}
|
||||||
};
|
};
|
||||||
int all_used;
|
int global_error;
|
||||||
|
|
||||||
qdev_prop_register_global_list(props);
|
qdev_prop_register_global_list(props);
|
||||||
|
|
||||||
@ -223,8 +223,8 @@ static void test_dynamic_globalprop_subprocess(void)
|
|||||||
|
|
||||||
g_assert_cmpuint(mt->prop1, ==, 101);
|
g_assert_cmpuint(mt->prop1, ==, 101);
|
||||||
g_assert_cmpuint(mt->prop2, ==, 102);
|
g_assert_cmpuint(mt->prop2, ==, 102);
|
||||||
all_used = qdev_prop_check_globals();
|
global_error = qdev_prop_check_globals();
|
||||||
g_assert_cmpuint(all_used, ==, 1);
|
g_assert_cmpuint(global_error, ==, 1);
|
||||||
g_assert(props[0].used);
|
g_assert(props[0].used);
|
||||||
g_assert(props[1].used);
|
g_assert(props[1].used);
|
||||||
g_assert(!props[2].used);
|
g_assert(!props[2].used);
|
||||||
@ -259,7 +259,7 @@ static void test_dynamic_globalprop_nouser_subprocess(void)
|
|||||||
{ TYPE_NONDEVICE, "prop6", "106" },
|
{ TYPE_NONDEVICE, "prop6", "106" },
|
||||||
{}
|
{}
|
||||||
};
|
};
|
||||||
int all_used;
|
int global_error;
|
||||||
|
|
||||||
qdev_prop_register_global_list(props);
|
qdev_prop_register_global_list(props);
|
||||||
|
|
||||||
@ -268,8 +268,8 @@ static void test_dynamic_globalprop_nouser_subprocess(void)
|
|||||||
|
|
||||||
g_assert_cmpuint(mt->prop1, ==, 101);
|
g_assert_cmpuint(mt->prop1, ==, 101);
|
||||||
g_assert_cmpuint(mt->prop2, ==, 102);
|
g_assert_cmpuint(mt->prop2, ==, 102);
|
||||||
all_used = qdev_prop_check_globals();
|
global_error = qdev_prop_check_globals();
|
||||||
g_assert_cmpuint(all_used, ==, 0);
|
g_assert_cmpuint(global_error, ==, 0);
|
||||||
g_assert(props[0].used);
|
g_assert(props[0].used);
|
||||||
g_assert(props[1].used);
|
g_assert(props[1].used);
|
||||||
g_assert(!props[2].used);
|
g_assert(!props[2].used);
|
||||||
|
Loading…
Reference in New Issue
Block a user