On 2019-01-23 13:07, Julia Suvorova wrote: > Run qtest with a socket that connects QEMU chardev and test code. > > Signed-off-by: Julia Suvorova <jus...@mail.ru> > Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> > --- > tests/libqtest.c | 25 +++++++++++++++++++++++++ > tests/libqtest.h | 11 +++++++++++ > 2 files changed, 36 insertions(+) > > diff --git a/tests/libqtest.c b/tests/libqtest.c > index 55750dd68d..6fb30855fa 100644 > --- a/tests/libqtest.c > +++ b/tests/libqtest.c > @@ -315,6 +315,31 @@ QTestState *qtest_initf(const char *fmt, ...) > return s; > } > > +QTestState *qtest_init_with_serial(const char *extra_args, int *sock_fd) > +{ > + int sock_fd_init; > + char *sock_path, sock_dir[] = "/tmp/qtest-serial-XXXXXX"; > + QTestState *qts; > + > + g_assert_true(mkdtemp(sock_dir) != NULL);
Oh, nice, I wasn't aware of g_assert_true yet, that's a good idea here, indeed. Reviewed-by: Thomas Huth <th...@redhat.com>