On Mon, Sep 13, 2021 at 02:39:28PM +0200, Markus Armbruster wrote: > test_clone_complex3() uses simple union __org.qemu_x-Union1 to cover > arrays. Use UserDefOneList instead. Unions are still covered by > test_clone_complex1(). > > Signed-off-by: Markus Armbruster <arm...@redhat.com> > --- > tests/unit/test-clone-visitor.c | 70 ++++++++++++++++++--------------- > 1 file changed, 38 insertions(+), 32 deletions(-) > > diff --git a/tests/unit/test-clone-visitor.c b/tests/unit/test-clone-visitor.c > index 8357a90e60..4048018607 100644 > --- a/tests/unit/test-clone-visitor.c > +++ b/tests/unit/test-clone-visitor.c > @@ -153,42 +153,48 @@ static void test_clone_complex2(void) > > static void test_clone_complex3(void) > { > - __org_qemu_x_Struct2 *src, *dst; > - __org_qemu_x_Union1List *tmp; > + UserDefOneList *src, *dst, *tail; > + UserDefOne *elt;
This unit test loses coverge of RFQDN downstream extensions, but I think we still adequately cover that elsewhere in the testsuite, and that it was not the primary focus of this test. Meanwhile, what this test is really focused on (an accurate clone of a union) is still preserved. Reviewed-by: Eric Blake <ebl...@redhat.com> -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org