[oe-commits] [openembedded-core] 33/43: qemurunner.py: wait for PID to appear in procfs

git at git.openembedded.org git at git.openembedded.org
Sat Mar 3 08:36:34 UTC 2018


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch pyro-next
in repository openembedded-core.

commit bf05abc7931a9a9e0823b24c6f4df4f93913da82
Author: Juro Bystricky <juro.bystricky at intel.com>
AuthorDate: Tue Sep 12 12:23:27 2017 -0700

    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 at intel.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
    Signed-off-by: Armin Kuster <akuster808 at gmail.com>
---
 meta/lib/oeqa/utils/qemurunner.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py
index 59886b1..be50d5e 100644
--- a/meta/lib/oeqa/utils/qemurunner.py
+++ b/meta/lib/oeqa/utils/qemurunner.py
@@ -393,9 +393,10 @@ class QemuRunner:
             f = open(self.qemu_pidfile, 'r')
             qemu_pid = f.read()
             f.close()
-            #logger.info("qemu_pid: %s" % qemu_pid)
-            self.qemupid = int(qemu_pid)
-            return True
+            qemupid = int(qemu_pid)
+            if os.path.exists("/proc/" + str(qemupid)):
+                self.qemupid = qemupid
+                return True
         return False
 
     def run_serial(self, command, raw=False, timeout=5):

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list