qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 10/71] vhost-user-test: skip if there is no memo


From: Thomas Huth
Subject: Re: [Qemu-devel] [PATCH 10/71] vhost-user-test: skip if there is no memory at address 0
Date: Thu, 6 Dec 2018 17:26:57 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

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 <address@hidden>
> Signed-off-by: Paolo Bonzini <address@hidden>
> ---
>  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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]