On Fri, 28 Oct 2016 23:48:01 -0200
Eduardo Habkost <ehabk...@redhat.com> wrote:

> Use &error_abort so we don't ignore any errors on the property
> registration calls.
> 
> Signed-off-by: Eduardo Habkost <ehabk...@redhat.com>
> ---
> Changes series v2 -> v3:
> * Patch imported from "tests: A few check-qom-proplist fixes"
>   series
> 
> Changes series v3 -> v4:
> * Added &error_abort to more object_property_{add,del}_*()
>   calls
>   * Suggested-by: Igor Mammedov <imamm...@redhat.com>
> ---
>  tests/check-qom-proplist.c | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/tests/check-qom-proplist.c b/tests/check-qom-proplist.c
> index 693dc4c..766a4a1 100644
> --- a/tests/check-qom-proplist.c
> +++ b/tests/check-qom-proplist.c
> @@ -123,7 +123,7 @@ static void dummy_init(Object *obj)
>      object_property_add_bool(obj, "bv",
>                               dummy_get_bv,
>                               dummy_set_bv,
> -                             NULL);
> +                             &error_abort);
>  }
>  
>  
> @@ -132,13 +132,13 @@ static void dummy_class_init(ObjectClass *cls, void 
> *data)
>      object_class_property_add_str(cls, "sv",
>                                    dummy_get_sv,
>                                    dummy_set_sv,
> -                                  NULL);
> +                                  &error_abort);
>      object_class_property_add_enum(cls, "av",
>                                     "DummyAnimal",
>                                     dummy_animal_map,
>                                     dummy_get_av,
>                                     dummy_set_av,
> -                                   NULL);
> +                                   &error_abort);
>  }
>  
>  
> @@ -239,13 +239,13 @@ static void dummy_dev_init(Object *obj)
>      DummyBus *bus = DUMMY_BUS(object_new(TYPE_DUMMY_BUS));
>      DummyBackend *backend = DUMMY_BACKEND(object_new(TYPE_DUMMY_BACKEND));
>  
> -    object_property_add_child(obj, "bus", OBJECT(bus), NULL);
> +    object_property_add_child(obj, "bus", OBJECT(bus), &error_abort);
>      dev->bus = bus;
> -    object_property_add_child(OBJECT(bus), "backend", OBJECT(backend), NULL);
> +    object_property_add_child(OBJECT(bus), "backend", OBJECT(backend), 
> &error_abort);
looks like line is over 80 characters

with that fixed
Reviewed-by: Igor Mammedov <imamm...@redhat.com>

>      bus->backend = backend;
>  
>      object_property_add_link(obj, "backend", TYPE_DUMMY_BACKEND,
> -                             (Object **)&bus->backend, NULL, 0, NULL);
> +                             (Object **)&bus->backend, NULL, 0, 
> &error_abort);
>  }
>  
>  static void dummy_dev_unparent(Object *obj)
> @@ -274,7 +274,7 @@ static void dummy_bus_init(Object *obj)
>  static void dummy_bus_unparent(Object *obj)
>  {
>      DummyBus *bus = DUMMY_BUS(obj);
> -    object_property_del(obj->parent, "backend", NULL);
> +    object_property_del(obj->parent, "backend", &error_abort);
>      object_unparent(OBJECT(bus->backend));
>  }
>  


Reply via email to