summaryrefslogtreecommitdiffstats
path: root/test/lib/Makefile
Commit message (Collapse)AuthorAgeFilesLines
* test: Add test for strlcatSean Anderson2021-04-121-0/+1
| | | | | | | | This test is adapted from glibc, which is very concerned about alignment. It also tests strlcpy by dependency. Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* test: unit test for longjmpHeinrich Schuchardt2021-04-081-0/+1
| | | | | | | Provide a unit test for the longjmp() library function Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Acked-by: Sean Anderson <seanga2@gmail.com>
* test: test/lib/test_print.c depends on CONSOLE_RECORDHeinrich Schuchardt2021-01-161-1/+1
| | | | | | | | | The tests in test/lib/test_print.c fail without CONFIG_CONSOLE_RECORD=y. Add a build dependency. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
* test: Add a test for getoptSean Anderson2020-10-301-0/+1
| | | | | | | | A few of these tests were inspired by those in glibc. The syntax for invoking test_getopt is a bit funky, but it's necessary so that the CPP can parse the arguments correctly. Signed-off-by: Sean Anderson <seanga2@gmail.com>
* test: unit tests for print_freq(), print_size()Heinrich Schuchardt2020-10-231-0/+1
| | | | | | Provide unit tests for functions print_freq() and print_size(). Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* test: undefined reference to 'sscanf'Heinrich Schuchardt2020-08-271-1/+1
| | | | | | | | | | | | Compiling with CONFIG_UNIT_TEST=y leads to: aarch64-linux-gnu-ld.bfd: test/lib/sscanf.c:50: undefined reference to `sscanf' Add missing build dependency. Fixes:e87dfb0526be ("lib: sscanf: add sscanf implementation") Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* test: unit test for efi_dp_check_length()Heinrich Schuchardt2020-08-241-0/+1
| | | | | | Provide a unit test for function efi_dp_check_length(). Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* lib: sscanf: add sscanf implementationAndrii Anisov2020-08-141-0/+1
| | | | | | | | | Port sscanf implementation from mini-os and introduce new Kconfig option to enable it: CONFIG_SSCANF. Disable by default. Signed-off-by: Andrii Anisov <andrii_anisov@epam.com> Signed-off-by: Anastasiia Lukianenko <anastasiia_lukianenko@epam.com> Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
* test: provide tests for efi_image_region_add()Heinrich Schuchardt2020-07-031-0/+1
| | | | | | Provide unit tests for efi_image_region_add(). Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* test: add rsa_verify() unit testAKASHI Takahiro2020-03-121-0/+1
| | | | | | | | | | In this patch, a very simple test is added to verify that rsa_verify() using rsa_verify_with_pkey() work correctly. To keep the code simple, all the test data, either public key and verified binary data, are embedded in the source. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
* aes: add test unit for aes128Philippe Reynes2020-01-171-0/+1
| | | | | | | This commit add test unit for aes128. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* test: add asn1 unit testAKASHI Takahiro2019-12-061-0/+1
| | | | | | | This test will exercise asn1 compiler as well as asn1 decoder functions via various parsers. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
* test: provide test for errno_str()Heinrich Schuchardt2019-10-311-0/+1
| | | | | | | | Provide a unit test for errno_str(). Test that known and unknown error numbers are handled correctly. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
* test: provide unit test for memory functionsHeinrich Schuchardt2019-02-091-0/+2
| | | | | | | | | | | | Memory functions may have architecture specific implementations. These should be tested. Provide unit tests for memset(), memcpy(), memmove(). Provide a 'ut lib' sub-command to execute the tests. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
* test: add test for lib/lmb.cSimon Goldschmidt2019-01-161-0/+1
| | | | | | | | Add basic tests for the lmb memory allocation code used to reserve and allocate memory during boot. Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* test: list: Add tests for hexdump.cMario Six2018-09-281-0/+5
Add tests for the hex2bin, bin2hex, and hex_to_bin functions, which were recently added to U-Boot. Signed-off-by: Mario Six <mario.six@gdsys.cc> Reviewed-by: Simon Glass <sjg@chromium.org>