vhost-user-test: do not hang if chardev creation failed
commit642e065a15de6c22d9830372f7ae5164505f21c7
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Thu, 15 Feb 2018 21:25:50 +0000 (15 22:25 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 26 Mar 2018 12:37:13 +0000 (26 14:37 +0200)
treeabbdae599b03b8798eabb18285e083e1c211b6a4
parent6ff8d9b03af289153cb88c9ef84ae9a76b888d88
vhost-user-test: do not hang if chardev creation failed

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 <marcandre.lureau@redhat.com>
Message-Id: <20180215212552.26997-5-marcandre.lureau@redhat.com>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tests/vhost-user-test.c