]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commit
oeqa/qemurunner: do not use Popen.poll() when terminating runqemu with a signal
authorAlexander Kanavin <alex.kanavin@gmail.com>
Mon, 30 Jan 2023 22:11:25 +0000 (23:11 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 1 Feb 2023 13:59:56 +0000 (13:59 +0000)
commitcd3e55606c427287f37585c5d7cde936471e52f4
treeb69ad5619909c8bd6820aca4275cd4587a35942c
parent29558f6218f4676b459f2c78f82d245339d51c8c
oeqa/qemurunner: do not use Popen.poll() when terminating runqemu with a signal

This does not actually guarantee that the child runqemu process has completely exited:
poll() may return prematurely while the SIGTERM handler in runqemu is still running.
This thwarts the rest of the processing, and may terminate the handler before
it completes.

Use Popen.communicate() instead: this is what python documentation recommends as well:
https://docs.python.org/3/library/subprocess.html#subprocess.Popen.communicate

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/utils/qemurunner.py