oeqa/selftest: add test that kernels build with defconfig
PATCH 1/1 oeqa/selftest: add test that kernels build with defconfig
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.
--- .../oeqa/selftest/cases/kerneldevelopment.py | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-)
meta/lib/oeqa/selftest/cases/kerneldevelopment.py +19 -1
@@ -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')
Signature · 1 line
2.25.1
Quoted 6 lines · Ross Burton via lists.openembedded.org
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
Quoted 10 lines · Ross Burton
Quoted 6 lines · Ross Burton via lists.openembedded.org
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.
Quoted 5 lines
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_defconfigso 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
Quoted 2 lines
Ross
Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end - "Use the force Harry" - Gandalf, Star Trek II
Hi,
Quoted 11 lines · Ross Burton
Quoted 6 lines · Ross Burton via lists.openembedded.org
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
Signature · 11 lines
Robert Berger Embedded Software Evangelist Reliable Embedded Systems Consulting Training Engineering URL: https://www.reliableembeddedsystems.com Schedule a web meeting: https://calendly.com/reliableembeddedsystems/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --
Quoted 5 lines · Robert Berger
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_defconfigand 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