summaryrefslogtreecommitdiffstats
path: root/scripts
Commit message (Collapse)AuthorAgeFilesLines
* runqemu-ifup: remove uid parameterAdrian Freihofer2023-06-241-5/+8
| | | | | | | | | | | ip tuntap does not need the uid, it was an unused variable/parameter. Backward compatibility should be fine. (From OE-Core rev: 9ccbabc06d02addd429a21dbe15a1a42738c58d6) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rpm2cpio.sh: update to the last 4.x versionAlberto Planas2023-06-211-10/+20
| | | | | | | | | | | | | | | openSUSE RPMs are compressing the RPM payload using zstd, that correspond to the magic ID 0x28, 0xb5, 0x2f. This patch update the script to the last version from the rpm project, and add support to this compression format, and extract the cpio payload using the "unzstd" binary. (From OE-Core rev: 3aba44a75dd565b192f7328f2a0150a313de3cc1) Signed-off-by: Alberto Planas <aplanas@suse.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runqemu: Stop passing bindir to the runqemu-ifup callAlejandro Hernandez Samaniego2023-06-211-1/+1
| | | | | | | | | | | | | | | | | | Since https://git.yoctoproject.org/poky/commit/?id=51063c1e6ac we need to pass exactly 2 arguments to runqemu-ifup, otherwise the script will return an error since bindir is no longer being used. However the call to runqemu-ifup from runqemu is still passing bindir as an argument resulting in the error mentioned above, remove the bindir argument to fix this issue. [YOCTO #15150] (From OE-Core rev: b9ef82727e719389b6d8ca2e9f642bfb328219b7) Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandro@enedino.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/runqemu-ifup: Fix 10 or more tap devicesRichard Purdie2023-06-191-1/+1
| | | | | | | | | | The use of sort means that tap10 and tap1 don't sort correctly. Tweak the shell expression to correctly handle numbers of tap devices of 10 or more. (From OE-Core rev: 4c6d0f3ddbb76bde7f35edeb280fe56a9a00f91b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/runqemu-ifup: Fix extra parameter issueRichard Purdie2023-06-191-2/+2
| | | | | | | | | The third parameter was dropped in a previous commit but changes were not made to the argument checks. Fix this. (From OE-Core rev: 5d4818e836747a83f55bad8a00a9d3cd6e80c5dc) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runqemu-gen-tapdevs: fix missing variable quoteTrevor Gamblin2023-06-191-1/+1
| | | | | | | | | | | | Commit d43c41fcaf061eaf8bff7bc03de19cdc80226796 refactors the script but there's a missing '"' in one line, leading to the following message: poky/scripts/runqemu-gen-tapdevs: command substitution: line 62: unexpected EOF while looking for matching `"' (From OE-Core rev: 94b9b1333a5f779316b9698bb3e4fa7246bae78e) Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runqemu-if*: Rename confusing variable nameRichard Purdie2023-06-162-14/+14
| | | | | | | | | | The IFCONFIG variable is really the path to ip and hasn't been ifconfig for a long time. Rename the variable to something less confusing. (From OE-Core rev: eb1c947a056f3e2c80e46e5e606423e85da46caa) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runqemu/qemu-helper: Drop tunctlRichard Purdie2023-06-163-53/+11
| | | | | | | | | | | ip tuntap provides the functionality that we obtained from tunctl. We only needed tunctl when ifconfig was more available than ip. That isn't the case now so we can drop tunctl and all the hoops we need to jump through to build and provide it. (From OE-Core rev: 2abfbca690ff00cb58ce08a65cde006578ee3de9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: Fix the wrong variable in srcuri_entryCharlie Wu2023-06-151-1/+1
| | | | | | | | | | | | | | | | | | | | devtool crashes when running "update-recipe" and append changes on the recipe. "$ devtool update-recipe -a <layer> <recipe>" Traceback (most recent call last): ... File "/ovss/ovss_quanta/poky/scripts/lib/devtool/standard.py", line 1636, in srcuri_entry return 'file://%s%s' % (basepath, paramstr) ^^^^^^^^ NameError: cannot access free variable 'basepath' where it is not associated with a value in enclosing scope The input variable 'fname' should have the same meaning as the variable 'basepath'. Modify the 'fname' to 'basepath' and solve the issue. (From OE-Core rev: c3231756bbc2cb5641204414ad3670d7f8607ed3) Signed-off-by: Charlie Wu <chiachiwu@google.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/runqemu: allocate unfsd ports in a way that doesn't race or clash ↵Alexander Kanavin2023-06-151-11/+8
| | | | | | | | | | | | | | | | | | with unrelated processes There is already a neat check_free_port() function for finding an available port atomically, so use that and make two additional tweaks: - no need to allocate two separate ports; per unfsd documentation they can be the same - move lockfile release until after unfsd has been shut down and the port(s) used has been freed [YOCTO #15077] (From OE-Core rev: dee96e82fb04ea99ecd6c25513c7bd368df3bd37) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/runqemu: split lock dir creation into a reusable functionAlexander Kanavin2023-06-151-16/+13
| | | | | | | (From OE-Core rev: 004d6bcb067ecf1d796801fa43a98820c4efd3c7) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runqemu-ifupdown/get-tapdevs: Add support for ip tuntapJörg Sommer2023-06-133-27/+44
| | | | | | | | | | | | | | | The *ip* command supports the creation and destruction of TAP devices since 2009 and might be more likely installed on systems then *tunctl*. Therefore it should be tried to setup or teardown the TAP interface with *ip* before falling back to *tunctl*. https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?id=580fbd88f75cc9eea0d28a48c025b090eb9419a7 (From OE-Core rev: 424ede206baae1c228583aab1df6c18513ac104f) Signed-off-by: Jörg Sommer <joerg.sommer@navimatix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runqemu-gen-tapdevs: RefactoringJörg Sommer2023-06-131-39/+36
| | | | | | | | | | | | The changes are mostly about early exit which causes indentation changes; check with `git diff -w`. Another change is the check for ip by simply calling it and deciding upon the exit code, if it's fine or not. (From OE-Core rev: 351577761d0712a005eda9dde9215558ca9a1fe9) Signed-off-by: Jörg Sommer <joerg.sommer@navimatix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: introduce KCONFIG_CONFIG_ENABLE_MENUCONFIGMing Liu2023-06-091-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, uboot do_menuconfig task is breaking when UBOOT_CONFIG is chosen rather than UBOOT_MACHINE, it simply fails with the following errors: | make: *** No rule to make target 'menuconfig'. Stio. | Command failed. | Press any key to continue... this is due to the work directory of do_menuconfig is set to ${B} but not ${B}/$config. We should distinguish two situations: 1) When there is only one config item in UBOOT_CONFIG, do_menuconfig should work just like how it works for UBOOT_MACHINE. 2) When there are multiple config items in UBOOT_CONFIG, do_menuconfig should print out some information saying it's not supported other than just failing. This patch mainly aims to fix that by introducing a extra variable KCONFIG_CONFIG_ENABLE_MENUCONFIG, it would be set to 'false' for situation 2), and when it's set to 'true', then set KCONFIG_CONFIG_ROOTDIR correctly in uboot-config.bbclass to let do_menuconfig task work. DEVTOOL_DISABLE_MENUCONFIG could be replaced by this new variable KCONFIG_CONFIG_ENABLE_MENUCONFIG. (From OE-Core rev: f9e834e317880cf47dbb4f8285bc36d743beae5e) Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types: Fix reproducible builds for initramfs and UKI imgFrieder Paape2023-06-061-0/+2
| | | | | | | | | | | | | | | | | | | I've encountered issues reproducing initramfs and UKI image builds, which will be fixed with this patch. 1. initramfs There's a symbolic link to /sbin/init, which is appended to the cpio archive after creation. The links timestamp needs to be static and the cpio append command needs the '--reproducible' flag to produce deterministic outcomes. 2. Unified Kernel Image '--preserve-dates' is required for a static 'Time/Date' entry. I've added '--enable-deterministic-archives' although in my case this didn't change anything. (From OE-Core rev: fd027729bafb4e085ba0949e38e724f3a8cad102) Signed-off-by: Frieder Paape <frieder@konvera.io> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pybootchartgui: show elapsed time for each taskMauro Queiros2023-05-311-0/+5
| | | | | | | | | | | | | | | Currently, finding the elapsed time of each task in buildtimes.svg is a manual effort of checking the top axis and finding and subtracting the end and start time of the task. This change adds the elapsed time for each task, so that manual effort of comparing start/end time is avoided. (From OE-Core rev: 3efebd3404de548f0757863da237f2d18ce60013) Signed-off-by: Mauro Queiros <Mauro.Queiros@criticaltechworks.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Add argument --hidden to default imagerLeon Anavi2023-05-253-0/+9
| | | | | | | | | | | | | | | | | | | Add argument --hidden to avoid MS Windows prompting to format partition after flashing to a USB stick, SD card on another media. Set Bit 0 (RequiredPartition) to mark that the partition is required for the platform to function on GUID Partition Table (GPT). The new argument simplifies setting RequiredPartition on GPT through a WKS file and the default imager plugin. Otherwise, without this feature, to achieve the same result a new imager plugin has to be implemented and set in WIC_CREATE_EXTRA_ARGS. (From OE-Core rev: 7a111ff58d7390b79e2e63c8059f6c25f40f8977) Signed-off-by: Leon Anavi <leon.anavi@konsulko.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-buildenv-internal: remove path from previous projectChen Qi2023-05-221-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Util now, only paths added for current project are removed to avoid PATH growing unnecessarily. This is to handle the case of sourcing the init script into different build directories. However, if we source the init script from different projects into different build directories, the paths added by previous projects are not cleaned up. To avoid this, we record the paths added into OE_ADDED_PATHS, and remove it in the next sourcing. The OE_ADDED_PATHS variable is exported mainly for the two reasons: 1. users can clearly see it in the `env' command's output. 2. if the prefixed PATH is carried into the subprocess (e.g., a subshell), so should this OE_ADDED_PATHS variable that prefixes it. Note that the paths, "$OEROOT/scripts:$BITBAKEDIR/bin:", are added as a whole. A previous commit, "oe-buildenv-internal: Add paths to $PATH individually", made the change to treat these two paths separately, the reason was not "assuming the path to the scripts directory always is in $PATH directly before the bitbake directory". But this is exactly the effect of the codes. I see no reason why we should complicate things. (From OE-Core rev: 3405a3221b8f6641a8e42b04bc7acd6e032aeab8) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts: fix buildstats diff/summary hard bound to host python3Paul Gortmaker2023-05-052-2/+2
| | | | | | | | | | | Somehow these two got left behind and hence on older hosts that are using buildtools for a newer python - they will still fail. (From OE-Core rev: f1b11b83a6dd991f393940741c930691463e6d53) Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: add support for proper kernel name to bootimg-pcbiosSergei Zhmylev2023-05-041-3/+3
| | | | | | | | | | Use appropriate kernel image name instead of hard-coded vmlinuz for bootimg-pcbios plugin. (From OE-Core rev: 8d9f00ba456fe76e0f4ef0e68ec64fc538c90d89) Signed-off-by: Sergei Zhmylev <s.zhmylev@yadro.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic/bootimg-efi: if fixed-size is set then use that for mkdosfsRandolph Sapp2023-04-271-0/+7
| | | | | | | | | | | | | | | This is a bit of a compatibility issue more than anything. Some devices get upset if the FAT file system contains less blocks than the partition. The fixed-size argument is currently respected by the partition creation step but not by the file system creation step. Let's make it so the file system respects this value as well. (From OE-Core rev: 38e1a235f5eceade7c871f96dc97f6c384384c7b) Signed-off-by: Randolph Sapp <rs@ti.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/runqemu: Add possibility to disable networkPavel Zhukov2023-04-201-1/+6
| | | | | | | | | | | | | | | Default network configuration requires tun/tap module and while being usable it conflicts with tap devices created by VPN clients sometimes and requires root permissions to use . While it's possible to work this around it's not always feasible if network is not required Add nonetwork option which can be specified if the network connectivity is not needed and SDL/serial is enough to communicate with the image. (From OE-Core rev: d4073dedbb234ff3c6bbebafc836fedf90d96569) Signed-off-by: Pavel Zhukov <pazhukov@suse.de> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/rpm2cpio.sh: Use bzip2 instead of bunzip2Pavel Zhukov2023-04-201-1/+1
| | | | | | | | | | | | bzip2 is in HOSTTOOLS already and used in few other places already. This fixes bin_package class for RPM packages without adding bunzip2 to HOSTTOOLS. (From OE-Core rev: eb3ec7469fff857c819332371ad1d586f43c79c3) 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>
* wic: use part_name when definedDit Kozmaj2023-04-131-10/+4
| | | | | | | | | | | | | | | So far part.label has been used to define GPT partition label even if part.part_name was defined. Fix the code to use part.part_name whenever available, as it makes sense to have a GPT partition label which is different from the contained filesystem label. (From OE-Core rev: 7704d5fc36eb065224792bf4d5543814eaa5fed3) Signed-off-by: Dit Kozmaj <dit.kozmaj@kynetics.com> Signed-off-by: Diego Rondini <diego.rondini@kynetics.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runqemu: respect IMAGE_LINK_NAMEMartin Jansa2023-04-041-18/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | * when searching for qemuboot.conf * don't assume that IMAGE_LINK_NAME is always <rootfs>-<machine> (with <rootfs>-<machine>.qemuboot.conf) * runqemu: use IMAGE_LINK_NAME set by testimage.bbclass or query with bitbake -e * testimage.bbclass was setting DEPLOY_DIR which I don't see used anywhere else, so I assume it was supposed to be DEPLOY_DIR_IMAGE as mentioned in corresponding runqemu code, do the same with IMAGE_LINK_NAME variable * add virtual/kernel as bitbake -e target in run_bitbake_env to make sure IMAGE_LINK_NAME is defined (kernel-artifact-names.bbclass inherits image-artifact-names.bbclass as well) * improve .qemuboot.conf search 1st search for file matching the rootfs and only when not found try again with .rootfs suffix removed [YOCTO #12937] (From OE-Core rev: 716eb55bb963db7b02d985849cb025898aabc855) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Revert "runqemu: Add workaround for APIC hang on pre 4.15 kernels on qemux86"Khem Raj2023-03-301-5/+0
| | | | | | | | | | | | | | | | This reverts commit 82e67b82ea8e12aa0b7b9db1d84fec0436dec71b. It was commited as part of https://bugzilla.yoctoproject.org/show_bug.cgi?id=12301 for kernels < 4.15, as of now oldest builder kernel we have is 4.15 on ubuntu 18.04 so we should not require this workaround. Moreover, this fixes an smp problem with qemux86 where no matter what -smp <x> option is used, qemu always starts with single core. (From OE-Core rev: fa8a7c0608fc800c48d0ff1cd832ad63c51eeab1) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildstats-summary: add an option to disable boldJose Quaresma2023-03-281-2/+2
| | | | | | | | (From OE-Core rev: b9a0ceebe9aa1e79d97508e7ab2fc39ca7c6637f) 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>
* filemap.py: enforce maximum of 4kb block sizeAndrew Geissler2023-03-271-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | The logic in this script validates that the length of data sections are evenly divisible by the block size. On most systems the block size is 4KB and all is good. Some systems though, such as ppc64le, have a block size larger then 4KB. For example on a POWER9 based ppc64le system, the block size is 64KB. This results in this script failing with errors like this when building wic images: |440, in _do_get_mapped_ranges | assert extent_len % self.block_size == 0 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | AssertionError In this case the data section size was 268KB and the block size was 64KB, resulting in the above assert failure. Resolves https://bugzilla.yoctoproject.org/show_bug.cgi?id=15075 (From OE-Core rev: 1e23b803af6991fc20e4a4e88a0ef0541399e722) Signed-off-by: Andrew Geissler <geissonator@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/yocto_testresults_query.py: fix regression reports for branches with ↵Alexis Lothoré2023-03-251-1/+1
| | | | | | | | | | | | | | | slashes Regression reports are not generated on some integration branches because yocto_testresults_query.py truncates branches names with slashes when it passes it to resulttool. For example, "abelloni/master-next" is truncated to "abelloni" Fix this unwanted branch truncation by fix tag parsing in yocto-testresults (From OE-Core rev: b2fb7d7b0c05bb198a2271bbf1742645ba220ea3) Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runqemu: Fix TypeError when command failsJoshua Watt2023-03-251-5/+5
| | | | | | | | | | | | | | | | | | The commands passed to subprocess are tuples which when passed to a % format are treated as multiple format arguments instead of a single argument to be coerced by "%s". This results in a TypeError being raised with python claiming that not all arguments were consumed. Fix this by wrapping the command tuple in a str() call, as is done for the logging strings [YOCTO #15078] (From OE-Core rev: 3e5d04d9ebbee4e11fb39bf353b6d4c3133e166a) 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>
* scripts/lib/buildstats: handle top-level build_stats not being completeRoss Burton2023-03-251-0/+1
| | | | | | | | | | | | | | | | If we try to parse a buildstats directory which was either aborted or is still being built then the top-level build_stats file doesn't contain an elapsed value which causes an exception: UnboundLocalError: local variable 'elapsed' referenced before assignment Default both start and elapsed to 0 so that the parse succeeds. (From OE-Core rev: 701d985aa8f2e9c2b9c0736fa25b424f3701889e) 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>
* scripts: add buildstats-summaryRoss Burton2023-03-231-0/+126
| | | | | | | | | | | | This script will write a summary of the buildstats to the terminal, sorted by start time or duration, optionally hiding short tasks, and highlighting long running tasks. (From OE-Core rev: 253d2c0eb048ea38822844ebb69ad76d55b5c3ef) 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>
* Do not remove the -m option for loongarch64Jialing Zhang2023-03-231-1/+1
| | | | | | | | | (From OE-Core rev: 6f3583675d31b74a3ae1c7fae450ea1624acc2e7) Signed-off-by: Jialing Zhang <zhangjialing@loongson.cn> Signed-off-by: Qizheng Zhu <zhuqizheng@loongson.cn> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runqemu: direct mesa to use its own drivers, rather than ones provided by ↵Alexander Kanavin2023-03-221-24/+10
| | | | | | | | | | | | | | | | | host distro With mesa 23.0, it is not longer possible to use the host drivers, as mesa upstream has added strict checks for matching builds between drivers and libraries that load them. Add a check and a hint to runqemu so that there is a helpful error when there is no native/nativesdk opengl/virgl support. (From OE-Core rev: f0946844df7270fe368858d8929e6b380675b78b) 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>
* runqemu: get_first_file() rename cmd* to glob*Martin Jansa2023-03-221-18/+18
| | | | | | | | | | | | | | | | | | * to better indicate how it's used in get_first_file * cmd* is used in other places for actual shell commands to execute * RunQemuError('KERNEL not found: %s, %s or %s' % cmds) also looked weird to me, but that works (to my python-noob surprise) [YOCTO #12937] (From OE-Core rev: 7c26e9dcc999a7d6a365831c39d25d98890be6d0) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* resulttool: Improve overlapping ptest result reportingRichard Purdie2023-03-161-5/+3
| | | | | | | | | | With the move to a ptest per image, the multiple ptest log scenario is much more likely. Tweak the handling to only warn if there are overlapping files. (From OE-Core rev: 8391f1668fcbe932ba846299b0ec22de09e06dd4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pybootchart: Fix extents handling to account for cpu/io/mem pressure changesRichard Purdie2023-03-161-0/+6
| | | | | | | | | The previous addition of pressure values to the chart didn't fix the extents function which meant the bottom of the chart was cut off. Fix that. (From OE-Core rev: cc8cef69e717e08f80d10f775f0fffc644267b59) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pybootchartui: Fix python syntax issueRichard Purdie2023-03-161-1/+1
| | | | | | | | | | | Fix: scripts/pybootchartgui/pybootchartgui/parsing.py:134: SyntaxWarning: "is" with a literal. Did you mean "=="? if pid is 0: (From OE-Core rev: c9a6511ae618035b8efad01646e37ba28ce1e3f8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/combo-layer: Fix python deprecation warningRichard Purdie2023-03-141-3/+3
| | | | | | | | | | | Address: DeprecationWarning: 'pipes' is deprecated and slated for removal in Python 3.13 pipes.quote is an alias for shlex.quote so switch to that. (From OE-Core rev: 7b1c1dd9985a6f1645271a928dda7f1897a7ba8a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* resulttool: add log --list-ptestRoss Burton2023-03-141-0/+5
| | | | | | | | | | Add a convenience argument to the log subcommand to list all of the ptest logs in a testresults file. (From OE-Core rev: cd2d7adf02005d46f19c93a40db1e10ce01ac261) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/resulttool: fix typo breaking resulttool log --ptestRoss Burton2023-03-141-1/+1
| | | | | | | | | | ptestresult_get_log() looked for a key called 'ptestresuls.sections', which should be 'ptestresult.sections' (From OE-Core rev: 7c8c9f7283e54bf8b1521fbaad7dceb66a8fcdbb) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runqemu: add an option to enable guest-agent virtio deviceClément Péron2023-03-141-0/+14
| | | | | | | | | | | | Add support to the runqemu script for a new option, 'guestagent', that enables the virtio serial port for host-to-guest communication. (From OE-Core rev: 21a1e52079089c5bbeee8ffc9c504471f4a8732a) Signed-off-by: Brenda Streiff <brenda.streiff@ni.com> Signed-off-by: Clément Péron <peron.clem@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool/upgrade: do not delete the workspace/recipes directoryAlexander Kanavin2023-03-141-3/+0
| | | | | | | | | | | If it exists, there is no need to delete it, and if it does not, devtool prints an ugly traceback. (From OE-Core rev: af82e59e8f08369aabd5fa6eb43022982d4e59a7) 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>
* scripts/yocto_testresults_query.py: set proper branches when using resulttoolAlexis Lothoré2023-03-121-6/+15
| | | | | | | | | | | | | | | | | | | | | | | The script currently only works if base and target can be found on default branches. It breaks if we try to generate a regression report between revisions that live on different branches (as needed on integration and testing branches). For example, the following command: ./scripts/yocto_testresults_query.py regression-report yocto-4.0.6 yocto-4.0.7 ends with the follwing error: [...] ERROR: Only 1 tester revisions found, unable to generate report [...] Read branches from tags names in test results repository, and pass those branches to resulttool when generating the report (From OE-Core rev: 6c472b326bcc718459483cc29b310b884742df86) Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/resulttool: do not count newly passing tests as regressionsAlexis Lothoré2023-03-121-5/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | resulttool regression module simply compare a base test status to a target test result status. This approach raises many false positives since all XXX -> PASS transitions (XXX being any status different from PASS) are flagged as regression. - Do not list XXX -> PASS transitions in regression report, instead count them and print a summary of "newly passing tests" - If an inspected pair has only "newly passing tests", do not print detailed list and print it as "Improvement" instead of "Regression" Updated output example looks like the following: [...] Improvement: oeselftest_fedora-37_qemux86-64_20230127010225 oeselftest_ubuntu-22.04_qemux86-64_20230226120516 (+1 test(s) passing) [...] Match: oeselftest_almalinux-8.7_qemuarm64_20230127015830 oeselftest_almalinux-8.7_qemuarm64_20230227015258 [...] Regression: oeselftest_almalinux-9.1_qemumips_20230127000217 oeselftest_opensuseleap-15.4_qemumips_20230226130046 ptestresult.glibc-user.debug/tst-read-chk-cancel: PASS -> None ptestresult.glibc-user.nptl/tst-mutexpi4: PASS -> FAIL ptestresult.glibc-user.nptl/tst-mutexpi5a: PASS -> FAIL Additionally, 44 previously failing test(s) is/are now passing (From OE-Core rev: c335f96f687c73fde443ac330ca3e17113794d9e) Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/resulttool: fix ptests results containing a non reproducible pathAlexis Lothoré2023-03-121-0/+6
| | | | | | | | | | | | | | | | | | | | | | Some ptests results may be wrongly sampled, resulting in some part of the error being propagated in test name. For example: "ptestresult.binutils-ld.in testcase /home/pokybuild/yocto-worker/qemumips/build/build-st-1666126/tmp/work/mips32r2-poky-linux/binutils-cross-testsuite/2.40-r0/git/ld/testsuite/ld-ctf/ctf.exp" "ptestresult.gcc.Couldn't create remote directory /tmp/runtest.455781 on ssh" "ptestresult.gcc-libstdc++-v3.Couldn't create remote directory /tmp/runtest.3814266 on target" While the root errors must be fixed in corresponding ptests packages for those tests, the test results history must still be usable even with this issue Add new filters to detect if temporary test directories (build-st-*, /tmp/runtime.*) are present in name. If so, truncate test name. As a side effect, it will aggregate multiple failing errors into one, but the regression will still be raised (From OE-Core rev: 601eecfddd26bfe2954835a73ed1116bb520235f) Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/resulttool: call fixup_ptest_names in regression_commonAlexis Lothoré2023-03-121-21/+20
| | | | | | | | | | | | | ptests names not only need to be fixed for regression based on git testresults but also for testsresults provided "manually" Move ptests naming fixup in regression_common to share the fixup between both regression use cases (From OE-Core rev: f772ccd108dc3d618db9d479d672c0f3edd203ca) Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* manpages: use an intercept to run mandbRoss Burton2023-03-081-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you build an image with lots of manpages in, then each package will run mandb inside qemu-user at rootfs time. This is a slow operation and should be done once when all of the packages have installed using an intercept instead. The call to mandb has been changed too. mandb doesn't actually allow the configuration file to be read from stdin so that was being ignored, instead write the file to a temporary file and use that. This means we then don't need to tell it where to search explicitly, and it writes the indexes to the correct paths so we don't need to move files afterwards either. Sadly we do still need to run mandb inside qemu-user, as the underlying database is a gdbm file and they are byte-order dependent. For my test case of core-image-base with api-documentation DISTRO_FEATURES and doc-pkgs IMAGE_FEATURES enabled, the performance gain is significant: core-image-base do_rootfs -1303.1s -73.6% 1771.6s -> 468.5s (From OE-Core rev: fbd8a57aa307bfda70a08cb78af3c97f05c39a3a) 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>
* scripts/yoct_testresults_query: manage base/target revision not foundAlexis Lothoré2023-02-281-3/+12
| | | | | | | | | | | | If yocto_testresults_query.py is run from oe-core instead of poky, the script will very likely fail since poky tags do no exist in oe-core. If one or both revisions are not found, log the error and a suggestion about the reason (the script being run in oe-core instead of poky) (From OE-Core rev: 758ac050ffd91524d400c196865b1ed27ece8776) 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-0/+10
| | | | | | | | | | | | | | | | | | 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>