]> 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)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 23 Jun 2020 11:27:51 +0000 (12:27 +0100)
commit9b251dcaffe52d32c1faf41ab57ab414fbc29722
tree8e7e09cbb303191a231be76dea87e3d969d22b30
parentd15d0177d328fa3a126b9942bda177f6fae68505
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>
meta/lib/oeqa/utils/commands.py