提交 b3a0e3aa 编写于 作者: P Peter Krempa

tests: qemumonitorjson: Fix schema testing of monitor commands

The 'simpleFunc' data structure is overwritten by the code generated
from the macros which initiate the tests. This means that most of the
tests would get NULL 'schema' member which means that the schema
validation would not take place.
Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
上级 1fc11023
......@@ -2879,7 +2879,6 @@ mymain(void)
ret = -1;
goto cleanup;
}
simpleFunc.schema = qapiData.schema;
#define DO_TEST(name) \
if (virTestRun(# name, testQemuMonitorJSON ## name, driver.xmlopt) < 0) \
......@@ -2887,7 +2886,9 @@ mymain(void)
#define DO_TEST_SIMPLE(CMD, FNC, ...) \
simpleFunc = (testQemuMonitorJSONSimpleFuncData) {.cmd = CMD, .func = FNC, \
.xmlopt = driver.xmlopt, __VA_ARGS__ }; \
.xmlopt = driver.xmlopt, \
.schema = qapiData.schema, \
__VA_ARGS__ }; \
if (virTestRun(# FNC, testQemuMonitorJSONSimpleFunc, &simpleFunc) < 0) \
ret = -1
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册