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>
This commit is contained in:
Richard Henderson 2018-12-16 19:58:16 -08:00 committed by Thomas Huth
parent 43497c438d
commit 21f80286cc
3 changed files with 67 additions and 31 deletions

View file

@ -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