tests: avoid test runner hanging on child test process join 48/23448/2
authorAndrew Yourtchenko <ayourtch@gmail.com>
Tue, 5 Nov 2019 00:08:26 +0000 (01:08 +0100)
committerAndrew Yourtchenko <ayourtch@gmail.com>
Mon, 18 Nov 2019 13:17:27 +0000 (13:17 +0000)
commit7f9603d90a68a7905e3e8d6095806324b8a1e169
treea2ce43d92e688815f31486fd078dc00747c52395
parent22dec9695162a0af2a4709762cdc767f08819895
tests: avoid test runner hanging on child test process join

In parallel test, the single process is spawning
a bunch of child processes running the tests,
and communicates to them. When the child process
signals that it has finished, the parent calls
child.join(). Sometimes this join never returns.
The result is a lot of defunct python processes,
and the test run just hangs.

I have seen this failure intermittently a fair bit
in a busy containerized environment, and by chance,
consistently reproduced it on a Thinkpad X280
with 8G of RAM and Ubuntu 19.04, which allowed
to diagnose it.

Type: test
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Change-Id: If0a3110fc2d23e73d77c310d61c3ea90a2b53610
(cherry picked from commit 42693521f6046997133c8f63bcfc9d615d96f69d)
test/run_tests.py