summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKonrad Weihmann <kweihmann@outlook.com>2020-05-27 20:07:58 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-06-05 21:36:30 +0100
commit9aefaf5de989d5ff351ae7f255898523746ca0f2 (patch)
tree2e67a2918b333ebb25b190cf485fc7df9d5c40ff
parent56035c17149f5872736180db5e4d9ca2660d1f39 (diff)
downloadpoky-9aefaf5de989d5ff351ae7f255898523746ca0f2.tar.gz
qemurunner: fix ip fallback detection
When falling back from detecting ip from /proc/./cmdline the output of runqemu is acutally 'Network configuration: ip=192.168.7.2::192.168.7.1::255.255.255.0' which doesn't match the given regex and leading to run failure, although IP is detectable. Fix regex by inserting an optional 'ip=' prefix to first IP (From OE-Core rev: 9c2efe41d5d894094552c4bbc4180675a5aac751) Signed-off-by: Konrad Weihmann <kweihmann@outlook.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 75f2471d15fab024775c59cb70c54e3f25f9ae72) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/lib/oeqa/utils/qemurunner.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py
index cd95d33bdc..77ae08ebeb 100644
--- a/meta/lib/oeqa/utils/qemurunner.py
+++ b/meta/lib/oeqa/utils/qemurunner.py
@@ -287,7 +287,7 @@ class QemuRunner:
287 self.logger.debug("qemu cmdline used:\n{}".format(cmdline)) 287 self.logger.debug("qemu cmdline used:\n{}".format(cmdline))
288 except (IndexError, ValueError): 288 except (IndexError, ValueError):
289 # Try to get network configuration from runqemu output 289 # Try to get network configuration from runqemu output
290 match = re.match(r'.*Network configuration: ([0-9.]+)::([0-9.]+):([0-9.]+)$.*', 290 match = re.match(r'.*Network configuration: (?:ip=)*([0-9.]+)::([0-9.]+):([0-9.]+)$.*',
291 out, re.MULTILINE|re.DOTALL) 291 out, re.MULTILINE|re.DOTALL)
292 if match: 292 if match:
293 self.ip, self.server_ip, self.netmask = match.groups() 293 self.ip, self.server_ip, self.netmask = match.groups()