06 Feb, 2020

2 commits

  • When writing tests to check the output from commands it is useful to be
    able to check the output line by line using an assertion. Add helper
    macros to support this and to check that there is no unexpected trailing
    data.

    Also some commands produce a dump using print_buffer(). Add a way to check
    that the correct number of bytes are dumped (ignoring the actual
    contents).

    Signed-off-by: Simon Glass

    Simon Glass
     
  • If a test happens to use the same variable as the macro parameter the
    macro does not work as intended. Add an underscore to guard against this.

    Signed-off-by: Simon Glass

    Simon Glass
     

09 Jan, 2020

1 commit


08 Jan, 2020

4 commits

  • Since the ofdata_to_platdata() method can allocate resources, add it as a
    new devres phase.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • Add a driver which does devres allocations so that we can write tests for
    devres.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • The malloc() implementations provides a way of finding out the approximate
    amount of memory that is allocated. Add helper functions to make it easier
    to access this and see changes over time. This is useful for tests that
    want to check if memory has been allocated or freed.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • There is black magic in the file conftest.py that list
    all the test unit. Then, all those test unit are called
    in pytest. This call is done with the end of the name
    (for example checksum if the full name is bloblist_test_checksum).

    The result is that only test for dm are really executed.
    by pytest, all others tests are listed but never executed.

    This behaviour happens because the dm test unit only check
    the end of the name and others tests checks the full name.

    To fix this issue, I've added a prefix to the function
    cmd_ut_category, and this prefix is removed when looking
    for the unit test.

    Signed-off-by: Philippe Reynes
    Tested-by: Heinrich Schuchardt

    Philippe Reynes
     

14 Nov, 2019

1 commit

  • OP-TEE can get supplied with a devicetree and will then insert
    its firmware node and reserved-memory sections into it.
    As this devicetree often is not the one supplied to a later
    loaded kernel, a previous commit added functionality to transfer
    these nodes onto that new devicetree.

    To make sure this functionality stays intact, also add a test
    for the transfer functionality.

    Signed-off-by: Heiko Stuebner
    Reviewed-by: Simon Glass

    Heiko Stuebner
     

28 Oct, 2019

1 commit


09 Feb, 2019

1 commit


26 Nov, 2018

1 commit


29 Sep, 2018

1 commit


24 Sep, 2018

1 commit


31 Aug, 2018

1 commit


20 Jul, 2018

1 commit


07 May, 2018

1 commit

  • When U-Boot started using SPDX tags we were among the early adopters and
    there weren't a lot of other examples to borrow from. So we picked the
    area of the file that usually had a full license text and replaced it
    with an appropriate SPDX-License-Identifier: entry. Since then, the
    Linux Kernel has adopted SPDX tags and they place it as the very first
    line in a file (except where shebangs are used, then it's second line)
    and with slightly different comment styles than us.

    In part due to community overlap, in part due to better tag visibility
    and in part for other minor reasons, switch over to that style.

    This commit changes all instances where we have a single declared
    license in the tag as both the before and after are identical in tag
    contents. There's also a few places where I found we did not have a tag
    and have introduced one.

    Signed-off-by: Tom Rini

    Tom Rini
     

04 Dec, 2017

1 commit

  • Adjust this test to use the unit test framework. Drop the two existing
    commands for running the tests and replace them with a single
    'ut compression' command, with sub-commands.

    Signed-off-by: Simon Glass
    [trini: Continue to have ret = run_test_internal(...) in run_test so ret
    is always initialized]
    Signed-off-by: Tom Rini

    Simon Glass
     

03 Dec, 2017

1 commit


01 Jun, 2017

3 commits


20 Aug, 2016

1 commit

  • This adds a bunch of unit tests for the "fdt apply" command.

    They've all been run successfully in the sandbox. However, as you still
    require an out-of-tree dtc with overlay support, this is disabled by
    default.

    Acked-by: Simon Glass
    Acked-by: Pantelis Antoniou
    Signed-off-by: Maxime Ripard

    Maxime Ripard
     

03 May, 2016

1 commit


22 Jul, 2015

1 commit


21 May, 2015

6 commits