summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorAlejandro Hernandez <alejandro.hernandez@linux.intel.com>2015-08-06 18:44:22 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-08-09 00:13:56 -0700
commit0658434ee3c97bc27b9aa7bde682309af5c2f3c3 (patch)
tree7a2db317e0c1e129b2bd6b5f3dd4bf1a111ad8fe /meta
parent58197f345b203f55de202f8c91129e3d381359ed (diff)
downloadpoky-0658434ee3c97bc27b9aa7bde682309af5c2f3c3.tar.gz
qemurunner: Improves checking for server and target IPs on qemus parameters
Fixes OS hanging infinitely waiting for qemus process to release bitbake.lock (From OE-Core rev: d168bf34c553dbe5de7511e158cd83869d7a88bc) Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/lib/oeqa/utils/qemurunner.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py
index 1cf8f7668c..02ac89c142 100644
--- a/meta/lib/oeqa/utils/qemurunner.py
+++ b/meta/lib/oeqa/utils/qemurunner.py
@@ -120,14 +120,17 @@ class QemuRunner:
120 cmdline = '' 120 cmdline = ''
121 with open('/proc/%s/cmdline' % self.qemupid) as p: 121 with open('/proc/%s/cmdline' % self.qemupid) as p:
122 cmdline = p.read() 122 cmdline = p.read()
123 ips = re.findall("((?:[0-9]{1,3}\.){3}[0-9]{1,3})", cmdline.split("ip=")[1]) 123 try:
124 if not ips or len(ips) != 3: 124 ips = re.findall("((?:[0-9]{1,3}\.){3}[0-9]{1,3})", cmdline.split("ip=")[1])
125 if not ips or len(ips) != 3:
126 raise ValueError
127 else:
128 self.ip = ips[0]
129 self.server_ip = ips[1]
130 except IndexError, ValueError:
125 logger.info("Couldn't get ip from qemu process arguments! Here is the qemu command line used: %s" % cmdline) 131 logger.info("Couldn't get ip from qemu process arguments! Here is the qemu command line used: %s" % cmdline)
126 self.stop() 132 self.stop()
127 return False 133 return False
128 else:
129 self.ip = ips[0]
130 self.server_ip = ips[1]
131 logger.info("Target IP: %s" % self.ip) 134 logger.info("Target IP: %s" % self.ip)
132 logger.info("Server IP: %s" % self.server_ip) 135 logger.info("Server IP: %s" % self.server_ip)
133 logger.info("Waiting at most %d seconds for login banner" % self.boottime) 136 logger.info("Waiting at most %d seconds for login banner" % self.boottime)