From 0bf62dc89ecb43f2fb0850f938d692024eb8ec52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Mon, 11 Feb 2019 18:24:33 +0000 Subject: chardev: ensure qemu_chr_parse_compat reports missing driver error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If no valid char driver was identified the qemu_chr_parse_compat method was silent, leaving callers no clue what failed. Signed-off-by: Daniel P. Berrangé Message-Id: <20190211182442.8542-8-berrange@redhat.com> Signed-off-by: Marc-André Lureau --- tests/test-char.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/test-char.c') diff --git a/tests/test-char.c b/tests/test-char.c index 018e2eed93..45203f5d7a 100644 --- a/tests/test-char.c +++ b/tests/test-char.c @@ -932,9 +932,10 @@ static void char_null_test(void) static void char_invalid_test(void) { Chardev *chr; - + g_setenv("QTEST_SILENT_ERRORS", "1", 1); chr = qemu_chr_new("label-invalid", "invalid"); g_assert_null(chr); + g_unsetenv("QTEST_SILENT_ERRORS"); } static int chardev_change(void *opaque) -- cgit v1.2.3