[U-Boot] [PATCH V3 3/4] dm: test: Add tests for device's uclass platform data

Simon Glass sjg at chromium.org
Thu Apr 9 03:47:07 CEST 2015


On 8 April 2015 at 11:06, Przemyslaw Marczak <p.marczak at samsung.com> wrote:
> 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 at samsung.com>
> Cc: Simon Glass <sjg at chromium.org>
> ---
> Changes V2:
> - update test functions with calls: uclass_find_first/next_device()
>
> Changes V3:
> - none
> ---
>  include/dm/test.h     | 20 +++++++++++++++++++
>  test/dm/core.c        | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++
>  test/dm/test-uclass.c | 11 +++++++++++
>  3 files changed, 86 insertions(+)

Acked-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list