Skip to content

qemurunner.py: simplify search for QEMU PID

Juro Bystricky openembedded-core 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest1 patch 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1qemurunner.py: refactor searching for QEMU PIDmeta/lib/oeqa/utils/qemurunner.py+136 -1670 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/1] qemurunner.py: simplify search for QEMU PID

This patch greatly simplifies the code in qemurunner.py that tries to determine the PID of the running qemu (started by qemurunner->runqemu->...->qemu-system-xxx)). The original code needed to search and analyze all processes to determine which "qemu-system-xxx" was a direct descendant of qemurunner.py. As it turns out, qemu can readily report its own PID, if asked via the argument "-pidfile file". The new code passes this argument and then simply loops waiting for "file" to appear (with a timeout value as before). Once this happens, it reads the contents of the file and reports the value (PID).
The file containing the qemu PIDis deleted after qemurunner terminates.

The patch was tested with :

$ bitbake core-image-sato -c testimage
$ oe-selftest --all

Juro Bystricky (1):
qemurunner.py: refactor searching for QEMU PID

 meta/lib/oeqa/utils/qemurunner.py | 303 +++++++++++++++++---------------------
 1 file changed, 136 insertions(+), 167 deletions(-)
Signature · 1 line
2.7.4