On 2018-12-03 16:32, Paolo Bonzini wrote: > The virt machine cannot run the vhost-user qtests because they hardcode > the presence of memory at address 0. Report the tests as a skip so that > they can be converted to use qgraph. > > Reviewed-by: Marc-André Lureau <marcandre.lur...@redhat.com> > Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> > --- > tests/vhost-user-test.c | 58 > ++++++++++++++++++++++++++++++++++++++----------- > 1 file changed, 45 insertions(+), 13 deletions(-) > > diff --git a/tests/vhost-user-test.c b/tests/vhost-user-test.c > index 82fc6c5..59e1aec 100644 > --- a/tests/vhost-user-test.c > +++ b/tests/vhost-user-test.c > @@ -228,9 +228,11 @@ static void uninit_virtio_dev(TestServer *s) > qvirtio_pci_device_free(s->dev); > } > > -static void wait_for_fds(TestServer *s) > +static bool wait_for_fds(TestServer *s) > { > gint64 end_time; > + bool got_region; > + int i; > > g_mutex_lock(&s->data_mutex); > > @@ -248,6 +250,19 @@ static void wait_for_fds(TestServer *s) > g_assert_cmpint(s->fds_num, ==, s->memory.nregions); > > g_mutex_unlock(&s->data_mutex); > + > + got_region = false; > + for (i = 0; i < s->memory.nregions; ++i) { > + VhostUserMemoryRegion *reg = &s->memory.regions[i]; > + if (reg->guest_phys_addr == 0) { > + got_region = true; > + break; > + } > + } > + if (!got_region) { > + g_test_skip("No memory at address 0x0"); > + }
g_test_skip does not work with older versions of the gtester ... so this patch series depends on your gtester replacement patches first? Thomas