summaryrefslogtreecommitdiffstats
path: root/scripts/qemuimage-tests
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-03-19 11:44:27 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-03-19 11:48:30 +0000
commit6c9743d9b9754db97b3447d6d3e172c828aa0185 (patch)
treef21e26c2e4c9a9b90b4f0eca001a5a2ed2b7df52 /scripts/qemuimage-tests
parent87cfde2559daec564731c5c25df04eec27eaf7d5 (diff)
downloadpoky-6c9743d9b9754db97b3447d6d3e172c828aa0185.tar.gz
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>
Diffstat (limited to 'scripts/qemuimage-tests')
-rwxr-xr-xscripts/qemuimage-tests/sanity/shutdown2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/qemuimage-tests/sanity/shutdown b/scripts/qemuimage-tests/sanity/shutdown
index d55c859410..c9e931c4c2 100755
--- a/scripts/qemuimage-tests/sanity/shutdown
+++ b/scripts/qemuimage-tests/sanity/shutdown
@@ -45,7 +45,7 @@ if [ $RET -eq 0 ]; then
45 # If qemu start up process ends up, it means shutdown completes 45 # If qemu start up process ends up, it means shutdown completes
46 while [ $i -lt $TIMEOUT ] 46 while [ $i -lt $TIMEOUT ]
47 do 47 do
48 ps -fp $PID > /dev/null 48 ps -fp $QEMUPID > /dev/null 2> /dev/null
49 if [ $? -ne 0 ]; then 49 if [ $? -ne 0 ]; then
50 RET=0 50 RET=0
51 break 51 break