From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58520) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUg6p-0004qU-JG for qemu-devel@nongnu.org; Thu, 18 Sep 2014 14:07:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XUg6j-0002zf-AR for qemu-devel@nongnu.org; Thu, 18 Sep 2014 14:07:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:20843) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUg6j-0002yC-3y for qemu-devel@nongnu.org; Thu, 18 Sep 2014 14:07:05 -0400 Date: Thu, 18 Sep 2014 21:10:15 +0300 From: "Michael S. Tsirkin" Message-ID: <1411063757-29216-5-git-send-email-mst@redhat.com> References: <1411063757-29216-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1411063757-29216-1-git-send-email-mst@redhat.com> Subject: [Qemu-devel] [PULL v2 04/15] test-qdev-global-props: Initialize not_used=true for all props List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , Don Slutz , Eduardo Habkost , Anthony Liguori From: Eduardo Habkost This will ensure we are actually testing the code which sets not_used=false when the property is used. Signed-off-by: Eduardo Habkost Acked-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/test-qdev-global-props.c | 7 +++++-- 1 file 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) -- MST