[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 4/6] vhost-user-test: do not hang if chardev creatio
From: |
Marc-André Lureau |
Subject: |
[Qemu-devel] [PATCH 4/6] vhost-user-test: do not hang if chardev creation failed |
Date: |
Thu, 15 Feb 2018 22:25:50 +0100 |
Before the chardev name fix, the following error may happen: "attempt
to add duplicate property 'chr-test' to object (type 'container')",
due to races.
Sadly, error_vprintf() uses g_test_message(), so you have to use
read the cryptic --debug-log to see it. Later, it would make sense to
use g_critical() instead, and catch errors with
g_test_expect_message() (in glib 2.34).
Signed-off-by: Marc-André Lureau <address@hidden>
---
tests/vhost-user-test.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/vhost-user-test.c b/tests/vhost-user-test.c
index 67e5f7f858..efd28411d3 100644
--- a/tests/vhost-user-test.c
+++ b/tests/vhost-user-test.c
@@ -513,6 +513,7 @@ static void test_server_create_chr(TestServer *server,
const gchar *opt)
chr = qemu_chr_new(server->chr_name, chr_path);
g_free(chr_path);
+ g_assert_nonnull(chr);
qemu_chr_fe_init(&server->chr, chr, &error_abort);
qemu_chr_fe_set_handlers(&server->chr, chr_can_read, chr_read,
chr_event, NULL, server, NULL, true);
--
2.16.1.73.g5832b7e9f2
- [Qemu-devel] [PATCH 0/6] vhost-user-test and leak fixes, Marc-André Lureau, 2018/02/15
- [Qemu-devel] [PATCH 2/6] lockable: workaround GCC link issue with ASAN, Marc-André Lureau, 2018/02/15
- [Qemu-devel] [PATCH 6/6] sdhci-test: fix leaks, Marc-André Lureau, 2018/02/15
- [Qemu-devel] [PATCH 5/6] ahci-test: fix opts leak of skip tests, Marc-André Lureau, 2018/02/15
- [Qemu-devel] [PATCH 4/6] vhost-user-test: do not hang if chardev creation failed,
Marc-André Lureau <=
- [Qemu-devel] [PATCH 3/6] vhost-user-test: add back memfd check, Marc-André Lureau, 2018/02/15
- [Qemu-devel] [PATCH 1/6] build-sys: fix -fsanitize=address check, Marc-André Lureau, 2018/02/15
- Re: [Qemu-devel] [PATCH 0/6] vhost-user-test and leak fixes, Paolo Bonzini, 2018/02/23