mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 03:12:22 +00:00
tests: qemumonitorjson: Fix name and call apropriate API
Call the internal version of qemuMonitorGetAllBlockStatsInfo API and rename the test accordingly. Signed-off-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
dca4abc0e3
commit
b4891e997c
@ -1674,7 +1674,7 @@ testQemuMonitorJSONqemuMonitorJSONGetBlockInfo(const void *data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
testQemuMonitorJSONqemuMonitorJSONGetBlockStatsInfo(const void *data)
|
testQemuMonitorJSONqemuMonitorJSONGetAllBlockStatsInfo(const void *data)
|
||||||
{
|
{
|
||||||
virDomainXMLOptionPtr xmlopt = (virDomainXMLOptionPtr)data;
|
virDomainXMLOptionPtr xmlopt = (virDomainXMLOptionPtr)data;
|
||||||
qemuMonitorTestPtr test = qemuMonitorTestNewSimple(true, xmlopt);
|
qemuMonitorTestPtr test = qemuMonitorTestNewSimple(true, xmlopt);
|
||||||
@ -1772,6 +1772,9 @@ testQemuMonitorJSONqemuMonitorJSONGetBlockStatsInfo(const void *data)
|
|||||||
if (!test)
|
if (!test)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
if (!(blockstats = virHashCreate(10, virHashValueFree)))
|
||||||
|
goto cleanup;
|
||||||
|
|
||||||
if (qemuMonitorTestAddItem(test, "query-blockstats", reply) < 0)
|
if (qemuMonitorTestAddItem(test, "query-blockstats", reply) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
@ -1805,13 +1808,13 @@ testQemuMonitorJSONqemuMonitorJSONGetBlockStatsInfo(const void *data)
|
|||||||
CHECK0FULL(wr_highest_offset, WR_HIGHEST_OFFSET, "%llu", "%llu") \
|
CHECK0FULL(wr_highest_offset, WR_HIGHEST_OFFSET, "%llu", "%llu") \
|
||||||
CHECK0FULL(wr_highest_offset_valid, WR_HIGHEST_OFFSET_VALID, "%d", "%d")
|
CHECK0FULL(wr_highest_offset_valid, WR_HIGHEST_OFFSET_VALID, "%d", "%d")
|
||||||
|
|
||||||
if (qemuMonitorGetAllBlockStatsInfo(qemuMonitorTestGetMonitor(test),
|
if (qemuMonitorJSONGetAllBlockStatsInfo(qemuMonitorTestGetMonitor(test),
|
||||||
&blockstats, false) < 0)
|
blockstats, false) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (!blockstats) {
|
if (!blockstats) {
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||||
"qemuMonitorJSONGetBlockStatsInfo didn't return stats");
|
"qemuMonitorJSONGetAllBlockStatsInfo didn't return stats");
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2972,7 +2975,7 @@ mymain(void)
|
|||||||
DO_TEST_GEN(qemuMonitorJSONDetachCharDev);
|
DO_TEST_GEN(qemuMonitorJSONDetachCharDev);
|
||||||
DO_TEST(qemuMonitorJSONGetBalloonInfo);
|
DO_TEST(qemuMonitorJSONGetBalloonInfo);
|
||||||
DO_TEST(qemuMonitorJSONGetBlockInfo);
|
DO_TEST(qemuMonitorJSONGetBlockInfo);
|
||||||
DO_TEST(qemuMonitorJSONGetBlockStatsInfo);
|
DO_TEST(qemuMonitorJSONGetAllBlockStatsInfo);
|
||||||
DO_TEST(qemuMonitorJSONGetMigrationCacheSize);
|
DO_TEST(qemuMonitorJSONGetMigrationCacheSize);
|
||||||
DO_TEST(qemuMonitorJSONGetMigrationStats);
|
DO_TEST(qemuMonitorJSONGetMigrationStats);
|
||||||
DO_TEST(qemuMonitorJSONGetChardevInfo);
|
DO_TEST(qemuMonitorJSONGetChardevInfo);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user