Message ID | 87mukov6vk.fsf@dusky.pond.sub.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | None | expand |
Patchew URL: https://patchew.org/QEMU/87mukov6vk.fsf@dusky.pond.sub.org/ Hi, This series failed the asan build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN === #!/bin/bash time make docker-test-debug@fedora TARGET_LIST=x86_64-softmmu J=14 NETWORK=1 === TEST SCRIPT END === AR libqemuutil.a LINK elf2dmp AS optionrom/multiboot.o /tmp/qemu-test/src/chardev/char-pty.c:214:5: error: implicit declaration of function 'qemu_printf' is invalid in C99 [-Werror,-Wimplicit-function-declaration] qemu_printf("char device redirected to %s (label %s)\n", ^ /tmp/qemu-test/src/chardev/char-pty.c:214:5: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes] 2 errors generated. LINK ivshmem-client LINK ivshmem-server The full log is available at http://patchew.org/logs/87mukov6vk.fsf@dusky.pond.sub.org/testing.asan/?type=message. --- Email generated automatically by Patchew [https://patchew.org/]. Please send your feedback to patchew-devel@redhat.com
diff --git a/chardev/char-pty.c b/chardev/char-pty.c index b034332edd..4ff2f328fa 100644 --- a/chardev/char-pty.c +++ b/chardev/char-pty.c @@ -211,8 +211,8 @@ static void char_pty_open(Chardev *chr, qemu_set_nonblock(master_fd); chr->filename = g_strdup_printf("pty:%s", pty_name); - error_printf("char device redirected to %s (label %s)\n", - pty_name, chr->label); + qemu_printf("char device redirected to %s (label %s)\n", + pty_name, chr->label); s = PTY_CHARDEV(chr); s->ioc = QIO_CHANNEL(qio_channel_file_new_fd(master_fd));
char_pty_open() prints a "char device redirected to PTY_NAME (label LABEL)" message to the current monitor or else to stderr. This is not an error, so it shouldn't go to stderr. Print it to stdout instead. Why is it even printed? No other ChardevClass::open() prints anything on success. It's because you need to know PTY_NAME to actually use this char device, e.g. like e.g. "socat STDIO,cfmakeraw FILE:PTY_NAME" to use the monitor's readline interface. You can get PTY_NAME with "info chardev" (a.k.a. query-chardev for QMP), but only if you already have a monitor. Signed-off-by: Markus Armbruster <armbru@redhat.com> --- chardev/char-pty.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)