@@ -927,7 +927,6 @@ static inline int64_t clock_set(int64_t val)
QDict *qmp_fd_receive(int fd);
void qmp_fd_sendv(int fd, const char *fmt, va_list ap);
void qmp_fd_send(int fd, const char *fmt, ...);
-QDict *qmp_fdv(int fd, const char *fmt, va_list ap);
-QDict *qmp_fd(int fd, const char *fmt, ...);
+QDict *qmp_fd(int fd, const char *msg);
#endif
@@ -469,13 +469,6 @@ void qtest_async_qmpv(QTestState *s, const char *fmt, va_list ap)
qmp_fd_sendv(s->qmp_fd, fmt, ap);
}
-QDict *qmp_fdv(int fd, const char *fmt, va_list ap)
-{
- qmp_fd_sendv(fd, fmt, ap);
-
- return qmp_fd_receive(fd);
-}
-
QDict *qtest_qmpv(QTestState *s, const char *fmt, va_list ap)
{
qtest_async_qmpv(s, fmt, ap);
@@ -484,15 +477,11 @@ QDict *qtest_qmpv(QTestState *s, const char *fmt, va_list ap)
return qtest_qmp_receive(s);
}
-QDict *qmp_fd(int fd, const char *fmt, ...)
+QDict *qmp_fd(int fd, const char *msg)
{
- va_list ap;
- QDict *response;
+ qmp_fd_send(fd, msg);
- va_start(ap, fmt);
- response = qmp_fdv(fd, fmt, ap);
- va_end(ap);
- return response;
+ return qmp_fd_receive(fd);
}
void qmp_fd_send(int fd, const char *fmt, ...)
Now that no more clients are passing variadic arguments, we can simplify the testsuite by requiring that qmp_fd() be given the final string to pass over the wire, rather than a dynamic JSON string that has to be parsed into QObject and back out again. Signed-off-by: Eric Blake <eblake@redhat.com> --- tests/libqtest.h | 3 +-- tests/libqtest.c | 17 +++-------------- 2 files changed, 4 insertions(+), 16 deletions(-)