On 07/30/2013 07:05 AM, Peter Krempa wrote:
This patch adds helpers that allow to check for argument values in
commands sent to the monitor.
---
tests/qemumonitortestutils.c | 174 ++++++++++++++++++++++++++++++++++++++++---
tests/qemumonitortestutils.h | 5 ++
2 files changed, 170 insertions(+), 9 deletions(-)
+ "Missing arguments section
for command '%s'",
+ data->command_name);
+ goto cleanup;
+ }
+
+ /* validate the args */
+ for (i = 0; i < data->nargs; i++) {
Indentation of the comment is off.
+++ b/tests/qemumonitortestutils.h
@@ -34,6 +34,11 @@ qemuMonitorTestAddItem(qemuMonitorTestPtr test,
int qemuMonitorTestAddAgentSyncResponse(qemuMonitorTestPtr test);
+int qemuMonitorTestAddItemParams(qemuMonitorTestPtr test,
+ const char *cmdname,
+ const char *response,
+ ...);
Might be worth adding an ATTRIBUTE_SENTINEL on the prototype of this
function, so that gcc ensures that a caller ends the list with a NULL.
ACK with those fixes.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org