diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2018-12-16 19:58:16 -0800 |
---|---|---|
committer | Thomas Huth <thuth@redhat.com> | 2018-12-17 15:37:50 +0100 |
commit | 21f80286cc48142c2df1530eba32bd70131a1bdc (patch) | |
tree | 691406632c7a10e93f1cede7e7f77b6211355b88 /tests/libqtest.h | |
parent | 43497c438d55e0e22369a6c633f9c8e3f6a498f2 (diff) |
tests: Exit boot-serial-test loop if child dies
There's no point in waiting 5 full minutes when there will be
no more output. Compute timeout based on elapsed wall clock
time instead of N * delays, as the delay is a minimum sleep time.
Cc: Thomas Huth <thuth@redhat.com>
Cc: Laurent Vivier <lvivier@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
[thuth: Replaced global_qtest with local qts variable]
Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'tests/libqtest.h')
-rw-r--r-- | tests/libqtest.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/libqtest.h b/tests/libqtest.h index 96a6c01352..9758c51be6 100644 --- a/tests/libqtest.h +++ b/tests/libqtest.h @@ -1011,4 +1011,12 @@ bool qmp_rsp_is_err(QDict *rsp); */ void qmp_assert_error_class(QDict *rsp, const char *class); +/** + * qtest_probe_child: + * @s: QTestState instance to operate on. + * + * Returns: true if the child is still alive. + */ +bool qtest_probe_child(QTestState *s); + #endif |