diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2016-07-29 11:57:01 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2016-07-29 11:57:01 +0100 |
commit | cbe81c6331d875750720c021492ca74e312f9cb2 (patch) | |
tree | d0cb64e14d8b326b3057eec82efb4baffbed93e5 /tests | |
parent | aa2aac51f0f888b9a4a4fd461d5816ad84a1c448 (diff) | |
parent | f077f889121c89612eaf0f21e94b97aa110a6910 (diff) | |
download | qemu-cbe81c6331d875750720c021492ca74e312f9cb2.zip qemu-cbe81c6331d875750720c021492ca74e312f9cb2.tar.gz qemu-cbe81c6331d875750720c021492ca74e312f9cb2.tar.bz2 |
Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging
pc, pci, virtio: cleanups, fixes
a bunch of bugfixes and a couple of cleanups
making these easier and/or making debugging easier
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
# gpg: Signature made Fri 29 Jul 2016 04:11:01 BST
# gpg: using RSA key 0x281F0DB8D28D5469
# gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>"
# gpg: aka "Michael S. Tsirkin <mst@redhat.com>"
# Primary key fingerprint: 0270 606B 6F3C DF3D 0B17 0970 C350 3912 AFBE 8E67
# Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA 8A0D 281F 0DB8 D28D 5469
* remotes/mst/tags/for_upstream: (41 commits)
mptsas: Fix a migration compatible issue
vhost: do not update last avail idx on get_vring_base() failure
vhost: add vhost_net_set_backend()
vhost-user: add error report in vhost_user_write()
tests: fix vhost-user-test leak
tests: plug some leaks in virtio-net-test
vhost-user: wait until backend init is completed
char: add and use tcp_chr_wait_connected
char: add chr_wait_connected callback
vhost: add assert() to check runtime behaviour
vhost-net: vhost_migration_done is vhost-user specific
Revert "vhost-net: do not crash if backend is not present"
vhost-user: add get_vhost_net() assertions
vhost-user: keep vhost_net after a disconnection
vhost-user: check vhost_user_{read,write}() return value
vhost-user: check qemu_chr_fe_set_msgfds() return value
vhost-user: call set_msgfds unconditionally
qemu-char: fix qemu_chr_fe_set_msgfds() crash when disconnected
vhost: use error_report() instead of fprintf(stderr,...)
vhost: add missing VHOST_OPS_DEBUG
...
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/vhost-user-test.c | 1 | ||||
-rw-r--r-- | tests/virtio-net-test.c | 12 |
2 files changed, 10 insertions, 3 deletions
diff --git a/tests/vhost-user-test.c b/tests/vhost-user-test.c index 46d0588..27b10c1 100644 --- a/tests/vhost-user-test.c +++ b/tests/vhost-user-test.c @@ -683,6 +683,7 @@ static void test_reconnect(void) qtest_get_arch()); g_test_trap_subprocess(path, 0, 0); g_test_trap_assert_passed(); + g_free(path); } #endif diff --git a/tests/virtio-net-test.c b/tests/virtio-net-test.c index a34a939..361506f 100644 --- a/tests/virtio-net-test.c +++ b/tests/virtio-net-test.c @@ -149,6 +149,7 @@ static void rx_stop_cont_test(const QVirtioBus *bus, QVirtioDevice *dev, char test[] = "TEST"; char buffer[64]; int len = htonl(sizeof(test)); + QDict *rsp; struct iovec iov[] = { { .iov_base = &len, @@ -165,7 +166,8 @@ static void rx_stop_cont_test(const QVirtioBus *bus, QVirtioDevice *dev, free_head = qvirtqueue_add(vq, req_addr, 64, true, false); qvirtqueue_kick(bus, dev, vq, free_head); - qmp("{ 'execute' : 'stop'}"); + rsp = qmp("{ 'execute' : 'stop'}"); + QDECREF(rsp); ret = iov_send(socket, iov, 2, 0, sizeof(len) + sizeof(test)); g_assert_cmpint(ret, ==, sizeof(test) + sizeof(len)); @@ -173,8 +175,10 @@ static void rx_stop_cont_test(const QVirtioBus *bus, QVirtioDevice *dev, /* We could check the status, but this command is more importantly to * ensure the packet data gets queued in QEMU, before we do 'cont'. */ - qmp("{ 'execute' : 'query-status'}"); - qmp("{ 'execute' : 'cont'}"); + rsp = qmp("{ 'execute' : 'query-status'}"); + QDECREF(rsp); + rsp = qmp("{ 'execute' : 'cont'}"); + QDECREF(rsp); qvirtio_wait_queue_isr(bus, dev, vq, QVIRTIO_NET_TIMEOUT_US); memread(req_addr + VNET_HDR_SIZE, buffer, sizeof(test)); @@ -230,8 +234,10 @@ static void pci_basic(gconstpointer data) /* End test */ close(sv[0]); qvirtqueue_cleanup(&qvirtio_pci, &tx->vq, alloc); + qvirtqueue_cleanup(&qvirtio_pci, &rx->vq, alloc); pc_alloc_uninit(alloc); qvirtio_pci_device_disable(dev); + g_free(dev->pdev); g_free(dev); qpci_free_pc(bus); test_end(); |