[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 19/24] tests: qdev_prop_check_globals() doesn't retur
From: |
Eduardo Habkost |
Subject: |
[Qemu-devel] [PULL 19/24] tests: qdev_prop_check_globals() doesn't return "all_used" |
Date: |
Tue, 11 Dec 2018 16:01:24 -0200 |
From: Marc-André Lureau <address@hidden>
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 <address@hidden>
Reviewed-by: Igor Mammedov <address@hidden>
Reviewed-by: Eduardo Habkost <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
---
tests/test-qdev-global-props.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/tests/test-qdev-global-props.c b/tests/test-qdev-global-props.c
index d81b0862d5..ccdf6c57c1 100644
--- a/tests/test-qdev-global-props.c
+++ b/tests/test-qdev-global-props.c
@@ -214,7 +214,7 @@ static void test_dynamic_globalprop_subprocess(void)
{ TYPE_NONDEVICE, "prop6", "106", true },
{}
};
- int all_used;
+ int global_error;
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->prop2, ==, 102);
- all_used = qdev_prop_check_globals();
- g_assert_cmpuint(all_used, ==, 1);
+ global_error = qdev_prop_check_globals();
+ g_assert_cmpuint(global_error, ==, 1);
g_assert(props[0].used);
g_assert(props[1].used);
g_assert(!props[2].used);
@@ -259,7 +259,7 @@ static void test_dynamic_globalprop_nouser_subprocess(void)
{ TYPE_NONDEVICE, "prop6", "106" },
{}
};
- int all_used;
+ int global_error;
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->prop2, ==, 102);
- all_used = qdev_prop_check_globals();
- g_assert_cmpuint(all_used, ==, 0);
+ global_error = qdev_prop_check_globals();
+ g_assert_cmpuint(global_error, ==, 0);
g_assert(props[0].used);
g_assert(props[1].used);
g_assert(!props[2].used);
--
2.18.0.rc1.1.g3f1ff2140
- [Qemu-devel] [PULL 09/24] move ObjectClass to typedefs.h, (continued)
- [Qemu-devel] [PULL 09/24] move ObjectClass to typedefs.h, Eduardo Habkost, 2018/12/11
- [Qemu-devel] [PULL 11/24] numa: Match struct to typedef name, Eduardo Habkost, 2018/12/11
- [Qemu-devel] [PULL 10/24] i386: Rename bools in PCMachineState to end in _enabled, Eduardo Habkost, 2018/12/11
- [Qemu-devel] [PULL 12/24] hostmem: Validate host-nodes before setting bitmap, Eduardo Habkost, 2018/12/11
- [Qemu-devel] [PULL 16/24] spapr: Use default_machine_opts to set suppress_vmdesc, Eduardo Habkost, 2018/12/11
- [Qemu-devel] [PULL 18/24] pc: Use default_machine_opts to set suppress_vmdesc, Eduardo Habkost, 2018/12/11
- [Qemu-devel] [PULL 14/24] virt: Eliminate separate instance_init functions, Eduardo Habkost, 2018/12/11
- [Qemu-devel] [PULL 13/24] q35/440fx/arm/spapr: Add QEMU 4.0 machine type, Eduardo Habkost, 2018/12/11
- [Qemu-devel] [PULL 17/24] spapr: Delete instance_options functions, Eduardo Habkost, 2018/12/11
- [Qemu-devel] [PULL 15/24] spapr: Use default_machine_opts to set use_hotplug_event_source, Eduardo Habkost, 2018/12/11
- [Qemu-devel] [PULL 19/24] tests: qdev_prop_check_globals() doesn't return "all_used",
Eduardo Habkost <=
- [Qemu-devel] [PULL 20/24] qom: make interface types abstract, Eduardo Habkost, 2018/12/11
- [Qemu-devel] [PULL 21/24] qom: make user_creatable_complete() specific to UserCreatable, Eduardo Habkost, 2018/12/11
- [Qemu-devel] [PULL 22/24] accel: register global_props like machine globals, Eduardo Habkost, 2018/12/11
- [Qemu-devel] [PULL 23/24] qdev: move qdev_prop_register_global_list() to tests, Eduardo Habkost, 2018/12/11
- [Qemu-devel] [PULL 24/24] qom: remove unimplemented class_finalize, Eduardo Habkost, 2018/12/11
- Re: [Qemu-devel] [PULL 00/24] Machine queue post-3.1.0 (including 4.0 machine-types), Peter Maydell, 2018/12/11
- Re: [Qemu-devel] [PULL 00/24] Machine queue post-3.1.0 (including 4.0 machine-types), no-reply, 2018/12/11