Eric Blake <ebl...@redhat.com> writes: > On 09/18/2015 06:00 AM, Markus Armbruster wrote: >> New convenience function hmp() to facilitate use of >> human-monitor-command in tests. Use it to simplify its existing uses. >> >> To blend into existing libqtest code, also add qtest_hmpv() and >> qtest_hmp(). That, and the egregiously verbose GTK-Doc comment format >> make this patch look bigger than it is. >> >> Signed-off-by: Markus Armbruster <arm...@redhat.com> >> --- >> tests/drive_del-test.c | 22 ++++++---------------- >> tests/ide-test.c | 8 ++------ >> tests/libqtest.c | 35 +++++++++++++++++++++++++++++++++++ >> tests/libqtest.h | 33 +++++++++++++++++++++++++++++++++ >> 4 files changed, 76 insertions(+), 22 deletions(-) >> > > >> @@ -774,6 +801,14 @@ void qmp_discard_response(const char *fmt, ...) >> qtest_qmpv_discard_response(global_qtest, fmt, ap); >> va_end(ap); >> } >> +char *hmp(const char *fmt, ...) >> +{ >> + va_list ap; >> + >> + va_start(ap, fmt); >> + return qtest_hmpv(global_qtest, fmt, ap); >> + va_end(ap); > > Umm, that isn't quite what you meant :)
D'oh! > With the dead code after return fixed, > > Reviewed-by: Eric Blake <ebl...@redhat.com> Thanks!