tests: avoid test runner hanging on child test process join 35/23235/2
authorAndrew Yourtchenko <ayourtch@gmail.com>
Tue, 5 Nov 2019 00:08:26 +0000 (01:08 +0100)
committerOle Trøan <otroan@employees.org>
Tue, 5 Nov 2019 09:06:15 +0000 (09:06 +0000)
commit42693521f6046997133c8f63bcfc9d615d96f69d
tree7485a37e8d8470875bf8b6b3696bfaeee3135a0d
parentf7f49640bbb4339d71f8b713b04b8f401d5fc270
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
test/run_tests.py