u-boot/test/dm
Przemyslaw Marczak 6e0c4880c8 dm: test: Add tests for get/find uclass's device by name
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>
2015-04-22 11:03:16 -06:00
..
.gitignore dm: Add basic tests 2014-03-04 12:15:29 -05:00
bus.c dm: test: bus: Use a local variable to simplify code 2015-04-18 11:11:19 -06:00
cmd_dm.c dm: test: Allow 'dm test' to select a particular test to run 2015-04-18 11:11:30 -06:00
core.c dm: test: Add tests for get/find uclass's device by name 2015-04-22 11:03:16 -06:00
eth.c net: cosmetic: Fix checkpatch.pl failures in net.c 2015-04-18 11:11:35 -06:00
gpio.c dm: gpio: Add better functions to request GPIOs 2015-01-29 17:09:51 -07:00
i2c.c dm: i2c: Add a dm_ prefix to driver model bus speed functions 2015-02-12 10:35:33 -07:00
Kconfig dm: test: Add a Kconfig file 2015-02-12 10:35:34 -07:00
Makefile dm: usb: Add tests for the USB uclass 2015-04-18 11:11:30 -06:00
pci.c dm: pci: Add driver model tests for PCI 2015-04-18 11:11:09 -06:00
sf.c sandbox: Correct ordering of 'sb save' commands 2015-01-14 11:35:43 -05:00
spi.c dm: spi: Move slave details to child platdata 2015-01-29 17:09:56 -07:00
test-dm.sh dm: usb: Add tests for the USB uclass 2015-04-18 11:11:30 -06:00
test-driver.c dm: Allow drivers to be marked 'before relocation' 2014-07-23 14:07:24 +01:00
test-fdt.c dm: core: Allow uclass to set up a device's child before it is probed 2015-01-29 17:09:56 -07:00
test-main.c dm: test: Allow 'dm test' to select a particular test to run 2015-04-18 11:11:30 -06:00
test-uclass.c dm: test: Add tests for device's uclass platform data 2015-04-22 11:03:14 -06:00
test.dts dm: usb: Add tests for the USB uclass 2015-04-18 11:11:30 -06:00
usb.c dm: usb: Add tests for the USB uclass 2015-04-18 11:11:30 -06:00
ut.c dm: Add basic tests 2014-03-04 12:15:29 -05:00