- May 28, 2015
-
-
Karl Apsite authored
Nothing too fancy. A simple test that attmpts to load two loadables and verify that they are properly unpacked in the u-boot sandbox. Signed-off-by:
Karl Apsite <Karl.Apsite@dornerworks.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
- May 21, 2015
-
-
Joe Hershberger authored
The behavior of the env attrs depends on CONFIG_REGEX. Add an additional test if that variable is set. Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Joe Hershberger authored
Add a test of the env_attr_lookup() function. Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Joe Hershberger authored
Add a new "env" subcommand to the ut command. This will run unit tests on the env code. This should be targetable to any device that supports the env features needed for the tests. Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Joe Hershberger authored
Put the driver model for the system back into a good state after completing the DM testing. Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com> Acked-by:
Simon Glass <sjg@chromium.org>
-
Joe Hershberger authored
Make sure that the env gets cleaned up after a test fails so that other tests aren't affected. Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com>
-
Joe Hershberger authored
There's not much point in having a failure count if we always give up on the first failure. Also stop clearing the entire state between tests. Make sure that any failures are still passed out to the command line. Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Joe Hershberger authored
Make all unit tests selectable as a menu of test suites instead of just sitting in the top-level menu individually. Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com> Acked-by:
Simon Glass <sjg@chromium.org>
-
Joe Hershberger authored
Unify the command for running unit tests further by moving the "ut_time" command over to "ut time". Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com>
-
Joe Hershberger authored
Unify the command for running unit tests further by moving the "dm test" command over to "ut dm". Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com> Acked-by:
Simon Glass <sjg@chromium.org>
-
Joe Hershberger authored
Add a command that all other unit tests should be a sub-command of. Also include a command that will run all tests. Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com> Acked-by:
Simon Glass <sjg@chromium.org>
-
Joe Hershberger authored
Separate the ability to define tests and assert status of test functions from the dm tests so they can be used more consistently throughout all tests. Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Joe Hershberger authored
Use a regular expression to apply the default formatting flags for all ethaddr env vars. Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
- May 15, 2015
-
-
Przemyslaw Marczak authored
The file test.dts from driver model test directory, was compiled by call dtc in script: test/dm/test-dm.sh. This doesn't allow for including of dtsi files and using of C preprocessor routines in this dts file. Since the mentioned script builds U-Boot before tests, then moving the test.dts file into sandbox dts directory is reasonable. Signed-off-by:
Przemyslaw Marczak <p.marczak@samsung.com> Acked-by:
Simon Glass <sjg@chromium.org> Tested on sandbox: Tested-by:
Simon Glass <sjg@chromium.org>
-
Przemyslaw Marczak authored
This change adds new file to sandbox driver model test environment. The file is: test/dm/power.c, and it includes tests for PMIC framework, which includes PMIC uclass and REGULATOR uclass. All tests are based od Sandbox PMIC emulated device. Some test constants for this device are defined in the header: include/power/sandbox_pmic.h PMIC tests includes: - pmic get - tests, that pmic_get() returns the requested device - pmic I/O - tests I/O by writing and reading some values to PMIC's registers and then compares, that the write/read values are equal. The regulator tests includes: - Regulator get by devname/platname - Voltage set/get - Current set/get - Enable set/get - Mode set/get - Autoset - List autoset For the regulator 'get' test, the returned device pointers are compared, and their names are also compared to the requested one. Every other test, first sets the given attribute and next try to get it. The test pass, when the set/get values are equal. Signed-off-by:
Przemyslaw Marczak <p.marczak@samsung.com> Acked-by:
Simon Glass <sjg@chromium.org> Tested on sandbox: Tested-by:
Simon Glass <sjg@chromium.org>
-
- May 06, 2015
-
-
Simon Glass authored
Sometimes the time functions are incorrect due to bad time support on a board. Add a unit test which tries to detect this. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
Add some simple tests to verify that the RTC uclass works correctly in U-Boot. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
Sort these aliases to avoid confusion as to what is present. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Joe Hershberger <joe.hershberger@ni.com>
-
Simon Glass authored
At present this driver has a few test features. They are needed for running the driver model unit tests but are confusing and unnecessary if using sandbox at the command line. Add a flag to enable the test mode, and don't enable it by default. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Joe Hershberger authored
Indicate to the emulated sandbox Ethernet driver when we expect a timeout and tell it to leap forward. Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com> Acked-by:
Simon Glass <sjg@chromium.org>
-
- Apr 22, 2015
-
-
Simon Glass authored
We must not clear global_data even in tests, since the ram_buffer (which is used by malloc()) will also be lost, and subsequent tests will fail. Zero only the global_data fields that are required for the test to function. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Joe Hershberger <joe.hershberger@ni.com> Tested-by:
Joe Hershberger <joe.hershberger@ni.com>
-
Przemyslaw Marczak authored
This commit introduces simple tests for functions: - uclass_find_device_by_name() - uclass_get_device_by_name() Tests added by this commit: - Test: dm_test_uclass_devices_find_by_name: for uclass id: UCLASS_TEST_FDT * get uclass's devices by uclass_find_first/next_device() each as 'testdev', * for each returned device, call: uclass_find_device_by_name(), with previously returned device's name as an argument ('testdev->name'). * for the found device ('founddev') check if: * founddev != NULL * testdev == founddev * testdev->name == founddev->name (by strcmp) - Test: dm_test_uclass_devices_get_by_name: for uclass id: UCLASS_TEST_FDT * get uclass's devices by uclass_get_first/next_device() each as 'testdev', * for each returned device, call: uclass_get_device_by_name(), with previously returned device's name as an argument ('testdev->name'). * for the found device ('founddev') check if: * founddev != NULL * founddev is active * testdev == founddev * testdev->name == founddev->name (by strcmp) Signed-off-by:
Przemyslaw Marczak <p.marczak@samsung.com> Cc: Simon Glass <sjg@chromium.org> Acked-by:
Simon Glass <sjg@chromium.org>
-
Przemyslaw Marczak authored
This commit introduces simple tests for functions: - uclass_find_first_device() - uclass_find_next_device() - uclass_first_device() - uclass_next_device() Tests added by this commit: - Test: dm_test_uclass_devices_find: * call uclass_find_first_device(), then check if: (dev != NULL), (ret == 0) * for the rest devices, call uclass_find_next_device() and do the same check - Test: dm_test_uclass_devices_get: * call uclass_first_device(), then check if: -- (dev != NULL), (ret == 0), device_active() * for the rest devices, call uclass_next_device() and do the same check Signed-off-by:
Przemyslaw Marczak <p.marczak@samsung.com> Cc: Simon Glass <sjg@chromium.org> Acked-by:
Simon Glass <sjg@chromium.org>
-
Przemyslaw Marczak authored
This test introduces new test structure type:dm_test_perdev_uc_pdata. The structure consists of three int values only. For the test purposes, three pattern values are defined by enum, starting with TEST_UC_PDATA_INTVAL1. This commit adds two test cases for uclass platform data: - Test: dm_test_autobind_uclass_pdata_alloc - this tests if: * uclass driver sets: .per_device_platdata_auto_alloc_size field * the devices's: dev->uclass_platdata is non-NULL - Test: dm_test_autobind_uclass_pdata_valid - this tests: * if the devices's: dev->uclass_platdata is non-NULL * the structure of type 'dm_test_perdev_uc_pdata' allocated at address pointed by dev->uclass_platdata. Each structure field, should be equal to proper pattern data, starting from .intval1 == TEST_UC_PDATA_INTVAL1. Signed-off-by:
Przemyslaw Marczak <p.marczak@samsung.com> Cc: Simon Glass <sjg@chromium.org> Acked-by:
Simon Glass <sjg@chromium.org>
-
- Apr 18, 2015
-
-
Joe Hershberger authored
Finish eliminating CamelCase from net.c and other failures Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com> Acked-by:
Simon Glass <sjg@chromium.org>
-
Joe Hershberger authored
This patch is simply clean-up to make the IPv4 type that is used match what Linux uses. It also attempts to move all variables that are IP addresses use good naming instead of CamelCase. No functional change. Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com> Acked-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
This adds a simple test for probing and a functional test using the flash stick emulator, which tests a large chunk of the USB stack. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Marek Vasut <marex@denx.de>
-
Simon Glass authored
As well as running all tests, it is useful to be able to run a selected test. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Marek Vasut <marex@denx.de>
-
Simon Glass authored
Neither the hyphen nor the equals sign is needed. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Marek Vasut <marex@denx.de>
-
Simon Glass authored
The uclass pre-probe functions may end up calling back into the device in some circumstances. This can fail if recursion takes place. Adjust the ordering so that we mark the device as active early, then retract this later if needed. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Marek Vasut <marex@denx.de>
-
Simon Glass authored
Adjust this test to avoid repeating the same code too often. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Marek Vasut <marex@denx.de>
-
Joe Hershberger authored
Take a pass at plumbing errors through to the users of the network stack Currently only the start() function errors will be returned from NetLoop(). recv() tends not to have errors, so that is likely not worth adding. send() certainly can return errors, but this patch does not attempt to plumb them yet. halt() is not expected to error. Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Joe Hershberger authored
The effect of the "netretry" env var was recently changed. This test checks that behavior. Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Joe Hershberger authored
Make sure that the ethrotate behavior occurs as expected. Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Joe Hershberger authored
The ethprime env var is used to indicate the starting device if none is specified in ethact. Also support aliases specified in the ethprime var. Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Joe Hershberger authored
Allow network devices to be referred to as "eth0" instead of "eth@12345678" when specified in ethact. Add tests to verify this behavior. Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Joe Hershberger authored
Add a test for the eth uclass using the sandbox eth driver. Verify basic functionality of the network stack / eth uclass by exercising the ping function. Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Joe Hershberger authored
In the case where the arch defines a custom map_sysmem(), make sure that including just mapmem.h is sufficient to have these functions as they are when the arch does not override it. Also split the non-arch specific functions out of common.h Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Joe Hershberger authored
Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com> Acked-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
Add some basic tests to check that things work as expected with sandbox. Signed-off-by:
Simon Glass <sjg@chromium.org>
-