]> code.ossystems Code Review - openembedded-core.git/commit
oeqa/utils/command: Improve stdin handling in runCmd
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 22 Jun 2020 21:52:35 +0000 (22:52 +0100)
committerSteve Sakoman <steve@sakoman.com>
Fri, 26 Jun 2020 21:53:05 +0000 (11:53 -1000)
commit9034ac93518b74dae5e05776c0bce085171cdd1f
tree0abd21b334fbf51207aba5e81973610ffb08f1c4
parent773f97c6f56ed98a7b0821358d7435ed3ea7a3d6
oeqa/utils/command: Improve stdin handling in runCmd

Occasionally we've been seeing leftover threads from runCmd. The stdin test
assumes we clean up all threads but the code assumes that the daemonic thread
can be left behind.

The issue can be reproduced by adding a time.sleep(10) to the end of
writeThread() which will mean it stays resident past the end of the command.

We may as well add it to the threads list and clean it up properly,
hopefully removing the race in the tests from the autobuilder.

[YOCTO #13055]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 9b251dcaffe52d32c1faf41ab57ab414fbc29722)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
meta/lib/oeqa/utils/commands.py