Commit Graph

5 Commits

Author SHA1 Message Date
Richard Purdie c2835acc80 qemuimage-testlib-pythonhelper: Make the process detection more strict
Old versions of ldd (2.11) as run on some of the autobuilders end up running
commands like "LD_xxxx qemu-system-xxx" which this process detection code
would pick up and result in the wrong PID for qemu.

This changes the code to check for "192.168" in the command so we know
we're getting the correct one. This is less than ideal however we're
running out of options and resolves false negatives we see on the
autobuilder.

(From OE-Core rev: 7b43151bb073f1f6f1fa5a31447b742127060909)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-29 14:45:07 +01:00
Richard Purdie 0b57f39088 qemuimage-testlib-pythonhelper: Fix process mixups
runqemu-internal runs "ldd qemu-system xxx" and the detection code was returning this
as the PID of qemu. This patch improves the detection code to avoid this problem,
fixing certain race type failures on the autobuilder.

(From OE-Core rev: fc914a6fb3204f8b5bdfc0f56364606673d5356a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-05 11:13:53 +01:00
Richard Purdie cc7f542947 qemuimage-testlib: Use ww option to ps to ensure command output isn't truncated
(From OE-Core rev: 1347381b4f93b318fadc2360c4adf0c68b562b13)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-30 13:04:10 +00:00
Paul Eggleton b45d63e2ec qemuimagetest: fix erroneous ps errors when qemu couldn't be started
The helper script was printing an error to stdout when it couldn't find
any qemu child processes; output this error to stderr instead and
redirect stderr to /dev/null when running from qemuimage-testlib so that
QEMUPID is actually blank if there are no qemu instances found.

(From OE-Core rev: 7c2137a07cca8e1d40d3c8b4b2c6321d80f2b1de)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-26 17:50:08 +00:00
Richard Purdie 6c9743d9b9 qemu-testlib: Add python helper and simplify shell
The current code has a race since it greps for *any* qemu process
running, even if it isn't the one we started. This leads to some sanity
tests potentially failing on machines where multiple sets of sanity tests
are running.

To resovle this and some other ugly code issues, add a python script
to accurately walk the process tree and find the qemu process. We can
then replace all the shell functions attempting this which happen to
work in many cases but not all.

Also clean up some of the error handling so its more legible.

(From OE-Core rev: b9e052ed6b604f0049bcfa968a57f15d6e3d6395)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-19 11:48:30 +00:00