libqtest: make bufwrite rely on the TransportOps
commitca5d464151c72695a960d0f493f2fe7c083e468f
authorAlexander Bulekov <alxndr@bu.edu>
Thu, 20 Feb 2020 04:11:03 +0000 (19 23:11 -0500)
committerStefan Hajnoczi <stefanha@redhat.com>
Sat, 22 Feb 2020 08:26:47 +0000 (22 08:26 +0000)
tree400e9d1f5b3f2e4e97f8005705414c7c7daa301d
parent075334810b3c795c7120eecaf18945befbb816c6
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>
tests/qtest/libqtest.c
tests/qtest/libqtest.h