mirror of
https://git.yoctoproject.org/poky
synced 2026-04-30 21:32:13 +02:00
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: a62263761fc77c139d418236cc52b04bed629229) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -45,7 +45,7 @@ if [ $RET -eq 0 ]; then
|
||||
# If qemu start up process ends up, it means shutdown completes
|
||||
while [ $i -lt $TIMEOUT ]
|
||||
do
|
||||
ps -fp $PID > /dev/null
|
||||
ps -fp $QEMUPID > /dev/null 2> /dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
RET=0
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user