diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2019-03-08 16:31:34 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2019-03-08 16:31:34 +0000 |
commit | 234afe78281b10a798fb97c584e1b677844aaab8 (patch) | |
tree | 566eea97b956f3fe8766396999026092de4f231f /tests/vhost-user-test.c | |
parent | 62cfabb52210139843e26c95434356f73a0631b9 (diff) | |
parent | 4966c5bd8a6ab17214f54f8016426f95303f9760 (diff) |
Merge remote-tracking branch 'remotes/huth-gitlab/tags/pull-request-2019-03-08' into staging
- qtest fixes
- Some generic clean-ups by Philippe
- macOS CI testing via cirrus-ci.com
# gpg: Signature made Fri 08 Mar 2019 08:58:47 GMT
# gpg: using RSA key 2ED9D774FE702DB5
# gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" [full]
# gpg: aka "Thomas Huth <thuth@redhat.com>" [full]
# gpg: aka "Thomas Huth <huth@tuxfamily.org>" [full]
# gpg: aka "Thomas Huth <th.huth@posteo.de>" [unknown]
# Primary key fingerprint: 27B8 8847 EEE0 2501 18F3 EAB9 2ED9 D774 FE70 2DB5
* remotes/huth-gitlab/tags/pull-request-2019-03-08:
cirrus.yml: Add macOS continuous integration task
tests/bios-tables: Improve portability by searching bash in the $PATH
vhost-user-test: fix leaks
tests: Do not use "\n" in g_test_message() strings
hw/devices: Remove unused TC6393XB_RAM definition
hw: Remove unused 'hw/devices.h' include
tests: Move qdict-test-data.txt to tests/data/qobject/
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
# Conflicts:
# tests/vhost-user-test.c
Diffstat (limited to 'tests/vhost-user-test.c')
-rw-r--r-- | tests/vhost-user-test.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/tests/vhost-user-test.c b/tests/vhost-user-test.c index 92dfeeddf4..0c965b3b1e 100644 --- a/tests/vhost-user-test.c +++ b/tests/vhost-user-test.c @@ -294,7 +294,7 @@ static void chr_read(void *opaque, const uint8_t *buf, int size) } if (size != VHOST_USER_HDR_SIZE) { - g_test_message("Wrong message size received %d\n", size); + g_test_message("Wrong message size received %d", size); return; } @@ -305,7 +305,7 @@ static void chr_read(void *opaque, const uint8_t *buf, int size) p += VHOST_USER_HDR_SIZE; size = qemu_chr_fe_read_all(chr, p, msg.size); if (size != msg.size) { - g_test_message("Wrong message size received %d != %d\n", + g_test_message("Wrong message size received %d != %d", size, msg.size); return; } @@ -437,7 +437,7 @@ static const char *init_hugepagefs(void) } if (access(path, R_OK | W_OK | X_OK)) { - g_test_message("access on path (%s): %s\n", path, strerror(errno)); + g_test_message("access on path (%s): %s", path, strerror(errno)); g_test_fail(); return NULL; } @@ -447,13 +447,13 @@ static const char *init_hugepagefs(void) } while (ret != 0 && errno == EINTR); if (ret != 0) { - g_test_message("statfs on path (%s): %s\n", path, strerror(errno)); + g_test_message("statfs on path (%s): %s", path, strerror(errno)); g_test_fail(); return NULL; } if (fs.f_type != HUGETLBFS_MAGIC) { - g_test_message("Warning: path not on HugeTLBFS: %s\n", path); + g_test_message("Warning: path not on HugeTLBFS: %s", path); g_test_fail(); return NULL; } @@ -549,6 +549,7 @@ static void test_server_free(TestServer *server) g_test_message("unable to rmdir: path (%s): %s", server->tmpfs, strerror(errno)); } + g_free(server->tmpfs); qemu_chr_fe_deinit(&server->chr, true); @@ -564,6 +565,8 @@ static void test_server_free(TestServer *server) g_main_loop_unref(server->loop); g_main_context_unref(server->context); + g_cond_clear(&server->data_cond); + g_mutex_clear(&server->data_mutex); g_free(server); } |