| Age | Commit message (Collapse) | Author |
|
This file is empty now. Remove it and its uses.
Signed-off-by: Simon Glass <[email protected]>
|
|
This function is not used outside the cmd_ut file anymore, so make it
static.
Signed-off-by: Simon Glass <[email protected]>
|
|
Now that everything is using the new test-suite features, drop support
for running commands.
Fix a missing closing-bracket while we are here.
Signed-off-by: Simon Glass <[email protected]>
|
|
Use the new suite-runner to run these tests instead.
Signed-off-by: Simon Glass <[email protected]>
|
|
Use the new suite-runner to run these tests instead.
Signed-off-by: Simon Glass <[email protected]>
|
|
Use the new suite-runner to run these tests instead.
Signed-off-by: Simon Glass <[email protected]>
|
|
Use fdt_overlay consistently in the identifiers and file/dir names.
Signed-off-by: Simon Glass <[email protected]>
|
|
Update this function to access a unit-test state, so that the caller can
collect results from running multiple suites.
Signed-off-by: Simon Glass <[email protected]>
|
|
Use the new suite-runner to run these tests instead.
It is not clear that these actually work, since they are not enabled on
sandbox for some reason.
Signed-off-by: Simon Glass <[email protected]>
|
|
Use the new suite-runner to run these tests instead.
It is not clear that these actually work, since they are not enabled on
sandbox for some reason.
Signed-off-by: Simon Glass <[email protected]>
Acked-by: Linus Walleij <[email protected]>
|
|
Use the new suite-runner to run these tests instead.
Signed-off-by: Simon Glass <[email protected]>
|
|
Use the new suite-runner to run these tests instead.
Signed-off-by: Simon Glass <[email protected]>
|
|
Use the new suite-runner to run these tests instead.
Signed-off-by: Simon Glass <[email protected]>
|
|
Use the new suite-runner to run these tests instead.
Signed-off-by: Simon Glass <[email protected]>
|
|
Use the new suite-runner to run these tests instead.
Signed-off-by: Simon Glass <[email protected]>
|
|
Use the new suite-runner to run these tests instead.
Signed-off-by: Simon Glass <[email protected]>
|
|
Use the new suite-runner to run these tests instead.
Signed-off-by: Simon Glass <[email protected]>
|
|
Use the new suite-runner to run these tests instead.
Signed-off-by: Simon Glass <[email protected]>
|
|
Use the new suite-runner to run these tests instead.
Signed-off-by: Simon Glass <[email protected]>
|
|
Use the new suite-runner to run these tests instead.
Signed-off-by: Simon Glass <[email protected]>
|
|
Use the new suite-runner to run these tests instead.
Signed-off-by: Simon Glass <[email protected]>
|
|
Use the new suite-runner to run these tests instead.
Signed-off-by: Simon Glass <[email protected]>
|
|
Use the new suite-runner to run these tests instead.
Signed-off-by: Simon Glass <[email protected]>
|
|
Use the new suite-runner to run these tests instead.
Signed-off-by: Simon Glass <[email protected]>
|
|
Use the new suite-runner to run these tests instead.
Signed-off-by: Simon Glass <[email protected]>
|
|
Use the new suite-runner to run these tests instead.
Signed-off-by: Simon Glass <[email protected]>
|
|
Use the new suite-runner to run these tests instead.
Signed-off-by: Simon Glass <[email protected]>
|
|
Use the new suite-runner to run these tests instead.
Signed-off-by: Simon Glass <[email protected]>
|
|
Use the new suite-runner to run these tests instead.
Signed-off-by: Simon Glass <[email protected]>
|
|
Use the new suite-runner to run these tests instead.
Signed-off-by: Simon Glass <[email protected]>
|
|
The current cmd_ut_sub[] array was fine when there were only a few test
suites. But is quite unwieldy now:
- it requires a separate do_ut_xxx for each suite, even though the code
for most is almost identical
- running more than one suite requires running multiple commands, and
there is no record of which suites passed or failed
- 'ut all' runs all suites but reports their results individually
- we need lots of #ifdefs in the array, mirroring those in the makefile
but maintained in a separate place
In fact the tests are all in the same linker list. The suites are
grouped, so it is possible to access the information without a command.
Introduce a 'suite' array, which holds the cmd_ut_...() function to
call, but can also support running a suite without that function. This
means that the array of struct cmd_tbl is transformed into an array of
'struct suite'.
This will allow removal of many of the functions, particularly those
without test-specific init.
Signed-off-by: Simon Glass <[email protected]>
|
|
Drop some the prototypes for functions which were removed in earlier
series.
Signed-off-by: Simon Glass <[email protected]>
|
|
Add some unit tests to check that we can write a UPL handoff and read it
back.
Signed-off-by: Simon Glass <[email protected]>
|
|
Introduce a new subcommand to ut: ut hush.
For the moment, this command does nothing, future commits will add tests which
will be run on command call.
Note that CONFIG_HUSH_PARSER must be defined to compile this new subcommand.
Signed-off-by: Francis Laniel <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
|
|
Add a new suite for 'cmd' tests, used for testing commands. These are
kept in the test/cmd directory.
For now it is empty, but it will be used for coreboot-command tests.
Signed-off-by: Simon Glass <[email protected]>
|
|
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.
|
|
Use the sandbox TPM driver to measure some boot images in a unit
test case.
Signed-off-by: Eddie James <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Acked-by: Ilias Apalodimas <[email protected]>
Signed-off-by: Ilias Apalodimas <[email protected]>
|
|
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 <[email protected]>
[ And due to some further changes for testing ]
Signed-off-by: Simon Glass <[email protected]>
|
|
Add test for command bdinfo .
Signed-off-by: Marek Vasut <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
|
|
Adds a test for the new pci_mps command to ensure that it can set the
Maximum Payload Size (MPS) of all devices to 256 bytes in the sandbox
environment. Enables the pci_mps command in the sandbox environment so
that this test can be run.
Signed-off-by: Stephen Carlson <[email protected]>
|
|
Add a command to load SEAMA (Seattle Image), a NAND flash
on-flash storage format.
This type of flash image is found in some D-Link routers such
as DIR-645, DIR-842, DIR-859, DIR-860L, DIR-885L, DIR890L and
DCH-M225, as well as in WD and NEC routers on the ath79
(MIPS), Broadcom BCM53xx, and RAMIPS platforms.
This U-Boot command will read and decode a SEAMA image from
raw NAND flash on any platform. As it is always using big endian
format for the data decoding is always necessary on platforms
such as ARM.
The command is needed to read a SEAMA-encoded boot image on the
D-Link DIR-890L router for boot from NAND flash in an upcoming
port of U-Boot to the Broadcom Northstar (BCM4709, BCM53xx)
architecture.
A basic test and documentation is added as well. The test must
be run on a target with NAND flash support and at least one
resident SEAMA image in flash.
Cc: Rafał Miłecki <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
Add a test which validates that exit from environment script works as
expected, including return value propagation and clipping to positive
integers.
Reviewed-by: Simon Glass <[email protected]>
Signed-off-by: Marek Vasut <[email protected]>
|
|
Add a new 'font' command which allows the fonts to be listed as well as
selecting a different font and size.
Allow the test to run on sandbox, where multiple font/size combinations
are supported, as well as sandbox_flattree, where they are not.
Signed-off-by: Simon Glass <[email protected]>
|
|
Add a basic test of the 'fdt addr' command, to kick things off.
This includes a new convenience function to run a command from a printf()
string.
Signed-off-by: Simon Glass <[email protected]>
|
|
cp.b is used a lot as a way to load binaries to memory and execute
them, however we may need to integrate this with the efi subsystem to
set it up as a bootdev.
So, introduce a loadm command that will be consistent with the other
loadX commands and will call the efi API's.
ex: loadm $kernel_addr $kernel_addr_r $kernel_size
with this a kernel with CONFIG_EFI_STUB enabled will be loaded and
then subsequently booted with bootefi command.
Signed-off-by: Rui Miguel Silva <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
|
|
Add a set of combined tests for the bootdev, bootflow and bootmeth
commands, along with associated functionality.
Expand the sandbox console-recording limit so that these can work.
These tests rely on a filesystem script which is not yet added to the
Python tests. It is included here as a shell script.
Signed-off-by: Simon Glass <[email protected]>
|
|
Sphinx expects Return: and not @return to indicate a return value.
find . -name '*.c' -exec \
sed -i 's/^\(\s\)\*\(\s*\)@return\(\s\)/\1*\2Return:\3/' {} \;
find . -name '*.h' -exec \
sed -i 's/^\(\s\)\*\(\s*\)@return\(\s\)/\1*\2Return:\3/' {} \;
Signed-off-by: Heinrich Schuchardt <[email protected]>
|
|
This adds tests for the crypt-based and plain SHA256-based password hashing
algorithms in the autoboot flow.
Signed-off-by: Steffen Jaeckel <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
|
|
This test predates the test framework in U-Boot. It uses #define DEBUG and
assert() to check the result. Update it to use the framework so it can
report failure constitent with other tests.
Signed-off-by: Simon Glass <[email protected]>
|
|
This adds a basic test for the newly introduced 'addrmap' command.
Signed-off-by: Bin Meng <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
[Rebase]
Signed-off-by: Priyanka Jain <[email protected]>
|