diff options
author | Alexander Bulekov <alxndr@bu.edu> | 2020-02-19 23:11:03 -0500 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2020-02-22 08:26:47 +0000 |
commit | ca5d464151c72695a960d0f493f2fe7c083e468f (patch) | |
tree | 400e9d1f5b3f2e4e97f8005705414c7c7daa301d /tests/qtest/libqtest.h | |
parent | 075334810b3c795c7120eecaf18945befbb816c6 (diff) | |
download | qemu-ca5d464151c72695a960d0f493f2fe7c083e468f.zip qemu-ca5d464151c72695a960d0f493f2fe7c083e468f.tar.gz qemu-ca5d464151c72695a960d0f493f2fe7c083e468f.tar.bz2 |
libqtest: make bufwrite rely on the TransportOps
When using qtest "in-process" communication, qtest_sendf directly calls
a function in the server (qtest.c). Previously, bufwrite used
socket_send, which bypasses the TransportOps enabling the call into
qtest.c. This change replaces the socket_send calls with ops->send,
maintaining the benefits of the direct socket_send call, while adding
support for in-process qtest calls.
Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Message-id: 20200220041118.23264-8-alxndr@bu.edu
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'tests/qtest/libqtest.h')
-rw-r--r-- | tests/qtest/libqtest.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/qtest/libqtest.h b/tests/qtest/libqtest.h index c9e21e0..f5cf93c 100644 --- a/tests/qtest/libqtest.h +++ b/tests/qtest/libqtest.h @@ -729,4 +729,8 @@ bool qtest_probe_child(QTestState *s); */ void qtest_set_expected_status(QTestState *s, int status); +QTestState *qtest_inproc_init(QTestState **s, bool log, const char* arch, + void (*send)(void*, const char*)); + +void qtest_client_inproc_recv(void *opaque, const char *str); #endif |