All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] runqemu: Add the support to pass multi ports to tcpserial parameter
@ 2019-06-06  7:11 Kevin Hao
  2019-06-06  7:11 ` [PATCH 2/2] oeqa/utils/qemurunner: Set both the threadport&serverport with " Kevin Hao
  2019-06-08  4:09 ` ✗ patchtest: failure for "runqemu: Add the support to pa..." and 1 more Patchwork
  0 siblings, 2 replies; 3+ messages in thread
From: Kevin Hao @ 2019-06-06  7:11 UTC (permalink / raw)
  To: openembedded-core

In some cases(such as the oeqa's qemurunner), we need to setup multi
serial devices via the '-serial 127.0.0.1:xx" and the order of them
is significant. The mixing use of "tcpserial" and "-serial 127.0.0.1:xx"
cause ambiguous issues and we can't fix it by only adjusting the order
of them. So add the support to pass multi ports to the tcpserial
parameter, this will make sure that the order of setting up the serial
is really what we want.

[YOCTO Bug 13309]

Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
---
 scripts/runqemu | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/scripts/runqemu b/scripts/runqemu
index 5752ecda731c..af90c010da28 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -438,7 +438,7 @@ class BaseConfig(object):
             elif arg == 'publicvnc':
                 self.qemu_opt_script += ' -vnc :0'
             elif arg.startswith('tcpserial='):
-                self.tcpserial_portnum = arg[len('tcpserial='):]
+                self.tcpserial_portnum = '%s' % arg[len('tcpserial='):]
             elif arg.startswith('biosdir='):
                 self.custombiosdir = arg[len('biosdir='):]
             elif arg.startswith('biosfilename='):
@@ -682,10 +682,16 @@ class BaseConfig(object):
 
     def check_tcpserial(self):
         if self.tcpserial_portnum:
+            ports = self.tcpserial_portnum.split(':')
+            port = ports[0]
             if self.get('QB_TCPSERIAL_OPT'):
-                self.qemu_opt_script += ' ' + self.get('QB_TCPSERIAL_OPT').replace('@PORT@', self.tcpserial_portnum)
+                self.qemu_opt_script += ' ' + self.get('QB_TCPSERIAL_OPT').replace('@PORT@', port)
             else:
-                self.qemu_opt_script += ' -serial tcp:127.0.0.1:%s' % self.tcpserial_portnum
+                self.qemu_opt_script += ' -serial tcp:127.0.0.1:%s' % port
+
+            if len(ports) > 1:
+                for port in ports[1:]:
+                    self.qemu_opt_script += ' -serial tcp:127.0.0.1:%s' % port
 
     def check_and_set(self):
         """Check configs sanity and set when needed"""
-- 
2.14.4



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] oeqa/utils/qemurunner: Set both the threadport&serverport with tcpserial parameter
  2019-06-06  7:11 [PATCH 1/2] runqemu: Add the support to pass multi ports to tcpserial parameter Kevin Hao
@ 2019-06-06  7:11 ` Kevin Hao
  2019-06-08  4:09 ` ✗ patchtest: failure for "runqemu: Add the support to pa..." and 1 more Patchwork
  1 sibling, 0 replies; 3+ messages in thread
From: Kevin Hao @ 2019-06-06  7:11 UTC (permalink / raw)
  To: openembedded-core

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]

Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
---
 meta/lib/oeqa/utils/qemurunner.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py
index fd386ef5a20a..6d2860c1061a 100644
--- a/meta/lib/oeqa/utils/qemurunner.py
+++ b/meta/lib/oeqa/utils/qemurunner.py
@@ -155,11 +155,11 @@ class QemuRunner:
         # and analyze descendents in order to determine it.
         if os.path.exists(self.qemu_pidfile):
             os.remove(self.qemu_pidfile)
-        self.qemuparams = 'bootparams="{0}" qemuparams="-serial tcp:127.0.0.1:{1} -pidfile {2}"'.format(bootparams, threadport, self.qemu_pidfile)
+        self.qemuparams = 'bootparams="{0}" qemuparams="-pidfile {1}"'.format(bootparams, self.qemu_pidfile)
         if qemuparams:
             self.qemuparams = self.qemuparams[:-1] + " " + qemuparams + " " + '\"'
 
-        launch_cmd += ' tcpserial=%s %s' % (self.serverport, self.qemuparams)
+        launch_cmd += ' tcpserial=%s:%s %s' % (threadport, self.serverport, self.qemuparams)
 
         self.origchldhandler = signal.getsignal(signal.SIGCHLD)
         signal.signal(signal.SIGCHLD, self.handleSIGCHLD)
-- 
2.14.4



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* ✗ patchtest: failure for "runqemu: Add the support to pa..." and 1 more
  2019-06-06  7:11 [PATCH 1/2] runqemu: Add the support to pass multi ports to tcpserial parameter Kevin Hao
  2019-06-06  7:11 ` [PATCH 2/2] oeqa/utils/qemurunner: Set both the threadport&serverport with " Kevin Hao
@ 2019-06-08  4:09 ` Patchwork
  1 sibling, 0 replies; 3+ messages in thread
From: Patchwork @ 2019-06-08  4:09 UTC (permalink / raw)
  To: Kevin Hao; +Cc: openembedded-core

== Series Details ==

Series: "runqemu: Add the support to pa..." and 1 more
Revision: 1
URL   : https://patchwork.openembedded.org/series/18016/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Patch            [1/2] runqemu: Add the support to pass multi ports to tcpserial parameter
 Issue             Yocto Project bugzilla tag is not correctly formatted [test_bugzilla_entry_format] 
  Suggested fix    Specify bugzilla ID in commit description with format: "[YOCTO #<bugzilla ID>]"

* Issue             Series does not apply on top of target branch [test_series_merge_on_head] 
  Suggested fix    Rebase your series on top of targeted branch
  Targeted branch  master (currently at 666f6192aa)



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Guidelines:     https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-06-08  4:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-06  7:11 [PATCH 1/2] runqemu: Add the support to pass multi ports to tcpserial parameter Kevin Hao
2019-06-06  7:11 ` [PATCH 2/2] oeqa/utils/qemurunner: Set both the threadport&serverport with " Kevin Hao
2019-06-08  4:09 ` ✗ patchtest: failure for "runqemu: Add the support to pa..." and 1 more Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.