diff options
author | Juro Bystricky <juro.bystricky@intel.com> | 2017-09-12 12:23:27 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-03-04 11:11:58 +0000 |
commit | dd79b50980af63a009f3170e84a66ecc58d3222a (patch) | |
tree | 69c160fa1f8981bd5031b22b9bca76d5c172ddc1 /meta/lib | |
parent | 8100e7c44e77b3f039a21c6c4c5f025b9733c6ab (diff) | |
download | poky-dd79b50980af63a009f3170e84a66ecc58d3222a.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)
(From OE-Core rev: bf05abc7931a9a9e0823b24c6f4df4f93913da82)
Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r-- | meta/lib/oeqa/utils/qemurunner.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py index 59886b10ed..be50d5e771 100644 --- a/meta/lib/oeqa/utils/qemurunner.py +++ b/meta/lib/oeqa/utils/qemurunner.py | |||
@@ -393,9 +393,10 @@ class QemuRunner: | |||
393 | f = open(self.qemu_pidfile, 'r') | 393 | f = open(self.qemu_pidfile, 'r') |
394 | qemu_pid = f.read() | 394 | qemu_pid = f.read() |
395 | f.close() | 395 | f.close() |
396 | #logger.info("qemu_pid: %s" % qemu_pid) | 396 | qemupid = int(qemu_pid) |
397 | self.qemupid = int(qemu_pid) | 397 | if os.path.exists("/proc/" + str(qemupid)): |
398 | return True | 398 | self.qemupid = qemupid |
399 | return True | ||
399 | return False | 400 | return False |
400 | 401 | ||
401 | def run_serial(self, command, raw=False, timeout=5): | 402 | def run_serial(self, command, raw=False, timeout=5): |