mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-01 23:03:54 -06:00
tests: send error_report to test log
Implement error_vprintf to send the output of error_report to the test log. This silences test-vmstate. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <1477326663-67817-3-git-send-email-pbonzini@redhat.com>
This commit is contained in:
parent
397d30e940
commit
28017e010d
2 changed files with 20 additions and 1 deletions
|
@ -4,7 +4,13 @@
|
|||
|
||||
void error_vprintf(const char *fmt, va_list ap)
|
||||
{
|
||||
vfprintf(stderr, fmt, ap);
|
||||
if (g_test_initialized() && !g_test_subprocess()) {
|
||||
char *msg = g_strdup_vprintf(fmt, ap);
|
||||
g_test_message("%s", msg);
|
||||
g_free(msg);
|
||||
} else {
|
||||
vfprintf(stderr, fmt, ap);
|
||||
}
|
||||
}
|
||||
|
||||
void error_vprintf_unless_qmp(const char *fmt, va_list ap)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue