From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45733) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dUbWC-0005zy-UD for qemu-devel@nongnu.org; Mon, 10 Jul 2017 12:26:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dUbWC-00089R-8F for qemu-devel@nongnu.org; Mon, 10 Jul 2017 12:26:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58352) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dUbWC-00089A-24 for qemu-devel@nongnu.org; Mon, 10 Jul 2017 12:26:40 -0400 Date: Mon, 10 Jul 2017 18:26:36 +0200 From: Igor Mammedov Message-ID: <20170710182636.3269e9d8@nial.brq.redhat.com> In-Reply-To: <20170710153331.GC5167@localhost.localdomain> References: <20170707213052.13087-1-ehabkost@redhat.com> <20170707213052.13087-2-ehabkost@redhat.com> <20170710101041.553a792a@nial.brq.redhat.com> <20170710144557.GH12152@localhost.localdomain> <20170710153331.GC5167@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] fixup! qom: Fix ambiguous path detection when ambiguous=NULL List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost Cc: Paolo Bonzini , qemu-devel@nongnu.org, Andreas =?UTF-8?B?RsOkcmJlcg==?= On Mon, 10 Jul 2017 12:33:31 -0300 Eduardo Habkost wrote: > On Mon, Jul 10, 2017 at 11:45:57AM -0300, Eduardo Habkost wrote: > > On Mon, Jul 10, 2017 at 10:10:41AM +0200, Igor Mammedov wrote: > > > On Fri, 7 Jul 2017 18:30:51 -0300 > > > Eduardo Habkost wrote: > [...] > > > > + > > > > + object_unparent(obj1); > > > > + object_unparent(obj2a); > > > > + object_unparent(obj2b); > > > Are above unparenting is necessary? > > > > > > > + object_unparent(cont1); > > > Wouldn't parent destruction sufficient to trigger > > > implicit destruction of children? > > > > Probably it is. I will test it. > > The obj1 and obj2a object_unparent() calls are really > unnecessary. object_unparent(obj2b) is still necessary because > it is attached direcly to root. > > Signed-off-by: Eduardo Habkost Reviewed-by: Igor Mammedov > --- > tests/check-qom-proplist.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/tests/check-qom-proplist.c b/tests/check-qom-proplist.c > index 381532c..432b665 100644 > --- a/tests/check-qom-proplist.c > +++ b/tests/check-qom-proplist.c > @@ -605,8 +605,6 @@ static void test_qom_partial_path(void) > g_assert(!ambiguous); > g_assert(object_resolve_path("obj1", NULL) == obj1); > > - object_unparent(obj1); > - object_unparent(obj2a); > object_unparent(obj2b); > object_unparent(cont1); > }