summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest
Commit message (Collapse)AuthorAgeFilesLines
...
* oeqa/selftest/resulttool: fix ptest filtering testsAlexis Lothoré2023-03-121-36/+44
| | | | | | | | | | | | | | There are multiple issues with the tests for the ptest fixup mechanism introduced in c45d58f003e8d8b323169ca9d479dc49c43a9974: - the feature does not impact regression.can_be_compared but directly the comparison step in regression.regression_common - the "status" field was wrong ("STATUS"), which prevents tests comparison - there is a typo babeltrace2 ptest result name (From OE-Core rev: 69205e2e2117fc469fcf3ae4b2174482db1d6297) Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/overlayfs: enable systemd via INIT_MANAGERAlexander Kanavin2023-03-111-14/+6
| | | | | | | | | | | | Latest systemd version needs the full set of settings enabled by that (if also r/o rootfs is enabled), and refuses to boot otherwise. (From OE-Core rev: 16f7661000a50e58d512a5d47794c5f8be2c49e6) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/runtime_test/virgl: Disable for all Rocky LinuxMichael Halstead2023-03-091-1/+2
| | | | | | | | | | RHEL compatible kernels do not support vgem so we disable virgl headless testing. (From OE-Core rev: 78bc1ba2361249ec845d1b9e28d429a37dd83910) Signed-off-by: Michael Halstead <mhalstead@linuxfoundation.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/imagefeatures: add test for man-dbRoss Burton2023-03-081-0/+22
| | | | | | | | | | | Add a test to verify that manpages are built with api-documentation enabled, and apropos works on the target (so mandb has been ran). (From OE-Core rev: c085c335319bb98e09177c09feb1241a8560b606) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/resulttool: add test for metadata filtering on regressionAlexis Lothoré2023-02-281-0/+243
| | | | | | | | | | | | | | | | | | Multiple filters have been added to resulttool to ensure that test results are compared only to relevant older tests results Add some unit tests about added filters: - tests should only be compared when machine matches - tests run as oeselftest should only be compared when OESELFTEST_METADATA matches - many ptests should match despite non-static names - runtime tests should match with matching tests regarding ltp tests content (From OE-Core rev: b84302ef56f2516742a496aef43b89d4c3decd37) Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/runqemu: move render nodes check to runqemu from selftestAlexander Kanavin2023-02-271-7/+0
| | | | | | | | | | | | | | | | | | This will produce a more useful hint for those setting up or testing virgl headless: runqemu - ERROR - No render nodes found in /dev/dri: ['by-path', 'card0']. If /dev/dri/renderD* is absent due to lack of suitable GPU, 'modprobe vgem' will create one suitable for mesa llvmpipe software renderer. as qemu itself isn't helpful: alex@Zen2:/srv/storage/alex/yocto/build-64-alt$ qemu-system-x86_64 -display egl-headless qemu-system-x86_64: egl: no drm render node available qemu-system-x86_64: egl: render node init failed (From OE-Core rev: cbbada6a6c9b0a2e97f7395117dad986555f2db9) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest: do not check for dri.pc in the headless testAlexander Kanavin2023-02-271-4/+0
| | | | | | | | | | | runqemu (which the test also runs) already performs this check, and does it better, as it additionally unsets a number of environment variables that can confuse and misdirect host's pkg-config. (From OE-Core rev: ad179728a6978d929e2a876abe7e1cbd6b76a502) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest: add test for yocto_testresults_query.pyAlexis Lothoré2023-02-261-0/+39
| | | | | | | | | | Add some tests for new yocto_testresults_query.py helper. First test is taken from yocto-autobuilder-helper feature which has moved in yocto_testresults_query (From OE-Core rev: 9ce28f685e4282d81f179877cbafd0a52fa887bd) Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/oe-selftest: append metadata to tests resultsAlexis Lothoré2023-02-261-1/+14
| | | | | | | | | | | | | | | Many stored results TEST_TYPE are set to "oeselftest", however all those tests are not run with the same sets of parameters, so those tests results may not be comparable. Attach relevant parameters as tests metadata to allow identifying tests configuration so we can compare tests only when they are run with the same parameters. (From OE-Core rev: 406ec0a87e80d1ee0dd1d246adfe9507c10450ff) Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/wic: Add test for uefi-kernel loaderPavel Zhukov2023-02-261-0/+20
| | | | | | | | | | This is regression test for [1]. [1] https://bugzilla.yoctoproject.org/show_bug.cgi?id=15033 (From OE-Core rev: d8ef15bb9ef652bf85002fe523ff5060b47bca6a) Signed-off-by: Pavel Zhukov <pavel@zhukoff.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/prservice: Improve debug output for failureRichard Purdie2023-02-241-1/+1
| | | | | | | | | | We keep seeing this failure on the autobuilder but the output amounts to "False is not True". Improve the debug message on the chance it may make the issue clearer. (From OE-Core rev: d03f4cf19c2cc96e9d942252a451521dfec42ebc) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/resulttooltests: fix minor typoAlexis Lothoré2023-02-171-1/+1
| | | | | | | (From OE-Core rev: 80cfa56d133bd3abbb1f37272607d8e15ce70861) Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/locales: Add test for disabled binary locale generationRichard Purdie2023-02-041-11/+20
| | | | | | | | | | Similarly to the recently added test for binary generated locales, add a version to test on target locale generation. This was broken but should be fixed now so we can add the test sharing code from the previous test. (From OE-Core rev: 50a29c167eb9fe9fa96aa53a379ae7597cefd1cc) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/locales: Add selftest for locale generation/presenceLouis Rannou2023-02-021-0/+45
| | | | | | | | | | | | | [YOCTO #9070] Add a new selftest to validate locale generation. This selftest builds a complete target with GLIBC_GENERATE_LOCALES, IMAGE_LINGUAS, ENABLE_BINARY_LOCALE_GENERATION set. (From OE-Core rev: 53258fd810bea6475af9f908f7b712a13a02b628) Signed-off-by: Louis Rannou <lrannou@baylibre.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/devtool: Fix for linux 6.1 versions onwardsRichard Purdie2023-01-261-1/+3
| | | | | | | | | | In recent kernel versions the string "Linux" moved to a header, 'include/linux/uts.h' instead of init/version.c. Allow the test to work with both situations. (From OE-Core rev: c15c59c88d229e35eeac1ed948c84168633e7cb1) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/virgl: use pkg-config from the hostAlexander Kanavin2023-01-131-1/+1
| | | | | | | | | | | | | | | | | | | The check needs to report dri location on the host machine, so pkg-config binary needs to be capable of finding the needed dri.pc file on the host, and therefore needs to know where host .pc files are located. This may not be the case when using pkg-config from buildtools, so this forces usage of host pkg-config. runqemu already does the same PATH tweak, so this simply brings the two in sync. (From OE-Core rev: f0521f8a3ba7e15482756529ee7b0a95b3d53e7d) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: Add baremetal toolchain testAlejandro Hernandez Samaniego2023-01-121-0/+14
| | | | | | | | (From OE-Core rev: 1f3487dcd9eeaa18eec1103d2861849597335de1) Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandro@enedino.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/debuginfod: improve testcaseRoss Burton2023-01-111-8/+59
| | | | | | | | | | | | | | | | | | | | | | | Primarily, before running the debuginfod-find tool, check that the debuginfod server has finished sweeping the deploy directory. If we make the request too soon then there's a rare chance that we run the client before it has scanned the right packages, and the log gets swamped with warnings from sqlite due to a race. Also: - unset DEBUGINFOD_URLS so the debuginfod doesn't proxy to an upstream server provided by the host distro - Lower concurrency to reduce system load and handle systems with lower maximum open file counts but lots of cores (as the concurrency means cores*2*2 open files) - Set the refresh times to 0 so we never rescan during the test - Only scan the packages for the format which the image is using - Log the commands that are being invoked (From OE-Core rev: d65729748253eaa640333198ca8aec05946cb9e8) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest: allow '-R' and '-r' be used togetherChen Qi2022-12-261-3/+3
| | | | | | | | | | | | | | | | | | | | | For now, there's no easy way to skip some specified tests when using 'oe-selftest -r'. This is because '-R' and '-r' are in the mutually exclusive group. Looking at the codes, the codes have already allowed running specified tests and skipping specified tests at the same time. So move '-R' out of the mutually exclusive group and change its help message. After this change, the following command could be used. oe-selftest -r A -R A.B.C This does introduce a behavior regression. Previous 'oe-selftest -R xxx' needs to now be changed to 'oe-selftest -a -R xxx'. (From OE-Core rev: df9a2b69748d8a24c3390f812225231e9e9acb66) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool/friends: Use LAYERSERIES_CORENAMES when generating ↵4.2_M1Richard Purdie2022-12-081-2/+3
| | | | | | | | | | | | | | | | | | LAYERSERIES_COMPAT entries It seems some layers want to subvert the intent of LAYERSERIES_COMPAT so bitbake is going to have to become stricter about the values there. To work with this, use LAYERSERIES_CORENAMES to generate the entries in LAYERSERIES_COMPAT instead of the current magic LAYERSERIES_COMPAT_core value which may not continue to work. The downside to this is when migating between releases, people would need to update devtool workspace layer.conf files. I guess you could argue this is a feature! (From OE-Core rev: 96ff9baa8ead57504f40f362ed3a4aaa776d1b58) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/externalsrc: add test for srctree_hash_filesPeter Marko2022-12-081-0/+44
| | | | | | | | (From OE-Core rev: 7b9728e5b8bdf1193c1304ec3beeca4b5bf8d2da) Signed-off-by: Peter Marko <peter.marko@siemens.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/tinfoil: Add test for separate config_data with ↵Richard Purdie2022-12-051-0/+14
| | | | | | | | | | | | | | recipe_parse_file() We've seen two different regressions in this API since it is used by layer-index but not be the core code. Add a test for it to try and ensure we don't break it again. (From OE-Core rev: b07de5de43ec9c9a2c5d496a64940ccdc5b47cf8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/runqemu: reenable the nfs rootfs testAlexander Kanavin2022-11-291-12/+2
| | | | | | | | | | | | With the previous fixes the test can be run again, and it doesn't need all those extra steps. Runqemu takes care of everything automatically now. (From OE-Core rev: 99083d01bd576eee7c2c569c66042d064c193a9a) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/wic: use skipIfNotArch instead of custom decoratorRoss Burton2022-11-111-38/+19
| | | | | | | | | | There's now a shared decorator for architecture skipping, so use that. (From OE-Core rev: 1ce83c6b22e5835d8fe3f733f40207526c6771d4) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/wic: skip more tests on aarch64Ross Burton2022-11-111-2/+4
| | | | | | | | | | | | | test_rawcopy_plugin_qemu and test_wic_image_type are x86-specific currently as the .wks uses x86-specific bootloaders. This can be fixed, but that can come later. (From OE-Core rev: 93525809a1ecb01ae7218558c0d6c1b0344606c5) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/runtime_test: only run the virgl tests on qemux86-64Ross Burton2022-11-111-1/+4
| | | | | | | | | | | These tests should be able to work on qemuarm64, but this is untested and the runners will need configuration. (From OE-Core rev: 09b9558e20e58b473154895b93cff16261c7f561) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/runqemu: don't hardcode qemux86-64Ross Burton2022-11-111-9/+17
| | | | | | | | | | | | | Don't hardcode qemux86-64. This has some complications: the IMAGE_FSTYPES needs to be constructed to reflect what the machine can do (only x86 machines can build ISO images), and several tests which need a wic file are currently limited to qemux86-64. (From OE-Core rev: a30680a869ff3be63d26468f6365751c56bbb006) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/package: improve test_preserve_ownershipRoss Burton2022-11-111-11/+11
| | | | | | | | | | | This test was failing very oddly in qemuarm64 runs. Rewriting the test to be clearer and less fragile fixed it. (From OE-Core rev: a26fc7c2119df12468b0a834de6fe67aa9c86085) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/package: generalise test_gdb_hardlink_debug()Ross Burton2022-11-111-2/+4
| | | | | | | | | | | | | | | | | When the trivial test binary, which just calls printf(), is compiled for aarch64 with -O2 -D_FORTIFY=2 (as is the default configuration), gdb resolves main() to the inlined printf() wrapper in stdio2.h instead of main.c, so the test fails. Presumably, this is due to debugging being unreliable with -O2. Solve this problem by not caring where the main() breakpoint resolves to, just check that it was resolved at all. (From OE-Core rev: c51c12154851d04a81c8fbe190e712b3cd8dc941) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/overlayfs: overlayfs: skip x86-specific testsRoss Burton2022-11-111-0/+6
| | | | | | | | | | | For now, not all machines have a default wks file, so mark the tests which need a wks as being specific to qemux86-64. (From OE-Core rev: 152f1a8cdf698b71c956e9910911dcb141a1f5be) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/imagefeatures: set a .wks in test_fs_typesRoss Burton2022-11-111-3/+6
| | | | | | | | | | | | | Set WKS_FILE to wictestdisk.wks, which is a very simple Wic file that simply contains the root filesystem. It may not actually boot but this test doesn't care, and it does exercise the wic image construction on all machines. (From OE-Core rev: b66a94896193f8d8eeff43b66e9daeb9a74bfed9) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/imagefeatures: don't use wic images in test_hypervisor_fmtsRoss Burton2022-11-111-2/+2
| | | | | | | | | | | | | There's no need to build a wic image in this test as not all machines (such as qemuarm64 currently) have wic images out of the box. We can simply build ext4 images to work on more machines and save some time. (From OE-Core rev: cdcf858d00eaf54814e23f550f83f3646bf83a24) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/imagefeatures: remove hardcoded MACHINE in test_image_gen_debugfsRoss Burton2022-11-111-1/+0
| | | | | | | | | | | There's no need for this to be built for genericx86-64, we want to test the current MACHINE. (From OE-Core rev: b5a7ebe9627b28b207ccccba4f26c6d4a937d6a8) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/efibootpartition: improve testRoss Burton2022-11-111-27/+14
| | | | | | | | | | | | | | | This test was overly complex with a setUp() method for a single test case, which was marked as a class function for no good reason. Generalise the test so that it has the possibility of working on more machines in the future, add a decorator so that it only runs on qemux86-64, and respect QEMU_USE_KVM to speed up test execution. (From OE-Core rev: 2bc2ee171f976807053b7da44c1eedbb07c10949) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/buildoptions: skip test_read_only_image on qemuarm64Ross Burton2022-11-111-0/+3
| | | | | | | | | | | | qemuarm64 currently uses SERIAL_CONSOLES_CHECK but this is incompatible with read-only rootfs under sysvinit. Until qemuarm64 doesn't use this, skip the test on qemuarm64. (From OE-Core rev: c46be833efc5abea577251ef7e87ef90f08c4de3) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/minidebuginfo: Create selftest for minidebuginfoNathan Rossi2022-11-111-0/+43
| | | | | | | | | | | | | | | Add a new selftest to validate minidebuginfo support. This selftest builds a complete target image with PACKAGE_MINIDEBUGINFO enabled. ELFs included in the image are expected to have minidebuginfo included in the resulting executables and shared libraries, the self test validates this by unpacking the image and checking for the associated ".gnu_debugdata" section on busybox and libc ELFs. (From OE-Core rev: 5063a31ad05b75ec6ac12158fe759e81fcdb1585) Signed-off-by: Nathan Rossi <nathan.rossi@digi.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/lic_checksum: Cleanup changes to emptytest includeNathan Rossi2022-11-091-0/+2
| | | | | | | | | | | | | | | | | | | | | Config written to the emptytest include file is invalid after the test has cleaned up its temporary directories resulting in the emptytest recipe potentially having invalid content when parsed by successive bitbake runs. This presents the following error in tests after lic_checksum execution, e.g. 'oe-selftest -r lic_checksum recipetool' ERROR: .../emptytest.bb: Unable to get checksum for emptytest SRC_URI entry tmpn_nyosnq: file could not be found Remove the recipe include content once the bitbake runs are completed in each lic_checksum test case. (From OE-Core rev: 087df767a64b271b503d714df3df6d8b3caad1c0) Signed-off-by: Nathan Rossi <nathan.rossi@digi.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest: add a copy of previous mtd-utils version to meta-selftestAlexander Kanavin2022-11-081-2/+2
| | | | | | | | | | | The latest version update eliminated all custom patches, and the selftest expects them. (From OE-Core rev: 95298a7f1ad29c0fc0d02772d646116709ac355f) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/archiver: Add multiconfig test for shared recipesJose Quaresma2022-11-021-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | Test that the shared recipes in original mode with diff enabled works in multiconfig, otherwise it will not build when using the same TMP dir. The test can be run with: oe-selftest -r archiver.Archiver.test_archiver_multiconfig_shared_unpack_and_patch | oe-selftest - INFO - test_archiver_multiconfig_shared_unpack_and_patch (archiver.Archiver) | oe-selftest - INFO - ... ok | oe-selftest - INFO - ---------------------------------------------------------------------- | oe-selftest - INFO - Ran 1 test in 52.948s | oe-selftest - INFO - OK | oe-selftest - INFO - RESULTS: | oe-selftest - INFO - RESULTS - archiver.Archiver.test_archiver_multiconfig_shared_unpack_and_patch: PASSED (49.98s) | oe-selftest - INFO - SUMMARY: | oe-selftest - INFO - oe-selftest () - Ran 1 test in 52.948s | oe-selftest - INFO - oe-selftest - OK - All required tests passed (successes=1, skipped=0, failures=0, errors=0) (From OE-Core rev: 0059a5c9c0116dcc24d03a946703c0cd2ee23d16) Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pinentry: update 1.2.0 -> 1.2.1Alexander Kanavin2022-10-291-5/+4
| | | | | | | | | | libcap support dropped upstream. (From OE-Core rev: 6196af94fef1e25bf68f6888706eed7693cc24a8) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* u-boot: Rework signing to remove interdependenciesSean Anderson2022-10-261-13/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The U-Boot signing code is a bit of a mess. The problem is that mkimage determines the public keys to embed into a device tree based on an image that it is signing. This results in all sorts of contortions: U-Boot has to be available to the kernel recipe so that it can have the correct public keys embedded. Then, the signed U-Boot has to be made available to U-Boot's do_deploy. This same dance is then repeated for SPL. To complicate matters, signing for U-Boot and U-Boot SPL is optional, so the whole process must be seamlessly integrated with a non-signed build. The complexity and interdependency of this process makes it difficult to extend. For example, it is not possible to install a signed U-Boot binary into the root filesystem. This is first because u-boot:do_install must run before linux:do_assemble_fitimage, which must run before u-boot:do_deploy. But aside from infrastructure issues, installing a signed U-Boot also can't happen, because the kernel image might have an embedded initramfs (containing the signed U-Boot). However, all of this complexity is accidental. It is not necessary to embed the public keys into U-Boot and sign the kernel in one fell swoop. Instead, we can sign the kernel, stage it, and sign the staged kernel again to embed the public keys into U-Boot [1]. This twice-signed kernel serves only to provide the correct parameters to mkimage, and does not have to be installed or deployed. By cutting the dependency of linux:do_assemble_fitimage on u-boot:do_install, we can drastically simplify the build process, making it much more extensible. The process of doing this conversion is a bit involved, since the U-Boot and Linux recipes are so intertwined at the moment. The most major change is that uboot-sign is no longer inherited by kernel-fitimage. Similarly, all U-Boot-related tasks have been removed from kernel-fitimage. We add a new step to the install task to stage the kernel in /sysroot-only. The logic to disable assemble_fitimage has been removed. We always assemble it, even if the final fitImage will use a bundled initramfs, because U-Boot will need it. On the U-Boot side, much of the churn stems from multiple config support. Previously, we took a fairly ad-hoc approach to UBOOT_CONFIG and UBOOT_MACHINE, introducing for loops wherever we needed to deal with them. However, I have chosen to use a much more structured approach. Each task which needs to use the build directory uses the following pseudocode: do_mytask() { if ${UBOOT_CONFIG}; then for config, type in zip(${UBOOT_CONFIG}, ${UBOOT_MACHINE}); do cd ${config} mytask_helper ${type} done else cd ${B} mytask_helper "" fi } By explicitly placing the work in mytask_helper, we make it easier to ensure that everything is covered, and we also allow bbappends files to more easily extend the task (as otherwise they would need to reimplement the loop themselves). [1] It doesn't particularly matter what we sign. Any FIT will do, but I chose the kernel's because we already went to the trouble of setting it up with the correct hashes and signatures. In the future, we could create a "dummy" image and sign that instead, but it would probably have to happen in the kernel recipe anyway (so we have access to the appropriate variables). (From OE-Core rev: 5e12dc911d0c541f43aa6d0c046fb87e8b7c1f7e) Signed-off-by: Sean Anderson <sean.anderson@seco.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/debuginfod: don't re-use the databaseRoss Burton2022-09-091-4/+15
| | | | | | | | | | | | | | | | | | | | debuginfod writes the files it scans to a database in $HOME, which isn't ideal when the build trees that get scanned typically are deleted after the test has finished. This can result in debuginfod trying to return objects that no longer exist on disk: libc error: stat /home/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-1032306/tmp/deploy/rpm/core2_64/elfutils-dbg-0.187-r0.core2_64.rpm: No such file or directory libc error: stat /home/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-1113320/tmp/deploy/rpm/core2_64/elfutils-dbg-0.187-r0.core2_64.rpm: No such file or directory libc error: stat /home/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-1113320/tmp/deploy/rpm/core2_64/elfutils-dbg-0.187-r0.core2_64.rpm: No such file or directory Solve this, and save writing a database on disk at all, by using the special database path :memory: which keeps the database in memory only, so state can't leak between tests. (From OE-Core rev: d1c2aa3d241bd17d68e8e38d9399cbb0a3f3b912) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest: Add lower layer test for overlayfs-etcVyacheslav Yurkov2022-09-091-22/+68
| | | | | | | | | | | | | Place a test file on the /etc by means of overlayfs-user recipe. Perform QA checks to make sure that: - When lower layer is exposed, that it's read-only to avoid undefined behavior - By default lower layer is not exposed (From OE-Core rev: 2fc742178675598208b400d9889a1681249d7eea) Signed-off-by: Vyacheslav Yurkov <v.yurkov@precitec.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest: drop image_feature test from overlayfsVyacheslav Yurkov2022-09-091-12/+1
| | | | | | | | | | | The test checked the incorrect class use with INHERIT. This functionality is now covered by bitbake (From OE-Core rev: ec4799b7230ed7e99cf2b13fdf8f6d59a0e12795) Signed-off-by: Vyacheslav Yurkov <v.yurkov@precitec.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/cases/bblayers.py: build python3-jsonschema only onceAlexander Kanavin2022-09-081-1/+3
| | | | | | | | | | | setUpLocal runs before every testcase, setUpClass runs only once in the beginning. (From OE-Core rev: 0c23e711c277562cf32093851e43bf93a7cb61dc) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/bblayers: adjust the revision for the layer setup testAlexander Kanavin2022-09-011-2/+2
| | | | | | | | | | | Using a tag is not actually robust enough, e.g. poky-contrib checkouts do not come with any tags. So let's use a revision matching yocto-4.0, that ought to be present. (From OE-Core rev: 1246aa8e4c9e6fce2f7700cd8e8ad9566a21d6e3) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/bblayers: add a test for creating a layer setup and using it to ↵Alexander Kanavin2022-09-011-0/+22
| | | | | | | | | | | | restore the layers This does a basic run-through of the bitbake-layers plugin, and the resulting json layer config and the layer setup script that uses it. Only poky is actually fetched by the script. (From OE-Core rev: 84ddd6fc6effbb74499409da7e85c09c8a1ff9ea) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta/files: add layer setup JSON schema and exampleJoshua Watt2022-09-011-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Defines a common schema for layer setup that can be consumed by tools to know how to fetch and assemble layers for end users. Also includes an example of the layer setup that constructs poky/meta-intel/imaginary product layer for reference. The schema can be used to validate a layer setup file with the commands: $ python3 -m pip install jsonschema $ jsonschema -i meta/files/layers.example.json meta/files/layers.schema.json (From OE-Core rev: 72740b5dd635579e373b4bfe6ccacfe6a02aa998) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Alex: I made the following modifications to Joshua's original commit: - moved the files from meta/lib to meta/files - the example json showcases a multi-repo, multi-layer setup instead of just poky - closer to a typical product - added oe-selftest that validates the example json against the schema using python3-jsonschema-native - the schema is modified so that: -- all lists (sources, layers, remotes) are replaced by objects keyed by 'name' properties of the list items. This allows using them as dicts inside Python, and makes the json more compact and readable. -- added 'contains_this_file' property to source object -- replaced 'remote' property with a 'oneOf' definition for git with a specific 'git-remote' property. 'oneOf' is problematic when schema validation fails: the diagnostic is only that none of oneOf variants matched, which is too non-specific. -- added 'describe' property to 'git-remote' object. -- removed description property for a layer source: it is not clear how to add that when auto-generating the json Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake-layers: add a command to save the active build configuration as a ↵Alexander Kanavin2022-09-011-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | template into a layer This is the reverse of setting up a build by pointing TEMPLATECONF to a directory with a template and running '. oe-init-build-env': this takes the config files from build/conf, replaces site-specific paths in bblayers.conf with ##OECORE##-relative paths, and copies the config files into a specified layer under a specified template name. In many or perhaps most cases such static prefabricated configurations (that require no further editing) are just enough, and I believe they should be offered by the official configuration management. On the other hand, generating build configurations with a sufficiently versatile tool is a far more complex problem, and one we should try to tackle once we see where and how static configs fall short. Tooling to discover and select these templates when setting up a build will be provided later on. How to use: alex@Zen2:/srv/work/alex/poky/build-layersetup$ bitbake-layers save-build-conf ../../meta-alex/ test-1 NOTE: Starting bitbake server... NOTE: Configuration template placed into /srv/work/alex/meta-alex/conf/templates/test-1 Please review the files in there, and particularly provide a configuration description in /srv/work/alex/meta-alex/conf/templates/test-1/conf-notes.txt You can try out the configuration with TEMPLATECONF=/srv/work/alex/meta-alex/conf/templates/test-1 . /srv/work/alex/poky/oe-init-build-env build-try-test-1 alex@Zen2:/srv/work/alex/poky/build-layersetup$ (From OE-Core rev: f319534dc8fc68dfe120d129154a509f0cd6a3b0) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest: add test for debuginfodRoss Burton2022-08-301-0/+44
| | | | | | | | | | | | Add a new selftest to exercise the debuginfod support, by starting a debuginfod on DEPLOY_DIR and verifying that an image can fetch the symbols for a binary. (From OE-Core rev: d035fd394fd2747ab4b75867af6123f3efb1990f) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>