summaryrefslogtreecommitdiffstats
path: root/meta/lib
Commit message (Collapse)AuthorAgeFilesLines
* selftest: devtool: set BB_HASHSERVE_UPSTREAM when setting SSTATE_MIRRORMartin Jansa2023-04-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * with my build/conf/local.conf: SSTATE_DIR = "/OE/build/poky/build/sstate-cache" these devtool tests will first set own SSTATE_DIR and the original one set as SSTATE_MIRROR: 2023-03-11 11:51:46,837 - oe-selftest - INFO - test_devtool_update_recipe_append (devtool.DevtoolUpdateTests.test_devtool_update_recipe_append) 2023-03-11 11:51:46,846 - oe-selftest - DEBUG - Appending to: /OE/build/poky/build/build-st-2023-03-11-patch2/devtool.DevtoolUpdateTests.test_devtool_update_recipe_append/build-st/conf/selftest.inc SSTATE_DIR = "/OE/build/poky/build/build-st-2023-03-11-patch2/devtool.DevtoolUpdateTests.test_devtool_update_recipe_append/build-st/sstate_devtool" SSTATE_MIRRORS += "file://.* file:////OE/build/poky/build/sstate-cache/PATH" * but that unfortunately leads to a warning from sanity.bbclass about SSTATE_MIRRORS without matching BB_HASHSERVE, because BB_HASHSERVE is set to "auto" by default these tests failing with: 2023-03-11 11:55:39,610 - oe-selftest - INFO - ====================================================================== 2023-03-11 11:55:39,610 - oe-selftest - INFO - FAIL: test_devtool_update_recipe_append_git (devtool.DevtoolUpdateTests.test_devtool_update_recipe_append_git) 2023-03-11 11:55:39,610 - oe-selftest - INFO - ---------------------------------------------------------------------- 2023-03-11 11:55:39,611 - oe-selftest - INFO - Traceback (most recent call last): File "/OE/build/poky/meta/lib/oeqa/selftest/cases/devtool.py", line 1118, in test_devtool_update_recipe_append_git self.assertNotIn('WARNING:', result.output) AssertionError: 'WARNING:' unexpectedly found in 'NOTE: Starting bitbake server...\nWARNING: You are using a local hash equivalence server but have configured an sstate mirror. This will likely mean no sstate will match from the mirror. You may wish to disable the hash equivalence use (BB_HASHSERVE), or use a hash equivalence server alongside the sstate mirror.\nLoading cache...done.\nLoaded 0 entries from dependency cache.\nParsing recipes...done.\nParsing of 947 .bb files complete (0 cached, 947 parsed). 1764 targets, 52 skipped, 0 masked, 0 errors.\n\nSummary: There was 1 WARNING message.\nINFO: Updating SRCREV in recipe mtd-utils-selftest_git.bb\nNOTE: Writing append file /tmp/devtoolqa1m2lh02v/layer/recipes-devtools/mtd/mtd-utils-selftest_git.bbappend' ---------------------------------------------------------------------- * just setting BB_HASHSERVE to empty doesn't work, because then we would need to disable OEEquivHash as well as it fails with: ERROR: OEEquivHash requires BB_HASHSERVE to be set (From OE-Core rev: e634a87d2f4f1e57d28c4e7462d56515ed2ea9ef) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit 96d4392ee9c5c3674e5c4c4512f527a2ca6765e4) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cve-check: Fix false negative version issueGeoffrey GIRY2023-04-112-0/+58
| | | | | | | | | | | | | | | | | NVD DB store version and update in the same value, separated by '_'. The proposed patch check if the version from NVD DB contains a "_", ie 9.2.0_p1 is convert to 9.2.0p1 before version comparison. [YOCTO #14127] Reviewed-by: Yoann CONGAL <yoann.congal@smile.fr> (From OE-Core rev: f331c80df6c447d3073ebe3f00102c78ced242f3) Signed-off-by: Geoffrey GIRY <geoffrey.giry@smile.fr> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit 7d00f6ec578084a0a0e5caf36241d53036d996c4) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa rtc.py: skip if read-only-rootfsMikko Rapeli2023-03-281-3/+5
| | | | | | | | | | | | | | hwclock command fails on read-only-rootfs: AssertionError: 1 != 0 : Failed to reset RTC time, output: hwclock: cannot open /etc/adjtime: Read-only file system (From OE-Core rev: b89abb0f4cc28c45a62c524a3e2f96795235e214) Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 017bf8c160f6ab67d9f8e8d9e30b15bf84f73807) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/recipetool: Stop test corrupting tinfoil classRichard Purdie2023-03-231-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | Running recipetool.RecipetoolTests.test_recipetool_handle_license_vars followed by wic.Wic2.test_biosplusefi_plugin_qemu would show a failure of: File "/media/build/poky/meta/lib/oeqa/utils/commands.py", line 351, in runqemu qemu = oeqa.targetcontrol.QemuTarget(recipedata, targetlogger, image_fstype) File "/media/build/poky/meta/lib/oeqa/targetcontrol.py", line 116, in __init__ use_kvm = oe.types.qemu_use_kvm(d.getVar('QEMU_USE_KVM'), d.getVar('TARGET_ARCH')) File "/media/build/poky/meta/lib/oe/types.py", line 182, in qemu_use_kvm if kvm and boolean(kvm): File "/media/build/poky/meta/lib/oe/types.py", line 128, in boolean raise ValueError("Invalid boolean value '%s'" % value) ValueError: Invalid boolean value '/media/build/poky/meta/files/common-licenses' which made no sense until you realise the recipetool test is corrupting the tinfoil class. Work on a copy instead to avoid this. (From OE-Core rev: af73a79f6d4e18e8cc81da19882b7125b92d2523) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 7fe76fe17f67c1bbd108d02836692fed20d24771) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/runtime_test/virgl: Disable for all Rocky LinuxMichael Halstead2023-03-231-1/+2
| | | | | | | | | | | | | RHEL compatible kernels do not support vgem so we disable virgl headless testing. (From OE-Core rev: 0f317a0533f20580e77a0d6d0b636c05b3230b1e) Signed-off-by: Michael Halstead <mhalstead@linuxfoundation.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 78bc1ba2361249ec845d1b9e28d429a37dd83910) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/sdk: Improve Meson testTom Hochstein2023-03-201-1/+1
| | | | | | | | | | | | | | | | | The meson wrapper setup command detection is broken in the case of an implicit setup command with an option with a space-separated argument, but the test was not detecting it since the case was not covered. Add the option `--warnlevel 1` to the meson command line to cover this case. (From OE-Core rev: 3fbcaaa01304bbc645ddf01ef91805811e3c7f54) Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit 54e9ee8a0c6c9fc89cbb743f0e4fc18607d503cf) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/prservice: Improve debug output for failureRichard Purdie2023-03-201-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: 9afb0e2f781720715fc6fd8595d6996465589892) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit d03f4cf19c2cc96e9d942252a451521dfec42ebc) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa ssh.py: fix hangs in run()Mikko Rapeli2023-03-091-9/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When qemu machine hangs, the ssh commands done by tests are not timing out. do_testimage() task has last logs like this: DEBUG: time: 1673531086.3155053, endtime: 1673531686.315502 The test process is stuck for hours, or for ever if the executing command or test case did not set a timeout correctly. The default 300 second timeout is not working when target hangs. Note that timeout is really a "inactive timeout" since data returned by the process will reset the timeout. Make the process stdout non-blocking so read() will always return right away using os.set_blocking() available in python 3.5 and later. Then change from python codec reader to plain read() and make the ssh subprocess stdout non-blocking. Even with select() making sure the file had input to be read, the codec reader was trying to find more stuff and blocking for ever when process hangs. While at it, add a small timeout to read data in larger chunks if possible. This avoids reading data one or few characters at a time and makes the debug logs more readable. close() the stdout file in all cases after read loop is complete. Then make sure to wait or kill the ssh subprocess in all cases. Just reading the output stream and receiving EOF there does not mean that the process exited, and wait() needs a timeout if the process is hanging. In the end kill the process and return the return value and captured output utf-8 encoded, just like before these changes. This fixes ssh run() related deadlocks when a qemu target hangs completely. (From OE-Core rev: 04f080802b4a28709a105e4f0ead56a7a2da42b4) Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit 9c63970fce3a3d6029745252a6ec2bf9b9da862d) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/resulttooltests: fix minor typoAlexis Lothoré2023-03-091-1/+1
| | | | | | | | | | (From OE-Core rev: 2da6b6f231519b32fde61a64559aa105f2a9342f) Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 80cfa56d133bd3abbb1f37272607d8e15ce70861) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstatesig: Improve output hash calculationMateusz Marciniec2023-03-091-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Symbolic links to the files are included during the output hash calculation but symlinks to the directories are missed. So if the new symlink to a directory was the only change made, then the output hash won't change, and the Hash Equivalence server may change unihash. In the next run bitbake may use an older package from sstate-cache. To fix this followlinks=True flag could be set for os.walk but it can lead to infinite recursion if link points to a parent directory of itself. Also, all files from a directory to which symlink points would be included in depsig file. Therefore another solution was applied, I added code that will loop through directories and process those that are symlinks. (From OE-Core rev: 477a4e816494e256b309fd7e84b2c3796708e6e8) Signed-off-by: Mateusz Marciniec <mateuszmar2@gmail.com> Signed-off-by: Tomasz Dziendzielski <tomasz.dziendzielski@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit ee729163f31f26b1462a47e1e53f7a0f9de9b464) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/bbtests: Update message lookup for test_git_unpack_nonetwork_failAlexandre Belloni2023-02-241-1/+1
| | | | | | | | | | | | bitbake's output changed, update the test (From OE-Core rev: 6b50713cd51002584915f46eb366b8667db210ea) Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 7e64b63f96dd1d71e263e7bbbe6591e51e98395a) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa qemurunner.py: try to avoid reading one character at a timeMikko Rapeli2023-02-241-0/+2
| | | | | | | | | | | | | | Read from serial console with a small delay to bundle data to e.g. full lines. Reading one character at a time is not needed and causes busy looping. (From OE-Core rev: e91a09702680b713293bcfcc851b27a73e884a8b) Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> (cherry picked from commit 0049f6757f6f956fb4cc77b3df6a672c20b53cf4) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa qemurunner.py: add timeout to QMP callsMikko Rapeli2023-02-241-0/+3
| | | | | | | | | | | | | | | | | | When a qemu machine hangs, the QMP calls can hang for ever too, and when this happens any failing test commands from ssh runner may be followed by dump_monitor() calls which then also hang. Hangs followed by hangs. Use runqemutime at setup and run_monitor() specific timeout for later calls. (From OE-Core rev: 3b99d0ce6445084038f89dfa98605a7aec49107b) Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> (cherry picked from commit 3a07bdf77dc6ecbf4c620b051dd032abaaf1e4ff) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa qemurunner: read more data at a time from serialMikko Rapeli2023-02-241-1/+3
| | | | | | | | | | | | | | Use a short sleep to bundle serial console reads so that we are not reading one character at a time which reduces busy looping. (From OE-Core rev: 3699e5bf2f9259266c49aaf69127183988b9d052) Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> (cherry picked from commit cafe65d8cf7544edbd387f7f5f6d77c64c6b18fa) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa dump.py: add error counter and stop after 5 failuresMikko Rapeli2023-02-241-2/+21
| | | | | | | | | | | | | | | | | | | | | | If test target qemu machine hangs completely, dump_target() calls over serial console are taking a long time to time out, possibly for every failing ssh command execution and a lot of test cases, and same with dump_monitor(). Instead of trying for ever, count errors and after 5 stop trying to dump_target() and dump_monitor() completely. These help to end testing earlier when a test target is completely deadlocked and all ssh, serial and QMP communication with it are failing. (From OE-Core rev: 91bc1e03bc990c527d8aadbdcd7bf97217db124e) Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> (cherry picked from commit d9ad0a055abba983c6cee1dca4d2f0a8a3c48782) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa ssh.py: add connection keep alive options to ssh clientMikko Rapeli2023-02-241-0/+2
| | | | | | | | | | | | | | | | | | | | Configure ssh client to test that connection with server is up. If the server does not respond within a minute then the connection, target machine or sshd daemon are stuck and it's better to exit the command execution with errors. Some tests can execute a long time without returning stdout/stderror data and it's difficult to adjust timers for those cases if connection to target machine or the target machine itself hangs and output is not expected in minutes or even hours. (From OE-Core rev: 94021c8571242dd491ee3c7c40144c5a12ca8e42) Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> (cherry picked from commit ba68ff04c5786eca7cd8dd44056705867dea8ac4) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa ssh.py: move output prints to new lineMikko Rapeli2023-02-241-3/+3
| | | | | | | | | | | | | The output from is garbled otherwise and it's not easy to remove debug output form real command output on target. (From OE-Core rev: 36b572fbc5c88b9aaf4e146ecdb00c8d4ea6ff70) Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> (cherry picked from commit 917a70cbc43ac1c70c477b220c4115735457ef04) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa context.py: fix --target-ip comment to include ssh port numberMikko Rapeli2023-02-151-2/+2
| | | | | | | | | | | | | Providing ssh port number is supported too with "--target-ip 192.168.0.10:22". (From OE-Core rev: 54c30e509074073b99a7a8890482ba1af2abbab9) Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 637919b9df0abc06da5b2f9b389cf25376bd6b7c) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/locales: Add selftest for locale generation/presenceLouis Rannou2023-02-151-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: 7b7a03a5cd8a5c14918f56e4dc00629d0a109a2e) Signed-off-by: Louis Rannou <lrannou@baylibre.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 53258fd810bea6475af9f908f7b712a13a02b628) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: remove True option to getVar and getVarFlag calls (again)Martin Jansa2023-02-151-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * True is default since 2016 and most layers were already updated not to pass this parameter where not necessary, e.g. oe-core was updated couple times, first in: https://git.openembedded.org/openembedded-core/commit/?id=7c552996597faaee2fbee185b250c0ee30ea3b5f Updated with the same regexp as later oe-core update: https://git.openembedded.org/openembedded-core/commit/?id=9f551d588693328e4d99d33be94f26684eafcaba with small modification to replace not only d.getVar, but also data.getVar as in e.g.: e.data.getVar('ERR_REPORT_USERNAME', True) and for getVarFlag: sed -e 's|\(d\.getVarFlag \?\)( \?\([^,()]*, \?[^,()]*\), \?True)|\1(\2)|g' \ -i $(git grep -E 'getVarFlag ?\( ?([^,()]*), ?([^,()]*), ?True\)' \ | cut -d':' -f1 \ | sort -u) (From OE-Core rev: de7bf6689a19dc614ce4b39c84ffd825bee1b962) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 26c74fd10614582e177437608908eb43688ab510) Signed-off-by: Steve Sakoman <steve@sakoman.com> (cherry picked from commit 24a86d0c55ee89ae0dc77975e1d0ee02898d2289) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* httpserver: add error handler that write to the loggerRoss Burton2023-02-151-0/+6
| | | | | | | | | | (From OE-Core rev: dcf1dfc053c058a5e03051320845e278b9f81b75) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit a4bcca3123685f410fc99e5cc23f2b8f39fd0a63) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sdkext/cases/devtool: pass a logger to HTTPServiceRoss Burton2023-02-151-1/+1
| | | | | | | | | | | | | Pass our logger to the HTTPService instance so we can see the requests and any errors. (From OE-Core rev: 032b0a834b7b1583d3d2bd4ac55414583ce8dfdc) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 3485df2ff61143aac03d92300b7bac4e5d6b2427) Signed-off-by: Steve Sakoman <steve@sakoman.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-151-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: 88e7bac0f06d4f12cd6f078d37e4e9975871860f) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit cd3e55606c427287f37585c5d7cde936471e52f4) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/virgl: use pkg-config from the hostAlexander Kanavin2023-01-261-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: 07a1df271d47306a41cef8810db4dfb0646866e3) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit f0521f8a3ba7e15482756529ee7b0a95b3d53e7d) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/reproducible: Use git log without gpg signatureBenoît Mauduit2023-01-261-1/+2
| | | | | | | | | | | | | | | Previously, if "showSignature" is present in user gitconfig, parsing of the timestamp will fail. Ideally we should replace this command with a git plumbing command. (From OE-Core rev: 3db6db22770515fe52d847bdafd6ec9809ab50e0) Signed-off-by: Benoît Mauduit <bmauduit@beneth.fr> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit 3bd6f78f79b3d3e87d8db1e11f58d8021f929843) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/rpm.py: Increase timeout and add debug outputPavel Zhukov2023-01-151-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: 36491639258c6f9f0bd1890ee68f8e2f44a77e72) Signed-off-by: Pavel Zhukov <pavel@zhukoff.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 972fcc0ed1e0d36c3470071a9c667c5327c1ef78) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/concurrencytest: Add number of failures to summary outputRichard Purdie2023-01-061-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: 5fa9d58f59bebfc9eb495b50ef9a767a5c765b77) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 6b23996911d91f7f99774646c6db9f3490b4cb62) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/create-spdx: Add SPDX_PRETTY optionJoshua Watt2023-01-061-2/+2
| | | | | | | | | | | | | | Adds an option to make the SPDX more human-readable (at the expense of a larger files) (From OE-Core rev: e680a7402edec2803b03c56590c9d08d07497c73) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 4799594b26f77ed259dc661bf077519b338390c8) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/externalsrc: add test for srctree_hash_filesPeter Marko2022-12-231-0/+44
| | | | | | | | | | (From OE-Core rev: c3647c6beb04426774e4d99f2442f460d6a6b42c) Signed-off-by: Peter Marko <peter.marko@siemens.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit 7b9728e5b8bdf1193c1304ec3beeca4b5bf8d2da) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/tinfoil: Add test for separate config_data with ↵Richard Purdie2022-12-131-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: 2816c63240f21b175461e535d88943fc6bcd0b52) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit b07de5de43ec9c9a2c5d496a64940ccdc5b47cf8) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstatesig: emit more helpful error message when not finding sstate manifestEnrico Jörns2022-12-071-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since oe-core commit 64b89f3c8fc31842256c482a3039d90d3f12c1cc ("sstatesig.py: make it fatal error when sstate manifest isn't found") errors like: | Manifest [..]/tmp/sstate-control/manifest-x86_64_x86_64-nativesdk-dbus.populate_sysroot not found in imx8mm_dummy cortexa53-mx8mm cortexa53 armv8a-crc armv8a aarch64 allarch x86_64_x86_64-nativesdk (variant '')? are fatal now and cannot be ignored but must be debugged. Unfortunately, the currently emitted error message is a bit imprecise with telling the reader what has actually gone wrong. This commit: * adds the word 'sstate' to the error message to clarify the scope we are dealing with ('sstate manifests', since there are other manifests, too) * does not randomly print the last manifest file searched for as THE manifest file that could not be found Instead, we print the name of the task the sstate was searched for * adds the word 'multilib' to variant to make clear which variant we are talking about * adds a separate line noting the searched pkgarchs and adds explicitly mentions this word ('pkgarchs') * prints a list of ALL manifest file locations attempted * removes the '?' at the end of the message since such errors indeed leave the question of what is the cause but the error message itself is more like a statement. The result for the exact same issue as noted above then looks as follows: | The sstate manifest for task 'dbus:populate_sysroot' (multilib variant '') could not be found. | The pkgarchs considered were: imx8mm_dummy, cortexa53-mx8mm, cortexa53, armv8a-crc, armv8a, aarch64, allarch, x86_64_x86_64-nativesdk. | But none of these manifests exists: | [..]/tmp/sstate-control/manifest-imx8mm_dummy-dbus.populate_sysroot | [..]/tmp/sstate-control/manifest-cortexa53-mx8mm-dbus.populate_sysroot | [..]/tmp/sstate-control/manifest-cortexa53-dbus.populate_sysroot | [..]/tmp/sstate-control/manifest-armv8a-crc-dbus.populate_sysroot | [..]/tmp/sstate-control/manifest-armv8a-dbus.populate_sysroot | [..]/tmp/sstate-control/manifest-aarch64-dbus.populate_sysroot | [..]/tmp/sstate-control/manifest-allarch-dbus.populate_sysroot | [..]/tmp/sstate-control/manifest-x86_64_x86_64-nativesdk-dbus.populate_sysroot (From OE-Core rev: cb4ad96a5d71c0a7e7a24fe12f12c2fbe06ae119) Signed-off-by: Enrico Jorns <ejo@pengutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit 735ec126ec219c7cb89cb05b0e433201bb7f59eb) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstatesig: skip the rm_work task signatureJose Quaresma2022-12-011-0/+6
| | | | | | | | | | | | | | | | | | | | We can skip the rm_work task signature to avoid running the task when we remove some tasks from the dependencie chain. The inject_rm_work handler on the rm_work bbclass triggers the rm_work task running for any signature change in the dependencie chain of the task do_build of each recipe. i.e INHERIT:remove = "create-spdx" will trigger the do_rm_work when we collect the sstate cache with INHERIT = "create-spdx" (From OE-Core rev: ad52bb4643eb8063ff4db6bcb86b9a593ad6ce7d) Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit 292305700e39d0ebd64763f5032c39ace5005fad) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/minidebuginfo: Create selftest for minidebuginfoNathan Rossi2022-11-241-0/+49
| | | | | | | | | | | | | | | | | 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: e7b0b23fd8357456ba41fe8d222f10313536d2d3) Signed-off-by: Nathan Rossi <nathan.rossi@digi.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit 5063a31ad05b75ec6ac12158fe759e81fcdb1585) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/lic_checksum: Cleanup changes to emptytest includeNathan Rossi2022-11-241-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: 63f4da1f46d4fdf0c244f0e52028087657fea7d4) Signed-off-by: Nathan Rossi <nathan.rossi@digi.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit 087df767a64b271b503d714df3df6d8b3caad1c0) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* overlayfs: Allow not used mount pointsVyacheslav Yurkov2022-11-091-1/+5
| | | | | | | | | | | | | | | | | When machine configuration defines a mount point, which is not used in any recipe, allow to fall through and only report a note in the logs. This can be expected behavior, when a mount point is defined for several machines, but not used in all of them (From OE-Core rev: 89d83920dc7f80abb20fadde97b47aba9cd992cc) Signed-off-by: Vyacheslav Yurkov <Vyacheslav.Yurkov@bruker.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> (cherry picked from commit a9c604b5e0d943b5b5f7c8bdd5be730c2abcf866) Signed-off-by: Steve Sakoman <steve@sakoman.com> (cherry picked from commit c7c6b273656a3e2b8b959004b996e56d4086ce5e) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe/packagemanager/rpm: don't leak file objectsRoss Burton2022-11-091-12/+21
| | | | | | | | | | (From OE-Core rev: 406abef218a7e743f7892eff4c13fa0f889aa7f2) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 28706c27680745c9f8df27713ce63ef5d611138c) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/runtime/dnf: fix typoAlexandre Belloni2022-09-281-1/+1
| | | | | | | | | | (From OE-Core rev: 7bd92a0fac5f83c5c8b38591901760753192e586) Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 454b85fc612bd060b51ac2b94e36698ed1b76d56) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa: qemurunner: Report UNIX Epoch timestamp on loginJoshua Watt2022-09-161-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: 2a860de611bebae2e1100380b975b7648b8560d9) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 275b6f3c8d0eeafa3902c48a49655491a89c47bc) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs.py: dont try to list installed packages for baremetal imagesAlejandro Hernandez Samaniego2022-09-161-0/+4
| | | | | | | | | | | | | | | | | | Theres not a rootfs for baremetal images, hence we should avoid trying to list rootfs packages for them. This fixes an issue where some classes (e.g. license_image) rely on rootfs functionality when included for baremetal images even if its nonexistent (From OE-Core rev: e713e118b46aa0c8a5015b915a93718b7aa20a74) 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> (cherry picked from commit 5a7e13f46083ce3b08aa762238c1e93b7626dda4) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib:npm_registry: initial checkinEnrico Scholz2022-09-121-0/+169
| | | | | | | | | | | | | | | | | | | | | | | Helper module to: - generate meta information from package.json content. This data has a format as provided by https://registry.npmjs.org - put this meta information and the corresponding tarball in the nodejs cache. This uses an external, nodejs version specific helper script (oe-npm-cache) shipped in oe-meta To avoid further nodejs version dependencies, future versions of this module might omit the caching completely and serve meta information and tarball by an http server. (From OE-Core rev: 17132402031f4659db5cc1f84263278b82b27ffa) Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 6cd5886ad05fee704e8a5892bd370c360c8c3b54) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: introduce UBOOT_MKIMAGE_KERNEL_TYPEMing Liu2022-09-121-1/+3
| | | | | | | | | | | | | | | | | | | | Sometimes an end user might want to choose another kernel type argument for uboot-mkimage other than "kernel", for instance: "kernel_noload". Let's introduce a variable UBOOT_MKIMAGE_KERNEL_TYPE to support that, and it could be used by BSP layers as well. (From OE-Core rev: e288686e97de1265eeeaf452141e1473867efb1b) (From OE-Core rev: a4dfcb15ee2c1349718425eef333f3bc84c2de41) Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 4eb7bbcc2f08b25387a15b7e4a89ef199783c973) Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* parselogs: Ignore xf86OpenConsole errorPavel Zhukov2022-09-031-0/+1
| | | | | | | | | | | | | | | | | | | [Yocto #13854] If VT argument was not specified Xorg server tries to bind to VT1, then VT2 and so on. In some cases (runqemu with nographics or serial options for example) VT1 can be taken by systemd getty service which generates error message. Do not fail on this message if Xorg is running. (covered by test_xorg_running test) (From OE-Core rev: 60b55c1dde6f185ed0ae66d4168b293e32971a66) Signed-off-by: Pavel Zhukov <pavel@zhukoff.net> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit d047f493e0c7f341dd307a4d8dd0db08a22824f1) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfspostcommands.py: Cleanup subid backup files generated by shadow-utilsAndrei Gherzan2022-09-031-0/+7
| | | | | | | | | | | | | | | When creating users, shadow-utils might create backup files for subordinate ID files (subid, subgid). Make sure we clean them up similarly to the other backup files shadow-utils creates. This is a backport from master that brings in only the cleanup of the subid backup files without the code restructure. (From OE-Core rev: 84b2e9a6c17278cbcc08020aa78759004a7b60bf) Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com> Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/gotoolchain: set CGO_ENABLED=1Ross Burton2022-08-311-0/+1
| | | | | | | | | | | | | | | | | | | In cross-compiles CGO_ENABLED=1 needs to be set explicitly, as otherwise Go refuses to use it even if CC is already set. This fixes the selftest on setups where the host and the SDK target don't have matching architectures. [ YOCTO #14859 ] (From OE-Core rev: 19be072619d39267df44f23c4c8b64f3808f6148) (From OE-Core rev: ebdc76b3c29fd4915bee39026f780172fdf8fa1a) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/gotoolchain: put writable files in the Go module cacheRoss Burton2022-08-311-6/+1
| | | | | | | | | | | | | | | By default 'go mod' creates read-only files, but that just complicates things. Add -modcacherw to make the cache read/write, so it can be cleaned up without needing to chmod. (From OE-Core rev: 7ff30e0d9fe8527cbc2f8ca84e0300fdc84663b6) (From OE-Core rev: 3527149662d483ea9c80a649d6953f4ba1e44224) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest: rename git.py to intercept.pyRoss Burton2022-08-312-3/+3
| | | | | | | | | | | | | | | | By naming this test class git.py, any attempt to import GitPython (as needed by oelib.buildhistory) failed. As this class exercises the intercepts, rename it to intercept.py. (From OE-Core rev: d557cbbf86767bc2ebf2beb3d70af3b3ca5e0529) (From OE-Core rev: b4ec76c699f8d20de7d6d2b51b062d8ec41e2486) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/qemurunner: add run_serial() commentRoss Burton2022-08-311-0/+2
| | | | | | | | | | | | Add a comment explaining the non-obvious return codes. (From OE-Core rev: cdf3a1a20f02f43451f86a321c001e6b049a4ffc) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 6572baffa02ba6b8a686490d55af17cacb528920) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/parselogs: add qemuarmv5 arm-charlcd maskingJon Mason2022-08-311-0/+1
| | | | | | | | | | | | | | | | On qemuarmv5, arm-charlcd is logging an error because the device isn't present on the virtual machine. Mask it off, as that device could be present on the physical hardware (and we want to use the same kernel config as the real hardware). (From OE-Core rev: 752667a50f81fa6aeb1312667b6c0efe883f8564) Signed-off-by: Jon Mason <jdmason@kudzu.us> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit c03c33a4032f995a288f7287e79f43fcd3140aa1) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cve-check: Don't use f-stringsErnst Sjöstrand2022-08-281-1/+1
| | | | | | | | | | | | | | Since we're keeping cve-check aligned between the active branches, and dunfell is supported on Python 3.5, we can't use f-strings. (From OE-Core rev: 057a6f826bd45ebf240df47f0baf7c8027f5711c) Signed-off-by: Ernst Sjöstrand <ernstp@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 1821cf7464cbba521b55a9c128fe8812c0cc5eca) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/wic: Tweak test case to not depend on kernel sizeRichard Purdie2022-08-231-1/+1
| | | | | | | | | | | | | The current test assumes the kernel size leaves a certain amount of whitespace in the output. Improve this constraint so a slightly larger kernel doesn't fail the test. (From OE-Core rev: a894fda2d0083d4aba80652946dec2c8f04f65f2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit bd60c44bef4a1b5d3c8fe77a9e6d3a8f43b0dea4) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>