aboutsummaryrefslogtreecommitdiff
path: root/tests/qtest/libqos
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@redhat.com>2021-02-23 14:46:43 +0000
committerKevin Wolf <kwolf@redhat.com>2021-03-08 14:55:19 +0100
commit9fb7bb06986741b7fd8427fac9f22177ca38dcff (patch)
tree59817ff3c74fb8d1daa6239a5a05695a0722a7dc /tests/qtest/libqos
parent535255b43898d2e96744057eb86f8497d4d7a461 (diff)
libqtest: add qtest_socket_server()
Add an API that returns a new UNIX domain socket in the listen state. The code for this was already there but only used internally in init_socket(). This new API will be used by vhost-user-blk-test. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com> Message-Id: <20210223144653.811468-3-stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'tests/qtest/libqos')
-rw-r--r--tests/qtest/libqos/libqtest.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/qtest/libqos/libqtest.h b/tests/qtest/libqos/libqtest.h
index 724f65aa94..e5f1ec590c 100644
--- a/tests/qtest/libqos/libqtest.h
+++ b/tests/qtest/libqos/libqtest.h
@@ -133,6 +133,14 @@ void qtest_qmp_send_raw(QTestState *s, const char *fmt, ...)
GCC_FMT_ATTR(2, 3);
/**
+ * qtest_socket_server:
+ * @socket_path: the UNIX domain socket path
+ *
+ * Create and return a listen socket file descriptor, or abort on failure.
+ */
+int qtest_socket_server(const char *socket_path);
+
+/**
* qtest_vqmp_fds:
* @s: #QTestState instance to operate on.
* @fds: array of file descriptors