[oe-commits] Richard Purdie : qemuimage-testlib: Add delay to work around races in qemu startup

git at git.openembedded.org git at git.openembedded.org
Wed Mar 27 17:27:21 UTC 2013


Module: openembedded-core.git
Branch: danny
Commit: 27d00d62281a822efbbc189a3bab1d9b25fba3a7
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=27d00d62281a822efbbc189a3bab1d9b25fba3a7

Author: Richard Purdie <richard.purdie at linuxfoundation.org>
Date:   Wed Mar 20 09:27:39 2013 +0000

qemuimage-testlib: Add delay to work around races in qemu startup

Qemu changes pid when starting up. On a loaded machine, this can result
in the incorrect pid being returned. Since qemu will take a few seconds to
boot anyway, we might as well delay a short while and allow things to settle
which should fix various race issues being seen on the autobuilder.

Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 scripts/qemuimage-testlib |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/scripts/qemuimage-testlib b/scripts/qemuimage-testlib
index 42c3004..5096bfc 100755
--- a/scripts/qemuimage-testlib
+++ b/scripts/qemuimage-testlib
@@ -405,6 +405,8 @@ Test_Create_Qemu()
 		# Get the pid of the xterm processor, which will be used in Test_Kill_Qemu
 		XTERMPID=$!
 		echo "XTERMPID is $XTERMPID"
+		# When starting, qemu can reexecute itself and change PID so wait a short while for things to settle
+		sleep 5
 	fi
 
 	while [ ${up_time} -lt 10 ]





More information about the Openembedded-commits mailing list