[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
- [Qemu-devel] [PATCH 05/71] vhost-net: revamp configure logic, (continued)
- [Qemu-devel] [PATCH 06/71] vhost-user-test: use g_cond_broadcast, Paolo Bonzini, 2018/12/03
- [Qemu-devel] [PATCH 10/71] vhost-user-test: skip if there is no memory at address 0, Paolo Bonzini, 2018/12/03
- Re: [Qemu-devel] [PATCH 10/71] vhost-user-test: skip if there is no memory at address 0,
Thomas Huth <=
- [Qemu-devel] [PATCH 11/71] vhost-user-test: reduce usage of global_qtest, Paolo Bonzini, 2018/12/03
- [Qemu-devel] [PATCH 12/71] vhost-user-test: create a main loop per TestServer, Paolo Bonzini, 2018/12/03
- [Qemu-devel] [PATCH 14/71] vhost-user-test: create a temporary directory per TestServer, Paolo Bonzini, 2018/12/03
- [Qemu-devel] [PATCH 17/71] tests: remove rule for nonexisting qdev-monitor-test, Paolo Bonzini, 2018/12/03
- [Qemu-devel] [PATCH 16/71] tests/libqos: rename qpci_init_pc and qpci_init_spapr functions, Paolo Bonzini, 2018/12/03