diff options
author | Markus Armbruster <armbru@redhat.com> | 2018-08-06 08:53:22 +0200 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2018-08-16 08:42:06 +0200 |
commit | 4277f1ebd9b70ee38caddfe3c514d7a91e676bc1 (patch) | |
tree | 798924a380b4b4167c11da3a9ed10976620fb668 /tests/libqtest.c | |
parent | c146b54c7fdbd926ee8fc4369699e3480d54f6fa (diff) |
libqtest: Rename functions to send QMP messages
The functions to receive messages are called qtest_qmp_receive() and
qmp_receive(), qmp_fd_receive(). The ones to send messages are called
qtest_async_qmp(), qtest_async_qmpv(), qmp_async(), qmp_fd_send(),
qmp_fd_sendv(). Inconsistent. Rename the *_async* ones to
qmp_send(), qtest_qmp_send(), qtest_qmp_vsend(). Rename
qmp_fd_sendv() to qmp_fd_vsend().
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20180806065344.7103-2-armbru@redhat.com>
Diffstat (limited to 'tests/libqtest.c')
-rw-r--r-- | tests/libqtest.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/libqtest.c b/tests/libqtest.c index 098af6aec4..9cb4096639 100644 --- a/tests/libqtest.c +++ b/tests/libqtest.c @@ -484,7 +484,7 @@ QDict *qtest_qmp_receive(QTestState *s) * in the case that they choose to discard all replies up until * a particular EVENT is received. */ -void qmp_fd_sendv(int fd, const char *fmt, va_list ap) +void qmp_fd_vsend(int fd, const char *fmt, va_list ap) { va_list ap_copy; QObject *qobj; @@ -529,21 +529,21 @@ void qmp_fd_sendv(int fd, const char *fmt, va_list ap) } } -void qtest_async_qmpv(QTestState *s, const char *fmt, va_list ap) +void qtest_qmp_vsend(QTestState *s, const char *fmt, va_list ap) { - qmp_fd_sendv(s->qmp_fd, fmt, ap); + qmp_fd_vsend(s->qmp_fd, fmt, ap); } QDict *qmp_fdv(int fd, const char *fmt, va_list ap) { - qmp_fd_sendv(fd, fmt, ap); + qmp_fd_vsend(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); + qtest_qmp_vsend(s, fmt, ap); /* Receive reply */ return qtest_qmp_receive(s); @@ -565,7 +565,7 @@ void qmp_fd_send(int fd, const char *fmt, ...) va_list ap; va_start(ap, fmt); - qmp_fd_sendv(fd, fmt, ap); + qmp_fd_vsend(fd, fmt, ap); va_end(ap); } @@ -580,12 +580,12 @@ QDict *qtest_qmp(QTestState *s, const char *fmt, ...) return response; } -void qtest_async_qmp(QTestState *s, const char *fmt, ...) +void qtest_qmp_send(QTestState *s, const char *fmt, ...) { va_list ap; va_start(ap, fmt); - qtest_async_qmpv(s, fmt, ap); + qtest_qmp_vsend(s, fmt, ap); va_end(ap); } @@ -968,12 +968,12 @@ QDict *qmp(const char *fmt, ...) return response; } -void qmp_async(const char *fmt, ...) +void qmp_send(const char *fmt, ...) { va_list ap; va_start(ap, fmt); - qtest_async_qmpv(global_qtest, fmt, ap); + qtest_qmp_vsend(global_qtest, fmt, ap); va_end(ap); } |