summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2018-10-07test: tee: test TEE uclassJens Wiklander
Tests the TEE uclass with a sandbox tee driver. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> [trini: initialize session to 0 in dm_test_tee] Signed-off-by: Tom Rini <trini@konsulko.com>
2018-10-06test/py: test_fs: add docstring comments to helper functionsAkashi Takahiro
After Siomon's comment, add a descriptive comment (docstring) to each of helper functions in conftest.py. No functionality changed. Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-10-06test/py: test_fs: remove fs_type argument from umount_fs()Akashi Takahiro
Since there is no use of fs_type in umount_fs(), just remove it. Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-10-06test/py: ignore console read exceptions after test failureStephen Warren
After a test has failed, test/py drains the U-Boot console log to ensure that any relevant output is captured. At this point, we don't care about detecting any additional errors, since the test is already known to have failed, and U-Boot will be restarted. To ensure that the test cleanup code is not interrupted, and can correctly terminate the log sections for the failed test, ignore any exception that occurs while reading the U-Boot console output during this limited period of time. Signed-off-by: Stephen Warren <swarren@nvidia.com>
2018-09-30Merge git://git.denx.de/u-boot-dmTom Rini
2018-09-29dm: test: Add "/firmware" node scan testRajan Vaja
Add a test which verifies that all subnodes under "/firmware" nodes are scanned. Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org> Added 'imply FIRMWARE' to sandbox Kconfig to fix test failures, fixed ordering of lines in arch/sandbox/dts/test.dts and test/dm/Makefile, updated #if condition in drivers/firmware/firmware-uclass.c: Signed-off-by: Simon Glass <sjg@chromium.org>
2018-09-29test: Add tests for board uclassMario Six
Add tests for the new board uclass. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Mario Six <mario.six@gdsys.cc>
2018-09-29test: Add tests for dev_{enable, disable}_by_pathMario Six
Add tests for the dev_{enable,disable}_by_path functions. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Mario Six <mario.six@gdsys.cc>
2018-09-29test: Add tests for DT-manipulation functionsMario Six
Add tests for the ofnode_set_enabled, ofnode_write_string, and ofnode_write_property functions. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Mario Six <mario.six@gdsys.cc>
2018-09-28test: list: Add tests for hexdump.cMario Six
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>
2018-09-28video_osd: Add osd sandbox driver and testsMario Six
Add sandbox driver and tests for the new OSD uclass. Signed-off-by: Mario Six <mario.six@gdsys.cc> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-09-23efi_selftest: test key notification functionsHeinrich Schuchardt
Use a key notification function to leave the EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL test. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
2018-09-23test/py: test EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOLHeinrich Schuchardt
Add a unit test for the EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
2018-09-23test/py: rework test_efi_selftest_text_input()Heinrich Schuchardt
Use more precise regular expressions. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
2018-09-23test/py: Unicode w/ EFI_SIMPLE_TEXT_INPUT_PROTOCOLHeinrich Schuchardt
Test that the Euro sign is correctly retrieved from the console via the EFI_SIMPLE_TEXT_INPUT_PROTOCOL. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
2018-09-23efi_loader: support Unicode text inputHeinrich Schuchardt
Up to now the EFI_TEXT_INPUT_PROTOCOL only supported ASCII characters. With the patch it can consume UTF-8 from the console. Currently only the serial console and the console can deliver UTF-8. Local consoles are restricted to ASCII. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
2018-09-23test/py: fs: add fstest/unlink testAkashi, Takahiro
In this commit, test cases for unlink interfaces are added as part of "test_fs" test suite. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Signed-off-by: Alexander Graf <agraf@suse.de>
2018-09-23test/py: fs: add fstest/mkdir testAKASHI Takahiro
In this commit, test cases for mkdir interfaces are added as part of "test_fs" test suite. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Signed-off-by: Alexander Graf <agraf@suse.de>
2018-09-23test/py: fs: add extended write operation testAKASHI Takahiro
In this commit and the following, test scripts for new filesystem functionalities introduced by my patch set, "fs: fat: extend FAT write operations," are provided. In particular, this patch adds test cases for sub-directory write and write with non-zero offset. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Signed-off-by: Alexander Graf <agraf@suse.de>
2018-09-23test/py: convert fs-test.sh to pytestAKASHI Takahiro
In this commit, the same set of test cases as in test/fs/fs-test.sh is provided using pytest framework. Actually, fs-test.sh provides three variants:"sb" (sb command), "nonfs" (fatxx and etc.) and "fs" (hostfs), and this patch currently supports only "nonfs" variant; So it is not a replacement of fs-test.sh for now. Simple usage: $ py.test test/py/tests/test_fs [<other options>] You may also specify filesystem types to be tested: $ py.test test/py/tests/test_fs --fs-type fat32 [<other options>] Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Signed-off-by: Alexander Graf <agraf@suse.de>
2018-09-23fs-test: update the test result as of v2018.09AKASHI Takahiro
As far as this patch series has been applied, all the tests should pass. So update the test result summary. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Signed-off-by: Alexander Graf <agraf@suse.de>
2018-09-23fs-test: fix false positive error at Test Case 12AKASHI Takahiro
The error message to be matched is wrong. Fix it. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Signed-off-by: Alexander Graf <agraf@suse.de>
2018-09-23test/py: typo occuredHeinrich Schuchardt
%s/occured/occurred/ Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
2018-09-23test/py: test EFI_SIMPLE_TEXT_INPUT_PROTOCOLHeinrich Schuchardt
Execute the EFI selftest for the EFI_SIMPLE_TEXT_INPUT_PROTOCOL. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
2018-09-23test: tests for utf_to_lower() utf_to_upper().Heinrich Schuchardt
Provide unit tests for utf_to_lower() utf_to_upper(). Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
2018-09-23test: test printing UnicodeHeinrich Schuchardt
Test printing of Unicode strings Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
2018-09-23test: unit tests for Unicode functionsHeinrich Schuchardt
Provide unit tests for Unicode functions. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
2018-09-23test: print_ut.c use #if CONFIG_IS_ENABLED(EFI_LOADER)Heinrich Schuchardt
Using CONFIG_IS_ENABLED(EFI_LOADER) allows to simply the #if statements. Suggested-by: Alexander Graf <agraf@suse.de> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
2018-09-18dm: fix alignment of help message of "dm" commandMasahiro Yamada
Currently, "help dm" shows as follows: => help dm dm - Driver model low level access Usage: dm tree Dump driver model tree ('*' = activated) dm uclass Dump list of instances for each uclass dm devres Dump list of device resources for each device Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com>
2018-09-18test: ofnode: test ofnode_by_prop_value()Jens Wiklander
Test ofnode_by_prop_value() Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-09-18test: Add tests for CPU uclassMario Six
Add a sandbox CPU driver, and some tests for the CPU uclass. Signed-off-by: Mario Six <mario.six@gdsys.cc>
2018-09-18test: Add tests for sysreset_get_statusMario Six
Add some tests for sysreset_get_status. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Mario Six <mario.six@gdsys.cc>
2018-09-11Merge tag 'fpga-for-v2018.11' of git://git.denx.de/u-boot-microblazeTom Rini
FPGA changes for v2018.11 - add fpga tests to cover fpga commands - fpga Kconfig cleanup - fix cmd/fpga.c - add support for missing fpga loadmk commands - add fpga fragment to MAINTAINERS
2018-09-11test/py: Extend fpga command to test all fpga load typesMichal Simek
Add support for info, load, loadp, loadb, loadbp, loadmk_legacy, loadmk_legacy_gz, loadmk_fit, loadfs also with variable support. There are probably missing failed tests. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-09-10Remove <inttypes.h> includes and PRI* usages in printf() entirelyMasahiro Yamada
In int-ll64.h, we always use the following typedefs: typedef unsigned int u32; typedef unsigned long uintptr_t; typedef unsigned long long u64; This does not need to match to the compiler's <inttypes.h>. Do not include it. The use of PRI* makes the code super-ugly. You can simply use "l" for printing uintptr_t, "ll" for u64, and no modifier for u32. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-09-10Remove CONFIG_USE_STDINTMasahiro Yamada
You do not need to use the typedefs provided by compiler. Our compilers are either IPL32 or LP64. Hence, U-Boot can/should always use int-ll64.h typedefs like Linux kernel, whatever the typedefs the compiler internally uses. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-09-10sandbox: Add serial testPatrice Chotard
Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-08-24Merge branch 'master' of git://git.denx.de/u-boot-usbTom Rini
2018-08-24dm: test: Fix typo in test-main commentMichal Simek
Trivial fix. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-08-21cmd: Add bind/unbind commands to bind a device to a driver from the command lineJean-Jacques Hiblot
In some cases it can be useful to be able to bind a device to a driver from the command line. The obvious example is for versatile devices such as USB gadget. Another use case is when the devices are not yet ready at startup and require some setup before the drivers are bound (ex: FPGA which bitsream is fetched from a mass storage or ethernet) usage example: bind usb_dev_generic 0 usb_ether unbind usb_dev_generic 0 usb_ether or unbind eth 1 bind /ocp/omap_dwc3@48380000/usb@48390000 usb_ether unbind /ocp/omap_dwc3@48380000/usb@48390000 Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
2018-08-11Merge branch 'agust@denx.de' of git://git.denx.de/u-boot-stagingTom Rini
2018-08-11Merge branch 'master' of git://git.denx.de/u-boot-videoTom Rini
2018-08-11test: Add tests for misc uclassMario Six
Add a set of tests for the misc uclass. Signed-off-by: Mario Six <mario.six@gdsys.cc> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-08-11test: Add AXI testMario Six
Add tests for the AXI uclass. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Mario Six <mario.six@gdsys.cc>
2018-08-10sandbox: led: use new function to configure default statePatrick Delaunay
Initialize the led with the default state defined in device tree in board_init and solve issue with test for led default state. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2018-08-08test: dm: pci: Add cases for finding PCI capability APIsBin Meng
Add several PCI capability and extended capability ID registers in the swap_case driver, so that we can add test case for dm_pci_find_capability() and dm_pci_find_ext_capability(). Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-08-08test: dm: pci: Add tests for mixed static and dynamic devices on the same busBin Meng
In the Sandbox test configuration, PCI bus#0 only has static devices while bus#1 only has dynamic devices. Create a bus#2 that has both types of devices and test such. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-08-08test: dm: pci: Test driver binding with driver data providedBin Meng
With struct pci_device_id, it's possible to pass a driver data for bound driver to use. This adds a test case for this functionality. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-08-08test: dm: pci: Add tests for configuration space accessBin Meng
So far we missed the testing for PCI configuration space access. This adds tests for it, as well as removing some redundant asserts. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-08-08test: dm: pci: Test more than one PCI host controllerBin Meng
So far there is only one PCI host controller in the sandbox test configuration. This is normally the case for x86, but it can be common on other architectures like ARM/PPC to have more than one PCI host controller in the system. This updates the case to cover such scenario. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>