| Age | Commit message (Collapse) | Author |
|
With 'ut all' multiple test suites are run. Add a way to collect totals
and show them at the end.
Signed-off-by: Simon Glass <[email protected]>
|
|
Add a function to show the stats, so we can decide when to print it.
This slightly adjusts the output, so that any 'test not found' message
appears on its own line after all other output.
The 'failures' message now appears in lower case so update pytest
accordingly.
Signed-off-by: Simon Glass <[email protected]>
|
|
This is useful information and is not always the same as the 'count' arg
to ut_run_list() so add it as a separate stat.
Signed-off-by: Simon Glass <[email protected]>
|
|
Use a struct to hold the stats, since we also want to have the same
stats for all runs as we have for each suite.
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]>
|
|
This is not needed anymore. If a test suite is not built, then it will
have no linker-list entries. So we can just check for that and know that
the suite is not present.
This allows removal of the #ifdefs and the need to keep them in sync
with the associated Makefile rules, which has actually failed, since the
help does not match what commands are actually present.
Signed-off-by: Simon Glass <[email protected]>
|
|
The 'info' test is not a real test. With the new suite array we can drop
this and the associated special-case code.
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]>
|
|
Most test suites have a _test suffix. This is not necessary as there is
also a ut_ prefix.
Drop the suffix so that (with future work) the suite name can be used as
the linker-list name.
Remove the suffix from the pytest regex as well, moving it to the top of
the file, as it is a constant.
Signed-off-by: Simon Glass <[email protected]>
|
|
Add a Python test which runs 'ut all' and then checks that the expected
suites are present and all tests in each suite are run.
This can help to check that nothing is missing.
Update 'ut info' to ignore the 'all' suite when counting the number of
suites, since that is really just a combination of all the other suites.
Adjust the message for skipped tests so that appears even if no
particular test was selected. This helps the new 'test_suite' test see
what is going on.
Signed-off-by: Simon Glass <[email protected]>
|
|
It is helpful to see a list of available suites. At present this is
handled by the longhelp for the 'ut' command, but this is not in a
format which can be easily parsed by python tests.
Add a -s option to show this. At present it is not possible to show the
number of tests in each suite, but future work will address this. For
now, show a ?
Signed-off-by: Simon Glass <[email protected]>
|
|
Some suites have a different name from that used in the linker list.
That makes it hard to programmatically match the name printed when the
suite runs to the linker-list name it has.
Update the names so they are the same.
Signed-off-by: Simon Glass <[email protected]>
|
|
A few messages lack a newline so the test output shows the next
test-name on the same line. For example:
Beware: this test sets local variable dollar_bar and dollar_quux
and they cannot be unset!Test: hush_test_env_dollar: dollar.c
This is confusing, so fix it.
Signed-off-by: Simon Glass <[email protected]>
|
|
Pass this into the function so that callers can inspect the state
afterwards.
Signed-off-by: Simon Glass <[email protected]>
|
|
Move these operations into separate functions so that it is clearer what
is needed. These functions can also be called from somewhere other than
ut_run_list().
Signed-off-by: Simon Glass <[email protected]>
|
|
Rename this function and test_set_state() so use the same ut_ prefix as
other functions in ut.h
Signed-off-by: Simon Glass <[email protected]>
|
|
The string conversion functions are implemented in lib/strto.c which is
only compiled if CONFIG_STRTO=y.
Signed-off-by: Heinrich Schuchardt <[email protected]>
|
|
Simon Glass <[email protected]> says:
The current UPL spec[1] has been tidied up and improved over the last
year, since U-Boot's original UPL support was written.
This series includes some prerequisite patches needed for the real UPL
patches. It is split from [2]
[1] https://github.com/UniversalPayload/spec/tree/3f1450d
[2] https://patchwork.ozlabs.org/project/uboot/list/?series=438574&state=*
Link: https://lore.kernel.org/r/[email protected]
|
|
The ofnode_find_subnode() function currently processes things two
different ways, so the treatment of unit addresses differs depending on
whether OF_LIVE is enabled or not.
Add a new version which uses the ofnode API and add a test to check that
unit addresses can be matched correctly. Leave the old function in place
for the !OF_LIVE case, to avoid a code-size increase, e.g. on
firefly-rk3288
Signed-off-by: Simon Glass <[email protected]>
|
|
When a unit-address is provided, use it to match against the node
name.
Since this increases code size, put it into a separate function.
Signed-off-by: Simon Glass <[email protected]>
|
|
This function is somewhat ambiguous, so expand the comments and add a
test for the undefined behaviour.
Signed-off-by: Simon Glass <[email protected]>
|
|
Fix a typo in the test comment.
Signed-off-by: Simon Glass <[email protected]>
|
|
Add a new initialiser which can accept a constant pointer.
Signed-off-by: Simon Glass <[email protected]>
|
|
In many cases it is useful to get the address of a buffer, e.g. when
booting from it. Add a function to handle this.
Signed-off-by: Simon Glass <[email protected]>
|
|
We want to encourage people to use an allocated bloblist since it is
more flexible than a fixed one. Make this the default, being sure not to
change existing users.
The unit tests require BLOBLIST_FIXED so add a dependency in the
Makefile to avoid build errors.
All sandbox builds require BLOBLIST_FIXED so make that the default for
sandbox.
Signed-off-by: Simon Glass <[email protected]>
|
|
Philippe Reynes <[email protected]> says:
This serie adds the support of sha256_hmac and sha256_hkdf.
A first version was sent several months ago just before the
integration of mbedtls. This new version is based on mbedtls.
The first patch of this serie add the support of hkdf
using mbedtls.
Link: https://lore.kernel.org/r/[email protected]
|
|
Adds a test for the function sha256_hkdf.
Signed-off-by: Philippe Reynes <[email protected]>
Reviewed-by: Raymond Mao <[email protected]>
|
|
Adds a test for the function sha256_hmac
Signed-off-by: Philippe Reynes <[email protected]>
Reviewed-by: Raymond Mao <[email protected]>
|