]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
test: display qemuParseCommandline warnings when VIR_TEST_DEBUG > 0
authorLaine Stump <laine@laine.org>
Fri, 6 Jun 2014 12:40:31 +0000 (15:40 +0300)
committerLaine Stump <laine@laine.org>
Mon, 9 Jun 2014 10:51:06 +0000 (13:51 +0300)
commitb7b3fb56f565885c68a39a384c13c6cc33a68cef
tree13cc8d97b097a452ef8429afd521d64dd20caa5e
parent20d0c33aee34ea2bf36b1a2b648474e101ca1126
test: display qemuParseCommandline warnings when VIR_TEST_DEBUG > 0

qmeuargv2xmltest.c would fail any test that logged anything during
qemuParseCommandline(), but then discard the log message, even with
VIR_TEST_DEBUG=2. This patch outputs the log messages with
fprintf(stderr,...) when debug logging is on.

In the process of modifying that logic, the testInfo data was made
more similar to that of qemuxml2argvtest.c - rather than turning
info->extraFlags into a bool, an enum of flags is defined, the info
struct is given an "unsigned int flags", and FLAG_EXPECT_WARNING is
saved into info->flags, to be checked during the test; this will make
it easier to add other FLAG_EXPECT_* items in the future.
tests/qemuargv2xmltest.c