[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 0/2] qom: Fix ambiguous path detection when ambi
From: |
Eduardo Habkost |
Subject: |
Re: [Qemu-devel] [PATCH 0/2] qom: Fix ambiguous path detection when ambiguous=NULL |
Date: |
Mon, 10 Jul 2017 15:23:22 -0300 |
User-agent: |
Mutt/1.8.0 (2017-02-23) |
On Fri, Jul 07, 2017 at 06:30:50PM -0300, Eduardo Habkost wrote:
> object_resolve_path*() ambiguous path detection breaks when
> ambiguous==NULL and the object tree have 3 objects of the same type and
> only 2 of them are under the same parent. e.g.:
>
> /container/obj1 (TYPE_FOO)
> /container/obj2 (TYPE_FOO)
> /obj2 (TYPE_FOO)
>
> With the above tree, object_resolve_path_type("", TYPE_FOO, NULL) will
> incorrectly return /obj2, because the search inside "/container" will
> return NULL, and the match at "/obj2" won't be detected as ambiguous.
>
> Fix that by always calling object_resolve_partial_path() with a non-NULL
> ambiguous parameter.
>
> Test case included.
>
> Reported-by: Igor Mammedov <address@hidden>
> Cc: Mark Cave-Ayland <address@hidden>
>
> Eduardo Habkost (2):
> tests: Test case for object_resolve_path*()
I'm queueing patch 1/2 on my machine-next tree. I will wait a
little longer for additional feedback on patch 2/2 before merging
it.
> qom: Fix ambiguous path detection when ambiguous=NULL
>
> qom/object.c | 17 ++++++++---------
> tests/check-qom-proplist.c | 44 ++++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 52 insertions(+), 9 deletions(-)
>
> --
> 2.9.4
>
>
--
Eduardo
[Qemu-devel] [PATCH 2/2] qom: Fix ambiguous path detection when ambiguous=NULL, Eduardo Habkost, 2017/07/07
Re: [Qemu-devel] [PATCH 0/2] qom: Fix ambiguous path detection when ambiguous=NULL, Mark Cave-Ayland, 2017/07/10
Re: [Qemu-devel] [PATCH 0/2] qom: Fix ambiguous path detection when ambiguous=NULL,
Eduardo Habkost <=