diff options
author | Kevin Hao <kexin.hao@windriver.com> | 2019-06-06 15:11:47 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-06-07 09:11:48 +0100 |
commit | 720474ee8d83a403123d7b317f095d49a3ea3e0a (patch) | |
tree | 9d9dfd7ada55bb36e32663cb6d2dbb62a8a50f48 /meta/lib/oeqa/utils | |
parent | e5f2684d60025fbe205d1974ba89341d1d5408be (diff) | |
download | poky-720474ee8d83a403123d7b317f095d49a3ea3e0a.tar.gz |
oeqa/utils/qemurunner: Set both the threadport&serverport with tcpserial parameter
After the commit ad522ea6a64e ("runqemu: Let qemuparams override default
settings"), the order of the two "-serial" parameters when running the
qemu have been switched. The effect of this is that the logging thread
will use ttyS1 (of course can't capture the kernel boot message anymore),
and the test command will run on the ttyS0. So the output of the test
command may be mangled by the kernel message (such as call trace), and
let the test command produce a fake timeout error message. We can't fix
it by just adjusting the order of the threadport and serverport, since
it will break some machines such as qemuarm64 which use the virtio
serial. So using the tcpserial to setup both the threadport and
serverport.
[YOCTO Bug 13309]
(From OE-Core rev: 9f2005dee41b1ef5a0d1f7b69bcd6c8352dac016)
Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/utils')
-rw-r--r-- | meta/lib/oeqa/utils/qemurunner.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py index fd386ef5a2..6d2860c106 100644 --- a/meta/lib/oeqa/utils/qemurunner.py +++ b/meta/lib/oeqa/utils/qemurunner.py | |||
@@ -155,11 +155,11 @@ class QemuRunner: | |||
155 | # and analyze descendents in order to determine it. | 155 | # and analyze descendents in order to determine it. |
156 | if os.path.exists(self.qemu_pidfile): | 156 | if os.path.exists(self.qemu_pidfile): |
157 | os.remove(self.qemu_pidfile) | 157 | os.remove(self.qemu_pidfile) |
158 | self.qemuparams = 'bootparams="{0}" qemuparams="-serial tcp:127.0.0.1:{1} -pidfile {2}"'.format(bootparams, threadport, self.qemu_pidfile) | 158 | self.qemuparams = 'bootparams="{0}" qemuparams="-pidfile {1}"'.format(bootparams, self.qemu_pidfile) |
159 | if qemuparams: | 159 | if qemuparams: |
160 | self.qemuparams = self.qemuparams[:-1] + " " + qemuparams + " " + '\"' | 160 | self.qemuparams = self.qemuparams[:-1] + " " + qemuparams + " " + '\"' |
161 | 161 | ||
162 | launch_cmd += ' tcpserial=%s %s' % (self.serverport, self.qemuparams) | 162 | launch_cmd += ' tcpserial=%s:%s %s' % (threadport, self.serverport, self.qemuparams) |
163 | 163 | ||
164 | self.origchldhandler = signal.getsignal(signal.SIGCHLD) | 164 | self.origchldhandler = signal.getsignal(signal.SIGCHLD) |
165 | signal.signal(signal.SIGCHLD, self.handleSIGCHLD) | 165 | signal.signal(signal.SIGCHLD, self.handleSIGCHLD) |