diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2023-06-06 15:56:43 +0400 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2023-06-27 17:08:56 +0200 |
commit | ed097649b55065b3b7da0ca54596e876b29c2561 (patch) | |
tree | bfd6936301ed9a7cc717c13594a616b635145b8d /tests/qtest/libqtest.c | |
parent | 6cc5a6159a0067fefbe0b7912c187018aa4b460a (diff) |
qtest: add qtest_pid()
Used in the following test on win32, to share sockets with the QEMU
process.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20230606115658.677673-7-marcandre.lureau@redhat.com>
Diffstat (limited to 'tests/qtest/libqtest.c')
-rw-r--r-- | tests/qtest/libqtest.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/qtest/libqtest.c b/tests/qtest/libqtest.c index de03ef5f60..79152f0ec3 100644 --- a/tests/qtest/libqtest.c +++ b/tests/qtest/libqtest.c @@ -142,6 +142,11 @@ static int socket_accept(int sock) return ret; } +pid_t qtest_pid(QTestState *s) +{ + return s->qemu_pid; +} + bool qtest_probe_child(QTestState *s) { pid_t pid = s->qemu_pid; |