Skip to contentSkip to conversation

linux-yocto: Enable debug/printk.scc KERNEL_FEATURE on qemuall machines.

PATCH In review Aníbal Limón 2 participants 6 messages Jul 12, 2016 – Jul 25, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 linux-yocto: Enable debug/printk.scc KERNEL_FEATURE on qemuall machines.

We are experimenting some issues in the Autobuilder infraestructure possible due to high I/O loads, in order to provide more information about intervals of times in printk enable by default debug/printk.scc on qemu development images.

[YOCTO #9299]

---
 meta/recipes-kernel/linux/linux-yocto.inc | 2 ++
 1 file changed, 2 insertions(+)
meta/recipes-kernel/linux/linux-yocto.inc +2 -0
index 0af9f8c..98a48ec 100644
@@ -17,6 +17,8 @@ DEPENDS_append_nios2 = " libgcc"
 KERNEL_CC_append_nios2 = " ${TOOLCHAIN_OPTIONS}"
 KERNEL_LD_append_nios2 = " ${TOOLCHAIN_OPTIONS}"
 
+KERNEL_FEATURES_append_qemuall=" features/debug/printk.scc"
+
 # A KMACHINE is the mapping of a yocto $MACHINE to what is built
 # by the kernel. This is typically the branch that should be built,
 # and it can be specific to the machine or shared
Signature · 1 line
2.1.4
#1 lore raw

PATCH 2/3 utils/qemurunner.py: QemuRunner.start() add support for specify extra kernel cmdline

Add ability to specify extra_bootargs (kernel cmdline) in order to enable systemd debug log in images that enables systemd init.

[YOCTO #9299]

---
 meta/lib/oeqa/targetcontrol.py    | 4 ++--
 meta/lib/oeqa/utils/qemurunner.py | 8 ++++++--
 2 files changed, 8 insertions(+), 4 deletions(-)
meta/lib/oeqa/targetcontrol.py +2 -2
index 1c57efa..d3b49b7 100644
@@ -174,8 +174,8 @@ class QemuTarget(BaseTarget):
         bb.note("Qemu log file: %s" % self.qemulog)
         super(QemuTarget, self).deploy()
 
-    def start(self, params=None, ssh=True):
-        if self.runner.start(params, get_ip=ssh):
+    def start(self, params=None, ssh=True, extra_bootparams=None):
+        if self.runner.start(params, get_ip=ssh, extra_bootparams=extra_bootparams):
             if ssh:
                 self.ip = self.runner.ip
                 self.server_ip = self.runner.server_ip
meta/lib/oeqa/utils/qemurunner.py +6 -2
index b8ac3f0..df73120 100644
@@ -92,7 +92,7 @@ class QemuRunner:
                 self._dump_host()
                 raise SystemExit
 
-    def start(self, qemuparams = None, get_ip = True):
+    def start(self, qemuparams = None, get_ip = True, extra_bootparams = None):
         if self.display:
             os.environ["DISPLAY"] = self.display
             # Set this flag so that Qemu doesn't do any grabs as SDL grabs
@@ -120,7 +120,11 @@ class QemuRunner:
             return False
 
 
-        self.qemuparams = 'bootparams="console=tty1 console=ttyS0,115200n8 printk.time=1" qemuparams="-serial tcp:127.0.0.1:{}"'.format(threadport)
+        bootparams = 'console=tty1 console=ttyS0,115200n8 printk.time=1'
+        if extra_bootparams:
+            bootparams = bootparams + ' ' + extra_bootparams
+
+        self.qemuparams = 'bootparams="{0}" qemuparams="-serial tcp:127.0.0.1:{1}"'.format(bootparams, threadport)
         if not self.display:
             self.qemuparams = 'nographic ' + self.qemuparams
         if qemuparams:
Signature · 1 line
2.1.4
#2 lore raw

PATCH 3/3 classes/testimage: When image is systemd enable debug log level

In reply to Aníbal Limón

In order to get more information about systemd boot process to be able to debug random failures due to high I/O.

[YOCTO #9299]

---
 meta/classes/testimage.bbclass | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
meta/classes/testimage.bbclass +4 -1
index 7fd0f62..f1b54d7 100644
@@ -147,7 +147,10 @@ def testimage_main(d):
     tc.extract_packages()
     target.deploy()
     try:
-        target.start()
+        bootparams = None
+        if d.getVar('VIRTUAL-RUNTIME_init_manager', '') == 'systemd':
+            bootparams = 'systemd.log_level=debug systemd.log_target=console'
+        target.start(extra_bootparams=bootparams)
         starttime = time.time()
         result = tc.runTests()
         stoptime = time.time()
Signature · 1 line
2.1.4
#3 lore raw

Re: [PATCH 3/3] classes/testimage: When image is systemd enable debug log level

Quoted 3 lines · Aníbal Limón

+ bootparams = 'systemd.log_level=debug systemd
.log_target=console'

The problem with this is that it appears that logger output then goes *only* to the console and not the journal or syslog, which breaks selftest (and expected behaviour).

https://autobuilder.yoctoproject.org/main/builders/nightly-qa-systemd/builds/851
for example, which goes green if I revert this patch.

If this is the case then it would be great if there was a journal-and-console log_target I guess.

Ross

#4 lore raw

Re: [PATCH 3/3] classes/testimage: When image is systemd enable debug log level

Quoted 10 lines · Ross
Quoted 3 lines · Aníbal Limón

+ bootparams = 'systemd.log_level=debug systemd
.log_target=console'

The problem with this is that it appears that logger output then goes *only* to the console and not the journal or syslog, which breaks selftest (and expected behaviour).

Quoted 5 lines

https://autobuilder.yoctoproject.org/main/builders/nightly-qa-systemd/builds/851
for example, which goes green if I revert this patch.

If this is the case then it would be great if there was a journal-and-console log_target I guess.

I'll review the issue i guess the journal test is failing for something else but if we change the backend to journalctl systemd starts to fail with timeout, seems that create a log of I/O writing in the journal database.

alimon

Quoted 3 lines

Ross

#5 lore raw

Re: [PATCH 3/3] classes/testimage: When image is systemd enable debug log level

Quoted 19 lines · Aníbal Limón
Quoted 10 lines · Ross
Quoted 3 lines · Aníbal Limón

+ bootparams = 'systemd.log_level=debug systemd
.log_target=console'

The problem with this is that it appears that logger output then goes *only* to the console and not the journal or syslog, which breaks selftest (and expected behaviour).

Quoted 5 lines

https://autobuilder.yoctoproject.org/main/builders/nightly-qa-systemd/builds/851
for example, which goes green if I revert this patch.

If this is the case then it would be great if there was a journal-and-console log_target I guess.

Quoted 6 lines

I'll review the issue i guess the journal test is failing for something else but if we change the backend to journalctl systemd starts to fail with timeout, seems that create a log of I/O writing in the journal database.

alimon

Reviewing the master branch without my patch seems that the issue for don't exist /var/log/messages is an old one because the file isn't created. The timeout issue was caused for the reasons that we now (I/O load) but the syslog failure occurs without my patch also.

alimon

Quoted 7 lines
Quoted 4 lines

Ross