u-boot/test/py/tests
Sean Anderson bcc85b96b5 cmd: source: Support specifying config name
As discussed previously [1,2], the source command is not safe to use with
verified boot unless there is a key with required = "images" (which has its
own problems). This is because if such a key is absent, signatures are
verified but not required. It is assumed that configuration nodes will
provide the signature. Because the source command does not use
configurations to determine the image to source, effectively no
verification takes place.

To address this, allow specifying configuration nodes. We use the same
syntax as the bootm command (helpfully provided for us by fit_parse_conf).
By default, we first try the default config and then the default image. To
force using a config, # must be present in the command (e.g. `source
$loadaddr#my-conf`). For convenience, the config may be omitted, just like
the address may be (e.g. `source \#`). This also works for images
(`source :` behaves exactly like `source` currently does).

[1] https://lore.kernel.org/u-boot/7d711133-d513-5bcb-52f2-a9dbaa9eeded@prevas.dk/
[2] https://lore.kernel.org/u-boot/042dcb34-f85f-351e-1b0e-513f89005fdd@gmail.com/

Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2022-12-31 13:35:19 -05:00
..
bootstd bootstd: Add setup for the bootflow tests 2022-04-25 10:00:04 -04:00
test_android test: Correct pylint errors 2022-03-02 10:28:12 -05:00
test_cat cmd: cat: add new command 2022-10-11 15:40:48 -04:00
test_efi_bootmgr test: Make test_efi_bootmgr() single-threaded 2022-09-12 18:06:36 -04:00
test_efi_capsule test: dm: Add test cases for FWU Metadata uclass 2022-10-31 14:47:33 -04:00
test_efi_secboot test/py: efi_secboot: Remove unnecessary cert-to-efi-hash-list option 2022-11-06 10:50:04 +01:00
test_eficonfig eficonfig: refactor file selection handling 2022-11-22 12:00:44 +01:00
test_fs test: Split out mk_fs function into a helper 2022-11-07 16:24:30 -07:00
test_xxd cmd: xxd: add new command 2022-10-11 15:40:48 -04:00
vboot test: py: vboot: add test for global image signature 2022-03-31 14:12:23 -04:00
fit_util.py vbe: Add a test for VBE device tree fixups 2022-10-17 21:17:13 -06:00
fs_helper.py dm: Add tests for the sandbox host driver 2022-11-07 16:24:30 -07:00
source.its test: Add test for source command 2022-12-31 13:35:19 -05:00
test_000_version.py SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
test_bind.py test: Make test_bind_unbind_with_uclass() single-threaded 2022-09-12 18:06:36 -04:00
test_bootmenu.py test: restore timeout after bootmenu unit test 2022-05-28 10:59:27 +02:00
test_button.py cmd/button: return button status 2020-10-14 11:16:34 -04:00
test_dfu.py test: Use single quote consistently 2019-01-15 15:28:41 -05:00
test_dm.py test/py: Run simple dm commands without checking 2022-07-26 08:23:54 +02:00
test_efi_fit.py test: fix pylint warnings for test_efi_fit.py 2022-03-31 19:06:16 +02:00
test_efi_loader.py test: address some pylint warnings 2021-11-26 21:30:59 +01:00
test_efi_selftest.py test: don't change console timeout in EFI selftest. 2022-05-28 10:59:27 +02:00
test_env.py env: Allow text-env tests to run with awk 2022-04-07 16:50:53 -04:00
test_event_dump.py event: Re-add file paths to the tests 2022-12-06 15:30:30 -05:00
test_extension.py pytest: add sandbox test for "extension" command 2021-05-13 13:09:09 -04:00
test_fit.py test: Move common FIT code into a separate fit_util file 2022-10-17 21:17:13 -06:00
test_fit_ecdsa.py test: Update FIT tests to run in parallel 2022-09-12 18:06:36 -04:00
test_fit_hashes.py test: Update FIT tests to run in parallel 2022-09-12 18:06:36 -04:00
test_fpga.py test/py: Automated conversion to Python 3 2019-10-30 17:48:47 -04:00
test_gpio.py test: Make test_gpio_read() independent 2022-09-12 18:06:36 -04:00
test_gpt.py test: Mark test_gpt tests as slow 2022-09-12 18:06:36 -04:00
test_handoff.py test: Fix the boardspec for the SPL handoff test 2020-01-02 10:27:23 -05:00
test_help.py sandbox: Avoid binman error when run without device tree 2022-05-05 09:29:57 -04:00
test_hush_if_test.py test: Allow hush tests to run in parallel 2021-10-05 08:50:15 -04:00
test_kconfig.py test: Add some tests for kconfig.h 2022-08-10 13:38:30 -04:00
test_log.py sandbox: Drop the 'starting...' message 2021-03-12 09:57:29 -05:00
test_lsblk.py test: test_lsblk: Mark as sandbox specific 2022-01-14 12:26:42 -05:00
test_md.py SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
test_mmc_rd.py test/py: mmc: Fix 'mmc info' testcase 2020-03-27 15:42:04 -04:00
test_mmc_wr.py test/py: Automated conversion to Python 3 2019-10-30 17:48:47 -04:00
test_net.py test/py: use default load address for tftp 2019-02-12 07:19:24 -05:00
test_ofplatdata.py test: Re-enable test_ofplatdata 2021-03-12 09:57:29 -05:00
test_part.py test/py: test_part: Correct the test case name 2022-05-26 10:27:14 -04:00
test_pinmux.py test: Fix test_pinmux to run in parallel 2022-09-12 18:06:36 -04:00
test_pstore.py test: Add PStore command tests 2020-10-14 11:16:34 -04:00
test_pstore_data_console.hex test: Add PStore command tests 2020-10-14 11:16:34 -04:00
test_pstore_data_panic1.hex test: Add PStore command tests 2020-10-14 11:16:34 -04:00
test_pstore_data_panic2.hex test: Add PStore command tests 2020-10-14 11:16:34 -04:00
test_qfw.py test: qemu: add qfw sandbox driver, dm tests, qemu tests 2021-04-12 17:45:39 -04:00
test_sandbox_exit.py test: unit test for exception command 2020-12-13 07:58:17 -07:00
test_scp03.py test: py: add initial coverage for scp03 cmd 2021-03-14 11:50:16 -04:00
test_sf.py SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
test_shell_basics.py test: py: test_shell_run() with CONFIG_HUSH_PARSER=n 2020-08-07 22:31:32 -04:00
test_sleep.py test_sleep.py: make sleep time and margin configurable 2020-07-07 18:23:48 -04:00
test_source.py cmd: source: Support specifying config name 2022-12-31 13:35:19 -05:00
test_spl.py test: Run only the selected SPL test 2020-10-29 14:42:18 -06:00
test_stackprotector.py test/py: test_stackprotector: Disable for ASAN 2022-06-23 12:58:18 -04:00
test_tpm2.py configs: enable CMD_TPM on QEMU ARM 2021-11-30 09:23:37 +01:00
test_ums.py test: Use single quote consistently 2019-01-15 15:28:41 -05:00
test_unknown_cmd.py SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
test_ut.py dm: Add tests for the sandbox host driver 2022-11-07 16:24:30 -07:00
test_vbe.py vbe: Use a manual test 2022-10-31 11:04:00 -04:00
test_vbe_vpl.py vbe: Add a test for the VBE flow into U-Boot proper 2022-10-31 11:04:00 -04:00
test_vboot.py test: Mark all but the first vboot test as slow 2022-09-12 18:06:36 -04:00
test_vpl.py vpl: Support running vpl tests 2022-05-02 09:58:13 -04:00
vboot_evil.py test: Correct pylint errors 2022-03-02 10:28:12 -05:00
vboot_forge.py fit: Don't allow verification of images with @ nodes 2021-02-15 19:17:25 -05:00