From patchwork Mon Jun 19 12:49:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Xu X-Patchwork-Id: 777733 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wrrWV2TDXz9s0g for ; Mon, 19 Jun 2017 22:53:42 +1000 (AEST) Received: from localhost ([::1]:42412 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dMwBY-0005hD-38 for incoming@patchwork.ozlabs.org; Mon, 19 Jun 2017 08:53:40 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42484) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dMw8d-000315-HY for qemu-devel@nongnu.org; Mon, 19 Jun 2017 08:50:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dMw8c-0004a6-MR for qemu-devel@nongnu.org; Mon, 19 Jun 2017 08:50:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53916) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dMw8c-0004Y3-CO for qemu-devel@nongnu.org; Mon, 19 Jun 2017 08:50:38 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 51039C074542 for ; Mon, 19 Jun 2017 12:50:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 51039C074542 Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=peterx@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 51039C074542 Received: from pxdev.xzpeter.org.com (ovpn-12-67.pek2.redhat.com [10.72.12.67]) by smtp.corp.redhat.com (Postfix) with ESMTP id 104E088EF6; Mon, 19 Jun 2017 12:50:31 +0000 (UTC) From: Peter Xu To: qemu-devel@nongnu.org Date: Mon, 19 Jun 2017 20:49:40 +0800 Message-Id: <1497876588-947-6-git-send-email-peterx@redhat.com> In-Reply-To: <1497876588-947-1-git-send-email-peterx@redhat.com> References: <1497876588-947-1-git-send-email-peterx@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Mon, 19 Jun 2017 12:50:37 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v3 05/13] tests: avoid check GlobalProperty.used X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Eduardo Habkost , Juan Quintela , "Dr . David Alan Gilbert" , peterx@redhat.com, Markus Armbruster Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" After previous patch to let qdev_prop_register_global_list() use register_compat_prop(), then caller won't be guaranteed that the GlobalProperty pointer passed in will be the one linked to global_props list (now we always alloc new GlobalProperty for it). So prop->used will never be set. Let's avoid checking this in test codes to make the test pass. Signed-off-by: Peter Xu --- tests/test-qdev-global-props.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/tests/test-qdev-global-props.c b/tests/test-qdev-global-props.c index 48e5b73..599bb13 100644 --- a/tests/test-qdev-global-props.c +++ b/tests/test-qdev-global-props.c @@ -218,12 +218,6 @@ static void test_dynamic_globalprop_subprocess(void) g_assert_cmpuint(mt->prop2, ==, 102); all_used = qdev_prop_check_globals(); g_assert_cmpuint(all_used, ==, 1); - g_assert(props[0].used); - g_assert(props[1].used); - g_assert(!props[2].used); - g_assert(!props[3].used); - g_assert(!props[4].used); - g_assert(!props[5].used); } static void test_dynamic_globalprop(void) @@ -263,12 +257,6 @@ static void test_dynamic_globalprop_nouser_subprocess(void) g_assert_cmpuint(mt->prop2, ==, 102); all_used = qdev_prop_check_globals(); g_assert_cmpuint(all_used, ==, 0); - g_assert(props[0].used); - g_assert(props[1].used); - g_assert(!props[2].used); - g_assert(!props[3].used); - g_assert(!props[4].used); - g_assert(!props[5].used); } static void test_dynamic_globalprop_nouser(void)