openembedded-core.lists.openembedded.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] oeqa/selftest: add test that kernels build with defconfig
@ 2022-01-11 13:55 Ross Burton
  2022-01-11 13:57 ` [OE-core] " Ross Burton
  0 siblings, 1 reply; 5+ messages in thread
From: Ross Burton @ 2022-01-11 13:55 UTC (permalink / raw)
  To: openembedded-core

The standard linux-yocto builds using config fragments, but it's a
supported option to use the standard defconfig.

However, our enhanced config checking means that defconfig will often
cause configure warnings.  Add a test suite that exercises a defconfig
build is successful without any warnings.

Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 .../oeqa/selftest/cases/kerneldevelopment.py  | 20 ++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/meta/lib/oeqa/selftest/cases/kerneldevelopment.py b/meta/lib/oeqa/selftest/cases/kerneldevelopment.py
index b1623a1885..a0e770071c 100644
--- a/meta/lib/oeqa/selftest/cases/kerneldevelopment.py
+++ b/meta/lib/oeqa/selftest/cases/kerneldevelopment.py
@@ -1,6 +1,6 @@
 import os
 from oeqa.selftest.case import OESelftestTestCase
-from oeqa.utils.commands import runCmd, get_bb_var
+from oeqa.utils.commands import bitbake, runCmd, get_bb_var
 from oeqa.utils.git import GitRepo
 
 class KernelDev(OESelftestTestCase):
@@ -65,3 +65,21 @@ class KernelDev(OESelftestTestCase):
         self.assertTrue(os.path.exists(readme))
         result = runCmd('tail -n 1 %s' % readme)
         self.assertEqual(result.output, patch_content)
+
+
+class KernelConfigs(OESelftestTestCase):
+    def test_defconfig(self):
+        """
+        Test that a kernel build with the default defconfig doesn't produce any
+        build warnings from the config checker.
+        """
+        self.write_config('''
+KCONF_AUDIT_LEVEL = "1"
+KMETA_AUDIT_WERROR = "1"
+KBUILD_DEFCONFIG = "unset"
+KBUILD_DEFCONFIG:aarch64 = "defconfig"
+KBUILD_DEFCONFIG:x86-64 = "x86_64_defconfig"
+# BSPs can append KERNEL_FEATURES, so force it empty so we just use defconfig
+KERNEL_FEATURES:forcevariable = ""
+''')
+        bitbake('virtual/kernel -c kernel_configcheck -f')
-- 
2.25.1



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

* Re: [OE-core] [PATCH] oeqa/selftest: add test that kernels build with defconfig
  2022-01-11 13:55 [PATCH] oeqa/selftest: add test that kernels build with defconfig Ross Burton
@ 2022-01-11 13:57 ` Ross Burton
  2022-01-11 14:00   ` Bruce Ashfield
  2022-01-11 17:48   ` Robert Berger
  0 siblings, 2 replies; 5+ messages in thread
From: Ross Burton @ 2022-01-11 13:57 UTC (permalink / raw)
  To: openembedded-core, Mittal, Anuj, Bruce Ashfield

On Tue, 11 Jan 2022 at 13:55, Ross Burton via lists.openembedded.org
<ross=burtonini.com@lists.openembedded.org> wrote:
> The standard linux-yocto builds using config fragments, but it's a
> supported option to use the standard defconfig.
>
> However, our enhanced config checking means that defconfig will often
> cause configure warnings.  Add a test suite that exercises a defconfig
> build is successful without any warnings.

Note that this breaks with current oe-core master:
https://www.irccloud.com/pastebin/nAapZUm6/

Anuj, would you be able to patch the x86_64_defconfig so that it
doesn't break with our tools?

Ross


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

* Re: [OE-core] [PATCH] oeqa/selftest: add test that kernels build with defconfig
  2022-01-11 13:57 ` [OE-core] " Ross Burton
@ 2022-01-11 14:00   ` Bruce Ashfield
  2022-01-11 17:48   ` Robert Berger
  1 sibling, 0 replies; 5+ messages in thread
From: Bruce Ashfield @ 2022-01-11 14:00 UTC (permalink / raw)
  To: Ross Burton; +Cc: Patches and discussions about the oe-core layer, Mittal, Anuj

On Tue, Jan 11, 2022 at 8:57 AM Ross Burton <ross@burtonini.com> wrote:
>
> On Tue, 11 Jan 2022 at 13:55, Ross Burton via lists.openembedded.org
> <ross=burtonini.com@lists.openembedded.org> wrote:
> > The standard linux-yocto builds using config fragments, but it's a
> > supported option to use the standard defconfig.
> >
> > However, our enhanced config checking means that defconfig will often
> > cause configure warnings.  Add a test suite that exercises a defconfig
> > build is successful without any warnings.
>
> Note that this breaks with current oe-core master:
> https://www.irccloud.com/pastebin/nAapZUm6/
>
> Anuj, would you be able to patch the x86_64_defconfig so that it
> doesn't break with our tools?

We also might be able to mask some of the warnings, if we decide that
they are optional / non-required.

Anuj: I'm finishing up some kernel updates, but if anyone starts
looking at this, feel free to ping me about options, etc.

Bruce

>
> Ross



-- 
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II


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

* Re: [OE-core] [PATCH] oeqa/selftest: add test that kernels build with defconfig
  2022-01-11 13:57 ` [OE-core] " Ross Burton
  2022-01-11 14:00   ` Bruce Ashfield
@ 2022-01-11 17:48   ` Robert Berger
  2022-01-11 17:56     ` Ross Burton
  1 sibling, 1 reply; 5+ messages in thread
From: Robert Berger @ 2022-01-11 17:48 UTC (permalink / raw)
  To: Ross Burton, openembedded-core, Mittal, Anuj, Bruce Ashfield

Hi,

On 11/01/2022 15:57, Ross Burton wrote:
> On Tue, 11 Jan 2022 at 13:55, Ross Burton via lists.openembedded.org
> <ross=burtonini.com@lists.openembedded.org> wrote:
>> The standard linux-yocto builds using config fragments, but it's a
>> supported option to use the standard defconfig.
>>
>> However, our enhanced config checking means that defconfig will often
>> cause configure warnings.  Add a test suite that exercises a defconfig
>> build is successful without any warnings.
> 
> Note that this breaks with current oe-core master:
> https://www.irccloud.com/pastebin/nAapZUm6/

I am a bit confused what exactly breaks.

Is this only one defconfig and nothing else or a defconfig plus fragments?

I build with an upstream 5.15.13 kernel with multi_v7_defconfig and it 
does not spit out any warnings. Not even after adding some of my own 
fragments.

I really like that Bruce finally outputs some warnings, since they 
typically indicate some configuration inconsistencies which would be 
otherwise hard to find.

Regards,

Robert

-- 
Robert Berger
Embedded Software Evangelist

Reliable Embedded Systems
Consulting Training Engineering
URL: https://www.reliableembeddedsystems.com

Schedule a web meeting:
https://calendly.com/reliableembeddedsystems/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--


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

* Re: [OE-core] [PATCH] oeqa/selftest: add test that kernels build with defconfig
  2022-01-11 17:48   ` Robert Berger
@ 2022-01-11 17:56     ` Ross Burton
  0 siblings, 0 replies; 5+ messages in thread
From: Ross Burton @ 2022-01-11 17:56 UTC (permalink / raw)
  To: Robert Berger; +Cc: openembedded-core, Mittal, Anuj, Bruce Ashfield

On Tue, 11 Jan 2022 at 17:49, Robert Berger
<oecore.mailinglist@gmail.com> wrote:
> Is this only one defconfig and nothing else or a defconfig plus fragments?
>
> I build with an upstream 5.15.13 kernel with multi_v7_defconfig and it
> does not spit out any warnings. Not even after adding some of my own
> fragments.

I've been maintaining a patch in meta-arm to fix this issue and I
believe that v7 actually works out of the box in 5.15, finally.  It
definitely fails for arm64 out of the box.

Ross


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

end of thread, other threads:[~2022-01-11 17:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-11 13:55 [PATCH] oeqa/selftest: add test that kernels build with defconfig Ross Burton
2022-01-11 13:57 ` [OE-core] " Ross Burton
2022-01-11 14:00   ` Bruce Ashfield
2022-01-11 17:48   ` Robert Berger
2022-01-11 17:56     ` Ross Burton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).