diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2018-11-20 10:56:57 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2018-11-20 10:56:57 +0000 |
commit | 3c035a41dca808f096a128fe2b62d849fe638a25 (patch) | |
tree | c8b77b0d31c4346f9d48f0172c11fe9391df088d /tests/libqtest.c | |
parent | 11f303a57829fff9296c3df313d02b50a33169dd (diff) | |
parent | ced09f9b07e425690d3bfe524cf93c4dbf4b26bc (diff) |
Merge remote-tracking branch 'remotes/huth-gitlab/tags/pull-request-2018-11-20' into staging
- One additional simple qmp-test
- A fix for ide-test
- Add logging of QEMU parameters in libqtest
# gpg: Signature made Tue 20 Nov 2018 10:47:12 GMT
# gpg: using RSA key 2ED9D774FE702DB5
# gpg: Good signature from "Thomas Huth <th.huth@gmx.de>"
# gpg: aka "Thomas Huth <thuth@redhat.com>"
# gpg: aka "Thomas Huth <huth@tuxfamily.org>"
# gpg: aka "Thomas Huth <th.huth@posteo.de>"
# Primary key fingerprint: 27B8 8847 EEE0 2501 18F3 EAB9 2ED9 D774 FE70 2DB5
* remotes/huth-gitlab/tags/pull-request-2018-11-20:
qtest: log QEMU command line
tests/ide: Free pcibus when finishing a test
tests: add qmp/missing-any-arg test
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tests/libqtest.c')
-rw-r--r-- | tests/libqtest.c | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/tests/libqtest.c b/tests/libqtest.c index 44ce118cfc..75e07e16e7 100644 --- a/tests/libqtest.c +++ b/tests/libqtest.c @@ -215,24 +215,28 @@ QTestState *qtest_init_without_qmp_handshake(bool use_oob, qtest_add_abrt_handler(kill_qemu_hook_func, s); + command = g_strdup_printf("exec %s " + "-qtest unix:%s,nowait " + "-qtest-log %s " + "-chardev socket,path=%s,nowait,id=char0 " + "-mon chardev=char0,mode=control%s " + "-machine accel=qtest " + "-display none " + "%s", qemu_binary, socket_path, + getenv("QTEST_LOG") ? "/dev/fd/2" : "/dev/null", + qmp_socket_path, use_oob ? ",x-oob=on" : "", + extra_args ?: ""); + + g_test_message("starting QEMU: %s", command); + s->qemu_pid = fork(); if (s->qemu_pid == 0) { setenv("QEMU_AUDIO_DRV", "none", true); - command = g_strdup_printf("exec %s " - "-qtest unix:%s,nowait " - "-qtest-log %s " - "-chardev socket,path=%s,nowait,id=char0 " - "-mon chardev=char0,mode=control%s " - "-machine accel=qtest " - "-display none " - "%s", qemu_binary, socket_path, - getenv("QTEST_LOG") ? "/dev/fd/2" : "/dev/null", - qmp_socket_path, use_oob ? ",x-oob=on" : "", - extra_args ?: ""); execlp("/bin/sh", "sh", "-c", command, NULL); exit(1); } + g_free(command); s->fd = socket_accept(sock); if (s->fd >= 0) { s->qmp_fd = socket_accept(qmpsock); |