From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38439) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gP82V-0008J9-Lx for qemu-devel@nongnu.org; Tue, 20 Nov 2018 10:34:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gP82U-0002Rd-5V for qemu-devel@nongnu.org; Tue, 20 Nov 2018 10:34:11 -0500 Date: Tue, 20 Nov 2018 16:33:29 +0100 From: Igor Mammedov Message-ID: <20181120163329.6c960628@redhat.com> In-Reply-To: <20181107123652.23417-2-marcandre.lureau@redhat.com> References: <20181107123652.23417-1-marcandre.lureau@redhat.com> <20181107123652.23417-2-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH for-3.2 v3 01/14] tests: qdev_prop_check_globals() doesn't return "all_used" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?B?TWFyYy1BbmRyw6k=?= Lureau Cc: qemu-devel@nongnu.org, Peter Maydell , Stefano Stabellini , xen-devel@lists.xenproject.org, Corey Minyard , Amit Shah , =?UTF-8?B?SGVy?= =?UTF-8?B?dsOp?= Poussineau , "Michael S. Tsirkin" , Mark Cave-Ayland , dgilbert@redhat.com, Eduardo Habkost , qemu-arm@nongnu.org, qemu-ppc@nongnu.org, Anthony Perard , Paolo Bonzini , Stefan Berger , Andreas =?UTF-8?B?RsOkcmJlcg==?= , Artyom Tarasenko , Richard Henderson On Wed, 7 Nov 2018 16:36:39 +0400 Marc-Andr=C3=A9 Lureau wrote: > Instead, it returns 1 if an error was detected, which is the case for: >=20 > /qdev/properties/dynamic/global/subprocess: > warning: global dynamic-prop-type-bad.prop3 has invalid class name > warning: global nohotplug-type.prop5=3D105 not used > warning: global nondevice-type.prop6 has invalid class name >=20 > Clarify the function return value. >=20 > Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Igor Mammedov > --- > tests/test-qdev-global-props.c | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) >=20 > diff --git a/tests/test-qdev-global-props.c b/tests/test-qdev-global-prop= s.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; > =20 > qdev_prop_register_global_list(props); > =20 > @@ -223,8 +223,8 @@ static void test_dynamic_globalprop_subprocess(void) > =20 > g_assert_cmpuint(mt->prop1, =3D=3D, 101); > g_assert_cmpuint(mt->prop2, =3D=3D, 102); > - all_used =3D qdev_prop_check_globals(); > - g_assert_cmpuint(all_used, =3D=3D, 1); > + global_error =3D qdev_prop_check_globals(); > + g_assert_cmpuint(global_error, =3D=3D, 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; > =20 > qdev_prop_register_global_list(props); > =20 > @@ -268,8 +268,8 @@ static void test_dynamic_globalprop_nouser_subprocess= (void) > =20 > g_assert_cmpuint(mt->prop1, =3D=3D, 101); > g_assert_cmpuint(mt->prop2, =3D=3D, 102); > - all_used =3D qdev_prop_check_globals(); > - g_assert_cmpuint(all_used, =3D=3D, 0); > + global_error =3D qdev_prop_check_globals(); > + g_assert_cmpuint(global_error, =3D=3D, 0); > g_assert(props[0].used); > g_assert(props[1].used); > g_assert(!props[2].used);