tests/libqtest: Introduce qtest_init_with_serial()

Run qtest with a socket that connects QEMU chardev and test code.

Signed-off-by: Julia Suvorova <jusual@mail.ru>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-id: 20190123120759.7162-2-jusual@mail.ru
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Julia Suvorova 2019-01-29 11:46:04 +00:00 committed by Peter Maydell
parent 047be4ed24
commit 6c90a82c93
2 changed files with 36 additions and 0 deletions

View file

@ -62,6 +62,17 @@ QTestState *qtest_init(const char *extra_args);
*/
QTestState *qtest_init_without_qmp_handshake(const char *extra_args);
/**
* qtest_init_with_serial:
* @extra_args: other arguments to pass to QEMU. CAUTION: these
* arguments are subject to word splitting and shell evaluation.
* @sock_fd: pointer to store the socket file descriptor for
* connection with serial.
*
* Returns: #QTestState instance.
*/
QTestState *qtest_init_with_serial(const char *extra_args, int *sock_fd);
/**
* qtest_quit:
* @s: #QTestState instance to operate on.