aboutsummaryrefslogtreecommitdiff
path: root/test/py
Commit message (Collapse)AuthorAgeFilesLines
* Merge patch series "net fixes prior lwip"Tom Rini2024-01-111-0/+2
|\ | | | | | | | | | | Maxim Uvarov <maxim.uvarov@linaro.org> says: Add small net fixes prior lwip patches.
| * test_net: print out net listMaxim Uvarov2024-01-111-0/+2
| | | | | | | | | | | | | | Printing net list is useful in CI log files. Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
| * test/py: Disable error E0611 in two cases for pylintTom Rini2023-12-092-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recently pylint has started to complain about: No name 'fs_helper' in module 'tests' (no-name-in-module) Due to: from tests import fs_helper However, we have: test/py/tests/fs_helper.py And since we do not want to add a dummy test/py/tests/__init__.py to silence this warning we instead just disable it as needed. Cc: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
* | test: hush: Test hush variable expansionFrancis Laniel2023-12-281-1/+7
| | | | | | | | | | | | | | Verifies shell variables are replaced by their values. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Francis Laniel <francis.laniel@amarulasolutions.com>
* | test/py: hush_if_test: Remove the test fileFrancis Laniel2023-12-281-197/+0
| | | | | | | | | | | | | | | | 5804ebfeb1ce ("test: hush: Test hush if/else") translated this test to a C test, so this python file is no more needed. Signed-off-by: Francis Laniel <francis.laniel@amarulasolutions.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | bootm: Fix flags used for bootargs string substitutionPiotr Kubik2023-12-201-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 51bb33846ad2 ("bootm: Support string substitution in bootargs") introduced a feature of bootargs string substitution and changed a flag used in bootm_process_cmdline_env() call to be either true or false. With this flag value, condition in bootm_process_cmdline() `if (flags & BOOTM_CL_SUBST)` is never true and process_subst() is never called. Add a simple test to verify if substitution works OK. Signed-off-by: Piotr Kubik <piotr.kubik@iopsys.eu> Reviewed-by: Simon Glass <sjg@chromium.org>
* | test: vboot: Using variable 'old_dtb' before assignmentHeinrich Schuchardt2023-12-131-3/+3
| | | | | | | | | | | | | | | | | | | | old_dtb can only be assumed initialized in the finally block if it is assigned a value before the try statement. Avoid a pylint error reported by current pylint. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | test: fit: Using variable 'old_dtb' before assignmentHeinrich Schuchardt2023-12-131-3/+3
| | | | | | | | | | | | | | | | | | | | old_dtb can only be assumed initialized in the finally block if it is assigned a value before the try statement. Avoid a pylint error reported by current pylint. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | test/py: Disable error E0611 in two cases for pylintTom Rini2023-12-092-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recently pylint has started to complain about: No name 'fs_helper' in module 'tests' (no-name-in-module) Due to: from tests import fs_helper However, we have: test/py/tests/fs_helper.py And since we do not want to add a dummy test/py/tests/__init__.py to silence this warning we instead just disable it as needed. Cc: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
* | test/py: net: Add a TFTP put testLove Kumar2023-11-291-0/+71
| | | | | | | | | | | | | | | | Execute tftpput command for uploading files to a server and validate its size & CRC32. Signed-off-by: Love Kumar <love.kumar@amd.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* | Merge patch series "fs: fat: calculate FAT type based on cluster count"Tom Rini2023-11-283-7/+82
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To quote the author: This series fixes an issue where the FAT type (FAT12, FAT16) is not correctly detected, e.g. when the BPB field BS_FilSysType contains the valid value "FAT ". This issue occures, for example, if a partition is formatted by swupdate using its diskformat handler. swupdate uses the FAT library from http://elm-chan.org/fsw/ff/ internally. See https://groups.google.com/g/swupdate/c/7Yc3NupjXx8 for a discussion in the swupdate mailing list. Please refer to the commit messages for more details. 1. Added bootsector checks Most tests from https://www.win.tue.nl/~aeb/linux/fs/fat/fat-2.html are added in the commit 'fs: fat: add bootsector validity check'. Only the tests VIII, IX and X are not implemented. I also checked the Linux kernel code (v6.6) and did not find any checks on 'vistart->fs_type'. This is the reason why is skipped them here. See section '2. Size comparisons' for the impact on the binary size. 2. Size comparisons I executed bloat-o-meter from the Linux kernel for an arm64 target (config xilinx_zynqmp_mini_emmc0_defconfig): Comparison of the binary spl/u-boot-spl between master (rev e17d174773e9ba9447596708e702b7382e47a6cf) and this patch series (including the added validity checks of the boot sector): add/remove: 0/0 grow/shrink: 1/1 up/down: 100/-12 (88) Function old new delta read_bootsectandvi 308 408 +100 fat_itr_root 444 432 -12 Total: Before=67977, After=68065, chg +0.13% When compare the size of the binary spl/u-boot-spl between master this series without the the validity checks of the boot sector: add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-24 (-24) Function old new delta read_bootsectandvi 308 296 -12 fat_itr_root 444 432 -12 Total: Before=67977, After=67953, chg -0.04% So the size of the spl on this arm64 target increases by 88 bytes for this series. When i remove the validity check the size decreases by 24 bytes.
| * | test: fs: Add test to detect fat typeChristian Taedcke2023-11-282-0/+72
| | | | | | | | | | | | | | | | | | | | | Ensure that a large FAT12 filesystem and a small FAT16 filesystem are detected correctly. Signed-off-by: Christian Taedcke <christian.taedcke@weidmueller.com>
| * | test: Add size granularity parameter to mk_fsChristian Taedcke2023-11-281-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Without this commit it is only possible to create filesystem images with a size granularity of 1MB. This commit adds the option to create file systems with different sizes, e.g 8.5MB. Signed-off-by: Christian Taedcke <christian.taedcke@weidmueller.com>
| * | test: fs: Add fat12 to supported fs of some testsChristian Taedcke2023-11-281-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | The tests fs_ext, fs_mkdir and fs_unlink support fat12 without modifications. The fs_basic test uses a partition that is too large for fat12, so it is omitted here. Signed-off-by: Christian Taedcke <christian.taedcke@weidmueller.com>
| * | test: Add support to create a fat12 fsChristian Taedcke2023-11-281-1/+3
| |/ | | | | | | | | | | This enables to implement tests for fat12 filesystem. Signed-off-by: Christian Taedcke <christian.taedcke@weidmueller.com>
* | efi_loader: Boot var automatic managementRaymond Mao2023-11-185-35/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes for complying to EFI spec §3.5.1.1 'Removable Media Boot Behavior'. Boot variables can be automatically generated during a removable media is probed. At the same time, unused boot variables will be detected and removed. Please note that currently the function 'efi_disk_remove' has no ability to distinguish below two scenarios a) Unplugging of a removable media under U-Boot b) U-Boot exiting and booting an OS Thus currently the boot variables management is not added into 'efi_disk_remove' to avoid boot options being added/erased repeatedly under scenario b) during power cycles See TODO comments under function 'efi_disk_remove' for more details The original efi_secboot tests expect that BootOrder EFI variable is not defined. With this commit, the BootOrder EFI variable is automatically added when the disk is detected. The original efi_secboot tests end up with unexpected failure. The efi_secboot tests need to be modified to explicitly set the BootOrder EFI variable. squashfs and erofs ls tests are also affected by this modification, need to clear the previous state before squashfs ls test starts. Co-developed-by: Masahisa Kojima <masahisa.kojima@linaro.org> Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Signed-off-by: Raymond Mao <raymond.mao@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Joao Marcos Costa <jmcosta944@gmail.com> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
* | CI, pytest: Add a test for sandbox without LTOTom Rini2023-11-071-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | The primary motivation for having a sandbox without LTO build in CI is to ensure that we don't have that option break. We now have the ability to run tests of specific options being enabled/disabled, so drop the parts of CI that build and test that configuration specifically and add a build test instead. We still test that "NO_LTO=1" rather than editing the config file works via the ftrace tests. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
* | sandbox: Add a test for disabling CONFIG_CMDLINESimon Glass2023-11-071-0/+20
|/ | | | | | | | Now that everything is working, add a test to make sure that this builds correctly. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* Merge tag 'tpm-next-27102023' of ↵Tom Rini2023-10-271-10/+10
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://source.denx.de/u-boot/custodians/u-boot-tpm bootX measurements and measurement API moved to u-boot core: Up to now, U-Boot could perform measurements and EventLog creation as described by the TCG spec when booting via EFI. The EFI code was residing in lib/efi_loader/efi_tcg2.c and contained both EFI specific code + the API needed to access the TPM, extend PCRs and create an EventLog. The non-EFI part proved modular enough and moving it around to the TPM subsystem was straightforward. With that in place we can have a common API for measuring binaries regardless of the boot command, EFI or boot(m|i|z), and contructing an EventLog. I've tested all of the EFI cases -- booting with an empty EventLog and booting with a previous stage loader providing one and found no regressions. Eddie tested the bootX part. Eddie also fixed the sandbox TPM which couldn't be used for the EFI code and it now supports all the required capabilities. This had a slight sideeffect in our testing since the EFI subsystem initializes the TPM early and 'tpm2 init' failed during some python tests. That code only opens the device though, so we can replace it with 'tpm2 autostart' which doesn't error out and still allows you to perfom the rest of the tests but doesn't report an error if the device is already opened. There's a few minor issues with this PR as well but since testing and verifying the changes takes a considerable amount of time, I prefer merging it now. Heinrich has already sent a PR for -master containing "efi_loader: fix EFI_ENTRY point on get_active_pcr_banks" and I am not sure if that will cause any conflicts, but in any case they should be trivial to resolve. Both the EFI and non-EFI code have a Kconfig for measuring the loaded Device Tree. The reason this is optional is that we can't reason when/if devices add random info like kaslr-seed, mac addresses etc in the DT. In that case measurements are random, board specific and eventually useless. The reason it was difficult to fix it prior to this patchset is because the EFI subsystem and thus measurements was brought up late and DT fixups might have already been applied. With this patchset we can measure the DT really early in the future. Heinrich also pointed out that the two Kconfigs for the DTB measurements can be squashed in a single one and that the documentation only explains the non-EFI case. I agree on both but as I said this is a sane working version, so let's pull this first it's aleady big enough and painful to test.
| * test/py: always use autostart on tpm2 selftestsIlias Apalodimas2023-10-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 789ed2784256 ("test/py: replace 'tpm2 init, startup, selftest' sequences") changed some of the tpm2 init sequences to 'tpm2 autostart' instead of calling 'tpm init', 'tpm startup TPM2_SU_CLEAR', 'tpm2 self_test full'. The autostart command calls the afforementioned sequence and on top of that deals with the 'tpm2 init' return codes if the tpm is already started. Since we initialize the tpm from various subsystems now, replace the last remaining instances of 'tpm2 init' with 'tpm2 autostart'. Since the latter calls 'tpm2 init' anyway we will still be implicitly testing the validity of that command It's worth noting that since 'tpm2 autostart' performs the startup and self tests sequences of the tpm we could drop 'test_tpm2_sandbox_self_test_full' and 'test_tpm2_startup, but let's keep the since they test tpm commands and options Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
| * test: use a non system PCR for testing PCR extendIlias Apalodimas2023-10-271-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We currently use PCR 0 for testing the PCR read/extend functionality in our selftests. How ever those PCRs are defined by the TCG spec for platform use. For example if the tests run *after* the efi subsystem initialization, which extends PCRs 0 & 7 it will give a false positive. So let's switch over to a PCR which is more suitable and is defined for OS use. It's worth noting that we are using PCR10 here, since PCR9 is used internally by U-Boot if we choose to measure the loaded DTB Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
* | cmd: mbr: Allow 4 MBR partitions without need for extendedAlexander Gendin2023-10-241-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current code allows up to 3 MBR partitions without extended one. If more than 3 partitions are required, then extended partition(s) must be used. This commit allows up to 4 primary MBR partitions without the need for extended partition. Add mbr test unit. In order to run the test manually, mmc6.img file of size 12 MiB or greater is required in the same directory as u-boot. Test also runs automatically via ./test/py/test.py tool. Running mbr test is only supported in sandbox mode. Signed-off-by: Alex Gendin <agendin@matrox.com> [ And due to some further changes for testing ] Signed-off-by: Simon Glass <sjg@chromium.org>
* | test: spl: Add a test for the SPI load methodSean Anderson2023-10-171-0/+10
| | | | | | | | | | | | | | | | | | | | Add test for the SPI load method. This one is pretty straightforward. We can't enable FIT_EXTERNAL with LOAD_FIT_FULL because spl_spi_load_image doesn't know the total image size and has to guess from fdt_totalsize. This doesn't include external data, so loading it will fail. Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | Merge tag 'xilinx-for-v2024.01-rc1-v3' of ↵Tom Rini2023-10-131-0/+66
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://source.denx.de/u-boot/custodians/u-boot-microblaze Xilinx changes for v2024.01-rc1 v3 clk: - remove additional compatible strings for Versal NET net: - zynq_gem: Fix clock calculation for MDC for higher frequencies pinctrl: - core: Extend pinmux status buffere size - zynqmp driver: Show also tristate configuration test: - add test case for pxe get Xilinx: - describe SelectMAP boot mode Zynq: - Fix nand description in DT ZynqMP: - DTS sync patches with kernel and also W=1 related fixes - Add support for KD240, zcu670, e-a2197 with x-prc cards, SC revB/C with i2c description for other SC based boards - k24 psu_init cleanup
| * | test/py: net: Add a test for 'pxe get' commandLove Kumar2023-10-101-0/+66
| |/ | | | | | | | | | | | | | | | | | | Execute the 'pxe get' command to download a pxe configuration file from the TFTP server and validate its interpretation. Signed-off-by: Love Kumar <love.kumar@amd.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com> Link: https://lore.kernel.org/r/b5d263cf61282b158052ba87bde1fb4a227c0bb7.1696338593.git.love.kumar@amd.com Signed-off-by: Michal Simek <michal.simek@amd.com>
* / test/py: sleep: Add a test for the time commandLove Kumar2023-10-091-0/+18
|/ | | | | | | Execute "time <sleep cmd>", and validate that it gives the approximately the correct amount of command execution time. Signed-off-by: Love Kumar <love.kumar@amd.com>
* efi: Use the installed SMBIOS tablesSimon Glass2023-09-221-0/+1
| | | | | | | | | | | U-Boot should set up the SMBIOS tables during startup, as it does on x86. Ensure that it does this correctly on non-x86 machines too, by creating an event spy for last-stage init. Tidy up the installation-condition code while we are here. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* test/py: tpm2: skip tpm2_startup when env__tpm_device_test_skip=TrueMichal Simek2023-09-211-0/+3
| | | | | | | | | All tpm2 tests should be possible to skip when env__tpm_device_test_skip=True but test_tpm2_startup is missing it. Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Signed-off-by: Michal Simek <michal.simek@amd.com> Link: https://lore.kernel.org/r/41f932e52bdd206b1b68d5ff313fc29b794a70e7.1693413381.git.michal.simek@amd.com
* cmd: gpt: Add command to swap partition orderJoshua Watt2023-09-111-0/+19
| | | | | | | | | | | | Adds a command called "gpt transpose" which will swap the order two partition table entries in the GPT partition table (but leaves them pointing to the same locations on disk). This can be useful for swapping bootloaders in systems that use an A/B partitioning scheme where the bootrom is hard coded to look for the bootloader in a specific index in the GPT partition table. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
* cmd: gpt: Preserve bootable flagJoshua Watt2023-09-111-0/+1
| | | | | | | | | Sets the bootable flag when constructing the partition string from the current partition configuration. This ensures that when the partitions are written back (for example, when renaming a partition), the flag is preserved. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
* cmd: gpt: Preserve type GUID if enabledJoshua Watt2023-09-111-0/+65
| | | | | | | | | | If CONFIG_PARTITION_TYPE_GUID is enabled, the type GUID will be preserved when writing out the partition string. It was already respected when writing out partitions; this ensures that if you capture the current partition layout and write it back (such as when renaming), the type GUIDs are preserved. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
* cmd: gpt: Add command to set bootable flagsJoshua Watt2023-09-111-0/+22
| | | | | | | Adds a command that can be used to modify the GPT partition table to indicate which partitions should have the bootable flag set Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
* cmd: gpt: Add gpt_partition_bootable variableJoshua Watt2023-09-111-0/+33
| | | | | | | Adds an additional variable called gpt_partition_bootable that indicates if the given partition is bootable or not. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
* tests: gpt: Remove test order dependencyJoshua Watt2023-09-111-12/+8
| | | | | | | Re-create a clean disk image for each test to prevent modifications from one test affecting another Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
* event: Convert existing spy records to simpleSimon Glass2023-08-311-1/+1
| | | | | | | | | Very few of the existing event-spy records use the arguments they are passed. Update them to use a simple spy instead, to simplify the code. Where an adaptor function is currently used, remove it where possible. Signed-off-by: Simon Glass <sjg@chromium.org>
* initcall: Support emitting eventsSimon Glass2023-08-311-5/+6
| | | | | | | | | | | | | | | | | | | | | At present the initcall list consists of a list of function pointers. Over time the initcall lists will likely change to mostly emitting events, since most of the calls are board- or arch-specific. As a first step, allow an initcall to be an event type instead of a function pointer. Add the required macro and update initcall_run_list() to emit an event in that case, or ignore it if events are not enabled. The bottom 8 bits of the function pointer are used to hold the event type, with the rest being all ones. This should avoid any collision, since initcalls should not be above 0xffffff00 in memory. Convert misc_init_f over to use this mechanism. Add comments to the initcall header file while we are here. Also fix up the trace test to handle the change. Signed-off-by: Simon Glass <sjg@chromium.org>
* event: Support a simple spy recordSimon Glass2023-08-311-1/+2
| | | | | | | | | | | | The current event spy is always passed the event context and the event. The context is always NULL for a static spy. The event is not often used. Introduce a 'simple' spy which takes no arguments. This allows us to drop the adaptation code that many of these spy records use. Update the event script to find these in the image. Signed-off-by: Simon Glass <sjg@chromium.org>
* test: capsule: Remove logic to add public key ESLSughosh Ganu2023-08-292-20/+4
| | | | | | | | The public key EFI Signature List(ESL) needed for capsule authentication is now embedded into the platform's DTB as part of the build. Remove the superfluous logic from the test setup. Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
* sandbox: trace: Increase trace buffer sizeSughosh Ganu2023-08-291-1/+1
| | | | | | | | | | When running the trace test on the sandbox platform, the current size of 16MiB is no longer large enough for capturing the entire trace history, and results in truncation. Use a size of 32MiB for the trace buffer on the sandbox platform while running the trace test. Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
* test: capsule: Generate EFI capsules through binmanSughosh Ganu2023-08-293-174/+346
| | | | | | | | Support has been added for generating the EFI capsules through binman. Make changes in the EFI capsule update testing feature to generate capsules through binman. Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
* bootstd: Add a test for bootmeth_crosSimon Glass2023-08-251-0/+142
| | | | | | | | | | | | | The ChromiumOS bootmeth has no tests at present. Before adding more features. add a basic test. This creates a disk which can be scanned by the bootmeth, so make sure things work. It is quite rudimentary, since the kernel is faked, the root disk is missing and there is no cmdline stored. Enable the bootmeth for snow so it can build the unit test. Signed-off-by: Simon Glass <sjg@chromium.org>
* test: Move 1MB.fat32.img and 2MB.ext2.imgSimon Glass2023-08-252-8/+4
| | | | | | | | These are currently created in the source directory, which is not ideal. Move them to the persistent-data directory instead. Update the test so skip validating the filename, since it now includes a full path. Signed-off-by: Simon Glass <sjg@chromium.org>
* expo: Tidy up the expo.py tool and usageSimon Glass2023-08-251-1/+3
| | | | | | | | | | | | Tidy up this tool a little: - define which arguments are needed - split the enum values out into a header file - warn if no enum values are found - display the dtc error if something goes wrong - avoid a Python traceback on error Signed-off-by: Simon Glass <sjg@chromium.org>
* test: unit test for semihostingHeinrich Schuchardt2023-08-142-0/+56
| | | | | | | Provide a unit test for semihosting testing reading and writing a file. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Sean Anderson <sean.anderson@seco.com>
* test: avoid function name 'setup'Heinrich Schuchardt2023-07-205-24/+24
| | | | | | | | | | | | | | | | | | pytest 7.3.2 treats the function name 'setup' as a fixture [1]. This leads to errors like: TypeError: setup() missing 2 required positional arguments: 'disk_img' and 'osindications' Rename setup() to capsule_setup(). [1] How to run tests written for nose https://docs.pytest.org/en/7.3.x/how-to/nose.html Fixes: 482ef90aeb4c ("test: efi_capsule: refactor efi_capsule test") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* tests: Fix exception when cleaning up skipped testJoshua Watt2023-07-172-2/+4
| | | | | | | | | | If test_cat and test_xxd cannot create the required file, the test will be skipped, but this would result in an exception being raised in the finally block because the file didn't exist to be cleaned up. This caused the test to be marked as failed instead of skipped. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* expo: Add tests for the configuration editorSimon Glass2023-07-141-0/+10
| | | | | | | Add some simple tests and a helpful script to make the configuration editor easier to set up. Signed-off-by: Simon Glass <sjg@chromium.org>
* test: Find leftovers after clean/mrproperTobias Deiminger2023-07-071-0/+105
| | | | | | | | | | | | | | | Docs describe 'make clean' to delete most generated files, 'make mrproper' to delete current configuration and all generated files. This test tries to assert it. Idea is to search remaining files by patterns in copies of the initial out-of-source build, which has two advantages: - looking in an out-of-source build dir allows to tell generated source code from committed source code - copying is fast (compared to rebuilding each time) which allows to do a "world clean" Signed-off-by: Tobias Deiminger <tdmg@linutronix.de>
* Merge tag 'v2023.07-rc6' into nextTom Rini2023-07-051-0/+5
|\ | | | | | | Prepare v2023.07-rc6
| * test: correct architecture in EFI FIT testHeinrich Schuchardt2023-06-161-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | On arm64 the its we use to generate the test FIT image has arch = "arm"; We should use "arm64" here which is mapped to IH_ARCH_ARM64 via uimage_arch[]. Fixes: 8391f955494e ("test/py: Create a test for launching UEFI binaries from FIT images") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>