From c77870372231e30b555e5f35aeb5db373020655e Mon Sep 17 00:00:00 2001 From: Konrad Weihmann Date: Wed, 27 May 2020 20:07:58 +0200 Subject: 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: 75f2471d15fab024775c59cb70c54e3f25f9ae72) Signed-off-by: Konrad Weihmann Signed-off-by: Richard Purdie --- meta/lib/oeqa/utils/qemurunner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'meta/lib/oeqa/utils') diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py index 4b74337652..992fff9370 100644 --- a/meta/lib/oeqa/utils/qemurunner.py +++ b/meta/lib/oeqa/utils/qemurunner.py @@ -290,7 +290,7 @@ class QemuRunner: self.logger.debug("qemu cmdline used:\n{}".format(cmdline)) except (IndexError, ValueError): # Try to get network configuration from runqemu output - match = re.match(r'.*Network configuration: ([0-9.]+)::([0-9.]+):([0-9.]+)$.*', + match = re.match(r'.*Network configuration: (?:ip=)*([0-9.]+)::([0-9.]+):([0-9.]+)$.*', out, re.MULTILINE|re.DOTALL) if match: self.ip, self.server_ip, self.netmask = match.groups() -- cgit v1.2.3-54-g00ecf