summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa
Commit message (Collapse)AuthorAgeFilesLines
* oeqa/utils/httpserver: connect up the request loggingRoss Burton2023-02-011-5/+16
| | | | | | | | | | | | | | | | Call logger.info() in the log_message handler so that we get request logging, and hopefully even error messages. Create a child logger to be neat and compartmentalise the logging. Add a __main__ entrypoint so this class can be exercised outside of oeqa. Remove unused traceback import. (From OE-Core rev: 8fc939d942cec1662ca386b87c63f167bb10fd05) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sdkext/cases/devtool: pass a logger to HTTPServiceRoss Burton2023-02-011-1/+1
| | | | | | | | | | Pass our logger to the HTTPService instance so we can see the requests and any errors. (From OE-Core rev: 3485df2ff61143aac03d92300b7bac4e5d6b2427) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/qemurunner: do not use Popen.poll() when terminating runqemu with a signalAlexander Kanavin2023-02-011-4/+7
| | | | | | | | | | | | | | | This does not actually guarantee that the child runqemu process has completely exited: poll() may return prematurely while the SIGTERM handler in runqemu is still running. This thwarts the rest of the processing, and may terminate the handler before it completes. Use Popen.communicate() instead: this is what python documentation recommends as well: https://docs.python.org/3/library/subprocess.html#subprocess.Popen.communicate (From OE-Core rev: cd3e55606c427287f37585c5d7cde936471e52f4) Signed-off-by: Alexander Kanavin <alex@linutronix.de> 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>
* oeqa/runtime/rust: Add cargo testAlex Kiernan2022-12-281-0/+17
| | | | | | | (From OE-Core rev: f41a4e3d4c82b6332c5d52ad8fb38e32c7aee74b) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/rpm.py: Increase timeout and add debug outputPavel Zhukov2022-12-261-12/+11
| | | | | | | | | | | | | | | | | | [Yocto #14346] Systemd may be slow in killing pam session sometimes [1][2]. It may cause rpm test to fail because there's process (sd_pam) running and own by "test1" user after timeout. Increasing timeout to 2 mins and assert earlier with debug output if there's such process(es). If increasing of timeout doesn't help we may want to force deletion of the user as [2] suggests. [1] https://github.com/systemd/systemd/issues/8598 [2] https://access.redhat.com/solutions/6969188 (From OE-Core rev: 972fcc0ed1e0d36c3470071a9c667c5327c1ef78) Signed-off-by: Pavel Zhukov <pavel@zhukoff.net> 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>
* oeqa/runtime/rust: Add basic compile/run testAlex Kiernan2022-12-232-0/+26
| | | | | Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/concurrencytest: Add number of failures to summary outputRichard Purdie2022-12-221-1/+3
| | | | | | | | | | | | When running oe-selftest and seeing the end of a running log, it is extremely helpful to know if there have been failures or not to save looking at the rest of the log. Add the number of failures to the summary line so that people monitoring builds have an easier time before the end totals are printed. (From OE-Core rev: 6b23996911d91f7f99774646c6db9f3490b4cb62) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool/friends: Use LAYERSERIES_CORENAMES when generating ↵4.2_M1Richard Purdie2022-12-082-3/+5
| | | | | | | | | | | | | | | | | | 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>
* unfs: update 0.9.22 -> 0.10.0Alexander Kanavin2022-11-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the first release in 13 years; I have reviewed the accumulated patches, and dropped some of them where purpose or issue being fixed is not clear. Specifically: 0001-Add-listen-action-for-a-tcp-socket.patch 0001-daemon.c-Libtirpc-porting-fixes.patch fixed upstream in https://github.com/unfs3/unfs3/commit/84ab475f93c0af437ece21770617603c508dee8c 0001-attr-fix-utime-for-symlink.patch addresses an open issue in https://github.com/unfs3/unfs3/issues/4 please rebase and re-submit as a PR if the problem is still present. alternate_rpc_ports.patch unnecessary as of https://git.yoctoproject.org/poky/commit/?id=6bb9860ef7ba9c84fe9bd3a81aa6555f67ebd38e Command line options introduced by the patch no longer used anywhere. fix_compile_warning.patch merged upstream. fix_pid_race_parent_writes_child_pid.patch rebased and re-submitted upstream. no-yywrap.patch dropped as backport. relative_max_socket_path_len.patch needs to be re-submitted by the original author, purpose and reproducer scenario unclear. rename_fh_cache.patch merged upstream. tcp_no_delay.patch purpose and use case for oe unclear. unfs3_parallel_build.patch fixed upstream in https://github.com/unfs3/unfs3/commit/987d32ca12222aeb48d46b4e1c9d39bab38ad431 https://github.com/unfs3/unfs3/commit/a39a78995ca8c6f8dd22da93dd60b4a1f8d32728 Drop -N option from oeqa nfs helper and runqemu helper; the option was provided by tcp_no_delay.patch and is not needed for the tests or qemu. Drop ad hoc libtirpc support; upstream supports it directly now. Drop the check for portmap/rpcbind, it is unnecessary as of https://git.yoctoproject.org/poky/commit/?id=6bb9860ef7ba9c84fe9bd3a81aa6555f67ebd38e (From OE-Core rev: fa2f7cf545137b071db97015bca5b70d77566cd8) 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>
* qemurunner.py: use IP address from command lineMikko Rapeli2022-11-221-2/+2
| | | | | | | | (From OE-Core rev: 44ab760c8ad7889b92019ec9341dfbec425ea4c0) Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/qemurunner: implement vmdk images supportSergei Zhmylev2022-11-221-1/+5
| | | | | | | | | | | | | Qemurunner should not pass rootfs to runqemu in case rootfs is not a filesystem itself. Some images could be built into some disk format like vmdk and this commit makes qemurunner handle such images properly. (From OE-Core rev: 5aea74046cf4c1aa7fa9e2402788d662268ccf53) Signed-off-by: Sergei Zhmylev <s.zhmylev@yadro.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* qemurunner.py: support setting slirp host IP addressMikko Rapeli2022-11-201-1/+2
| | | | | | | | | | | | | | | | | | | | | | By default host side IP address is not set and qemu listens on all IP addresses on the host machine which is not a good idea when images have root login enabled without password. It make sense to listen only on localhost IP address 127.0.0.1 using config change like: QB_SLIRP_OPT = "-netdev user,id=net0,hostfwd=tcp:127.0.0.1:2222-:22" This config works for qemu itself, but breaks runqemu which tries to parse the host side port number from qemu process command line arguments. So change the runqemu side hostfwd parsing for port number to ignore the host IP address field. Reviewed-by: Quentin Schulz <foss+yocto@0leil.net> (From OE-Core rev: bdbd52082eb26f418000eb4e424baae9babc272c) Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> 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/core/decorator: add decorators to skip based on HOST_ARCHRoss Burton2022-11-111-0/+24
| | | | | | | | | | | | | There are already decorators to skip on the value of MACHINE, but for flexibility it's better to skip based on the target architecture. This means, for example, the ISO image tests could skip if the architecture isn't x86. (From OE-Core rev: 0c21ff0a92906b6b4820eb8beddf8762fe70653d) 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/qemurunner: update exception class for QMP API changesRoss Burton2022-11-111-1/+1
| | | | | | | | (From OE-Core rev: c1841ab1e7b4e078cea77001e83e733764bb65ea) 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>
* oeqa/runtime/dnf: rewrite test_dnf_installroot_usrmergeRoss Burton2022-11-021-20/+12
| | | | | | | | | | | | | | This test doesn't get exercised on the autobuilder and so it was broken: specifically some of the ln commands silently fail and the chroot isn't usable. Rewrite the test case to correctly construct a chroot so the test can pass. (From OE-Core rev: bb6ebb9956a42df3ed8681aec9aedf340b12f934) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/target/ssh: add ignore_status argument to run()Ross Burton2022-11-021-2/+2
| | | | | | | | | | | | | | | The underlying _run() method has an ignore_status argument and can either return the exit code or raise an exception if it is non-zero. Add the same argument to the run() method so that test cases can change this value. It currently defaults to True as that is the existing behaviour, but a follow-up patch will change this to False as test cases should fail on errors unless told otherwise. (From OE-Core rev: e244228730178d15a066a1428956de328cc09671) Signed-off-by: Ross Burton <ross.burton@arm.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/runtime/dnf: use dnf-test packagesRoss Burton2022-09-261-32/+20
| | | | | | | | | | | | | | | | | | Instead of installing run-postinsts with it's postinst scripts causing systemd restarts, use the new dnf-test-* packages instead. Remove from the installroot tests entirely as they're exercised enough using just busybox. Rewrite the exclude test to be simplier now these packages are not going to be part of an existing dependency chain. [ YOCTO #14787 ] (From OE-Core rev: fb1de2abc53bd742bc55cfecd384b78852c10d80) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/runtime/dnf: fix typoAlexandre Belloni2022-09-201-1/+1
| | | | | | | (From OE-Core rev: 454b85fc612bd060b51ac2b94e36698ed1b76d56) Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/utils/decorators: Drop getResultsRichard Purdie2022-09-171-37/+0
| | | | | | | | | | Now there are no users of getResults, drop it. The code doesn't work with python 3.8 onwards and is pretty horrible with internal python knowledge. We don't need this. (From OE-Core rev: 058d00386f13c48e84081adc0504fc71a06c6529) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/utils/decorators: Drop unused decoratorsRichard Purdie2022-09-171-48/+0
| | | | | | | | | | These decorators aren't used anywhere in core and broke from python 3.8 onwards. The code implementing them (in getResults) is pretty horrible and I'm happy to see them and it removed. (From OE-Core rev: 1d7ff45e2bd48c613a0757491daaa3bedc97cb5e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oetest: Drop getResults usage from oeRuntimeTestRichard Purdie2022-09-171-15/+1
| | | | | | | | | | | | Despite the name, this code is only used from testexport and the function in question is broken on python 3.8 onwards. Since nobody is using it and the failure log handling here is of questionable benefit anyway, drop it. We should be using the same code for normal test runs and testexport, not having two different codepaths. (From OE-Core rev: 19919109f20c3b45ebc26b9b92594fbdc2cbc79d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oetest: Drop unused variableRichard Purdie2022-09-171-6/+0
| | | | | | | | | The pscmd variable appears unused, drop it and the code which then isn't needed. (From OE-Core rev: fbdc1f307c3a73979aee288f03aa513ccd93b799) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/qemurunner: Work around possible control character contaminationRichard Purdie2022-09-131-8/+13
| | | | | | | | | | | | | | | | | Using a binary string as the login banner search expression is fraught with risks. We've seen cases on the autobuilder where "login:" is clearly shown but the code hasn't triggered. The most likely cause is hidden control characters in the output causing the search to fail. Take the opportunity to remove the horrible binary string search, at the expense of decoding the bootlog multiple times. Tweak the logging so we can know which log was printed (self.msg or bootlog) just in case this isn't the issue and we need more information in future. (From OE-Core rev: 91b9e30e08695e715ef14c3df7471e8c99f9deb5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa: qemurunner: Report UNIX Epoch timestamp on loginJoshua Watt2022-09-121-2/+2
| | | | | | | | | | | | | | Updates the log message printed when login banner is seen in QEMU to report the UNIX Epoch time in addition to the human readable time. This makes it much easier and accurate to correlate logs with the guest, in particular with the guest journalctl which prints log timestamps in human readable format and the oeqa SSH debug logging which prints the UNIX Epoch. (From OE-Core rev: 275b6f3c8d0eeafa3902c48a49655491a89c47bc) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>