]> git.proxmox.com Git - mirror_qemu.git/commit
qtest: fix qtest log fd should be initialized before qtest chardev
authorLi Liu <john.liuli@huawei.com>
Wed, 22 Oct 2014 02:26:47 +0000 (10:26 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 23 Oct 2014 14:41:27 +0000 (16:41 +0200)
commit107684c05d80c457aa6e81d090b36a1a294110ec
tree97a961eff2284c600f5f29c7e6840082395c92a3
parent5dd4a88c37f93f525828a8592168fb5d03f9e842
qtest: fix qtest log fd should be initialized before qtest chardev

qtest_log_fp should be inited before qemu_chr_add_handlers.
If not the log dumped from callback functions may be lost.

easy to reproduce it by command:
"QTEST_LOG=1 QTEST_QEMU_BINARY=x86_64-softmmu/qemu-system-x86_64
gtester -k --verbose -m=quick tests/qdev-monitor-test"

The log "[I xxxxxx] OPENED" should be printed out by
qtest_event, but does not.

Signed-off-by: Li Liu <john.liuli@huawei.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
qtest.c