summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorJuro Bystricky <juro.bystricky@intel.com>2017-09-12 12:23:27 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-09-13 22:07:42 +0100
commit03aa1ef733032e1acae4d291580968301679117f (patch)
tree8ab91f214b8222b1742e0877a1cc961a4cacf69a /meta
parent92a08ae838119e938922f95c14d0fcfece65a69a (diff)
downloadpoky-03aa1ef733032e1acae4d291580968301679117f.tar.gz
qemurunner.py: wait for PID to appear in procfs
We need QEMU PID in order to access "/proc/<qemupid>/cmdline" Having a valid QEMU PID does not mean we can access the proc entry immediately, we need to wait for the /proc/<qemupid> to appear before we can access it. (From OE-Core rev: d2d069fa9910d1c7a94c898355a63fca03ec5ad8) Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/lib/oeqa/utils/qemurunner.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py
index 9073315fba..427ae23b1b 100644
--- a/meta/lib/oeqa/utils/qemurunner.py
+++ b/meta/lib/oeqa/utils/qemurunner.py
@@ -394,9 +394,10 @@ class QemuRunner:
394 f = open(self.qemu_pidfile, 'r') 394 f = open(self.qemu_pidfile, 'r')
395 qemu_pid = f.read() 395 qemu_pid = f.read()
396 f.close() 396 f.close()
397 #logger.info("qemu_pid: %s" % qemu_pid) 397 qemupid = int(qemu_pid)
398 self.qemupid = int(qemu_pid) 398 if os.path.exists("/proc/" + str(qemupid)):
399 return True 399 self.qemupid = qemupid
400 return True
400 return False 401 return False
401 402
402 def run_serial(self, command, raw=False, timeout=5): 403 def run_serial(self, command, raw=False, timeout=5):