[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] vhost-user-test: added proper TestServer *dest
From: |
Laurent Vivier |
Subject: |
Re: [Qemu-devel] [PATCH] vhost-user-test: added proper TestServer *dest initialization in test_migrate() |
Date: |
Wed, 27 Jun 2018 12:05:30 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 |
On 26/06/2018 16:18, Emanuele Giuseppe Esposito wrote:
> server->bus in _test_server_free() could be NULL, since TestServer *dest in
> test_migrate() was not properly initialized like TestServer *s.
> Added init_virtio_dev(dest) and uninit_virtio_dev(dest), so the fields are
> properly set and when test_server_free(dest); is called, they can be
> correctly freed.
>
> The reason for that is init_virtio_dev() calls qpci_init_pc(), that creates a
> QPCIBusPC * (returned as QPCIBus *), while test_server_free() calls
> qpci_free_pc(),
> that frees the QPCIBus *. Not calling init_virtio_dev() would leave the
> QPCIBus * of TestServer unset.
>
> Problem came out once I modified pci-pc.c and pci-pc.h, modifying QPCIBusPC
> by adding another field before QPCIBus bus. Re-running the tests showed
> vhost-user-test failing.
>
> Signed-off-by: Emanuele Giuseppe Esposito <address@hidden>
Reviewed-by: Laurent Vivier <address@hidden>
I'm wondering if we have to have the same email address in both "From:"
and "Signed-off-by"?
Thanks,
Laurent