[Qemu-devel] [PATCH for-2.10 04/10] tests/test-qobject-input-visitor: Drop redundant test

Markus Armbruster posted 10 patches 8 years, 6 months ago
There is a newer version of this series
[Qemu-devel] [PATCH for-2.10 04/10] tests/test-qobject-input-visitor: Drop redundant test
Posted by Markus Armbruster 8 years, 6 months ago
test_visitor_in_alternate() tests UserDefAlternate with inadmissible
input.  test_visitor_in_fail_alternate() does basically the same.
Drop the former, keep the latter.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 tests/test-qobject-input-visitor.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/tests/test-qobject-input-visitor.c b/tests/test-qobject-input-visitor.c
index f451844..bcf0261 100644
--- a/tests/test-qobject-input-visitor.c
+++ b/tests/test-qobject-input-visitor.c
@@ -567,7 +567,6 @@ static void test_visitor_in_alternate(TestInputVisitorData *data,
                                       const void *unused)
 {
     Visitor *v;
-    Error *err = NULL;
     UserDefAlternate *tmp;
     WrapAlternate *wrap;
 
@@ -599,11 +598,6 @@ static void test_visitor_in_alternate(TestInputVisitorData *data,
     g_assert_cmpint(tmp->u.udfu.u.value1.has_a_b, ==, false);
     qapi_free_UserDefAlternate(tmp);
 
-    v = visitor_input_test_init(data, "false");
-    visit_type_UserDefAlternate(v, NULL, &tmp, &err);
-    error_free_or_abort(&err);
-    qapi_free_UserDefAlternate(tmp);
-
     v = visitor_input_test_init(data, "{ 'alt': 42 }");
     visit_type_WrapAlternate(v, NULL, &wrap, &error_abort);
     g_assert_cmpint(wrap->alt->type, ==, QTYPE_QNUM);
-- 
2.7.5


Re: [Qemu-devel] [PATCH for-2.10 04/10] tests/test-qobject-input-visitor: Drop redundant test
Posted by Eric Blake 8 years, 6 months ago
On 07/18/2017 08:41 AM, Markus Armbruster wrote:
> test_visitor_in_alternate() tests UserDefAlternate with inadmissible
> input.  test_visitor_in_fail_alternate() does basically the same.
> Drop the former, keep the latter.
> 
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
>  tests/test-qobject-input-visitor.c | 6 ------
>  1 file changed, 6 deletions(-)
> 

Reviewed-by: Eric Blake <eblake@redhat.com>

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Re: [Qemu-devel] [PATCH for-2.10 04/10] tests/test-qobject-input-visitor: Drop redundant test
Posted by Daniel P. Berrange 8 years, 6 months ago
On Tue, Jul 18, 2017 at 03:41:20PM +0200, Markus Armbruster wrote:
> test_visitor_in_alternate() tests UserDefAlternate with inadmissible
> input.  test_visitor_in_fail_alternate() does basically the same.
> Drop the former, keep the latter.
> 
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
>  tests/test-qobject-input-visitor.c | 6 ------
>  1 file changed, 6 deletions(-)

Reviewed-by: Daniel P. Berrange <berrange@redhat.com>

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|