26 Apr, 2018

1 commit

  • Commit 286ede6 ("drivers: core: Add translation in live tree case") made
    dev_get_addr always use proper bus translations for addresses read from
    the device tree. But this leads to problems with certain busses, e.g.
    I2C busses, which run into an error during translation, and hence stop
    working.

    It turns out that of_translate_address() and fdt_translate_address()
    stop the address translation with an error when they're asked to
    translate addresses for busses where #size-cells == 0 (comment from
    drivers/core/of_addr.c):

    * Note: We consider that crossing any level with #size-cells == 0 to mean
    * that translation is impossible (that is we are not dealing with a value
    * that can be mapped to a cpu physical address). This is not really specified
    * that way, but this is traditionally the way IBM at least do things

    To fix this case, we check in both the live-tree and non-live tree-case,
    whether the bus of the device whose address is about to be translated
    has size-cell size zero. If this is the case, we just read the address
    as a plain integer and return it, and only apply bus translations if the
    size-cell size if greater than zero.

    Signed-off-by: Mario Six
    Signed-off-by: Martin Fuzzey
    Reported-by: Martin Fuzzey
    Fixes: 286ede6 ("drivers: core: Add translation in live tree case")
    Reviewed-by: Simon Glass

    Mario Six
     

04 Feb, 2018

3 commits


29 Jan, 2018

2 commits

  • When printing '%pD' with a value of NULL we want to output
    ''. But this requires copying to buf. Leave this
    to string16.

    A unit test is supplied which relies on EFI support in the sandbox.

    The development for EFI support in the sandbox is currently in branch
    u-boot-dm/efi-working. The branch lacks commit 6ea8b580f06b ("efi_loader:
    correct DeviceNodeToText for media types"). Ater rebasing the aforementioned
    branch on U-Boot v2018.01 and adding 256060e4257a2 and this patch the test
    is executed successfully.

    Fixes: 256060e4257a2 (vsprintf.c: add EFI device path printing)
    Signed-off-by: Heinrich Schuchardt
    Signed-off-by: Alexander Graf

    Heinrich Schuchardt
     
  • All of these host tools are apparently written for Python2,
    not Python3.

    Use 'python2' in the shebang line according to PEP 394
    (https://www.python.org/dev/peps/pep-0394/).

    Signed-off-by: Masahiro Yamada
    Reviewed-by: Simon Glass

    Masahiro Yamada
     

23 Jan, 2018

1 commit

  • For debugging efi_loader we need the capability to print EFI
    device paths. With this patch we can write:

    debug("device path: %pD", dp);

    A possible output would be

    device path: /MemoryMapped(0x0,0x3ff93a82,0x3ff93a82)

    This enhancement is not available when building without EFI support
    and neither in the SPL nor in the API example.

    A test is provided. It can be executed in the sandbox with command
    ut_print.

    The development for EFI support in the sandbox is currently in
    branch u-boot-dm/efi-working. The branch currently lacks
    commit 6ea8b580f06b ("efi_loader: correct DeviceNodeToText
    for media types"). Ater rebasing the aforementioned branch on
    U-Boot v2018.01 the test is executed successfully.

    Without EFI support in the sandbox the test is simply skipped.

    Suggested-by: Rob Clark
    Signed-off-by: Heinrich Schuchardt
    Reviewed-by: Simon Glass
    Signed-off-by: Alexander Graf

    Heinrich Schuchardt
     

16 Jan, 2018

7 commits


19 Dec, 2017

1 commit


18 Dec, 2017

1 commit


15 Dec, 2017

1 commit


13 Dec, 2017

3 commits

  • This patch extends pmic_bind_children prefix matching. In addition to
    the node name the property regulator-name is used while trying to match
    prefixes. This allows assigning different drivers to regulator nodes
    named regulator@1 and regulator@10 for example.
    I have discarded the idea of using other properties then regulator-name
    as I do not see any benefit in using property compatible or even
    regulator-compatible. Of course I am open to change this if there are
    good reasons to do so.

    Signed-off-by: Felix Brack
    Reviewed-by: Simon Glass

    Felix Brack
     
  • Some QEMUs have a problem with time setup that's why
    sleep test is failing. Introduce env__sleep_accurate
    boardenv variable to have an option to skip sleep test.

    Signed-off-by: Michal Simek
    Reviewed-by: Tom Rini
    Reviewed-by: Stephen Warren

    Michal Simek
     
  • - avoid disturbing 0MiB partition size (in fact < 1MiB)
    - test overlap limit between part1 and part2
    - test gpt write with data with modifier 'M' for MiB

    Signed-off-by: Patrick Delaunay
    Reviewed-by: Stephen Warren

    Patrick Delaunay
     

08 Dec, 2017

2 commits


06 Dec, 2017

1 commit


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

4 commits

  • The u-boot.sym file is scanned to find unit test suites for execution. At
    present it only finds those whose names start with 'dm' or 'env'. This
    code is buried in the bowels of the test code so when adding a new suite
    it is not easy to discover why it is ignored by the test framework.

    There seems to be no need to make this restriction. Drop it.

    Signed-off-by: Simon Glass
    Acked-by: Stephen Warren

    Simon Glass
     
  • At present the test setup is somewhat mixed with the test itself. But if
    the test setup fails (which it should not) then the test is actually
    invalid. Put all the test buffers and sizes in a struct and separate out
    the core code into a function.

    This will make it easier to move the code to use the unit test framework.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • Adjust the code to use the common test-execution function.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • The logic to either iterate through a list of tests or pick a named test
    is common to at lest two test suits. Move this logic into a new function
    and call it from the environment tests.

    Signed-off-by: Simon Glass

    Simon Glass
     

01 Dec, 2017

3 commits


28 Nov, 2017

1 commit


23 Nov, 2017

1 commit


17 Nov, 2017

1 commit

  • It can be useful to record how long tests take; this can help debug slow
    running test systems or track changes in performance over time. Enhance
    the test system to record timestamps while running test:
    - Whenever a new log file section is started.
    - After U-Boot is started and communication has been established.
    - After each host or U-Boot command is executed.

    Signed-off-by: Stephen Warren

    Stephen Warren
     

06 Nov, 2017

1 commit

  • test_gpt generates a persistent disk image which can be re-used across
    multiple test runs. Currently, if the Python code that generates the disk
    image change, the image is not regenerated, which could cause test
    failures e.g. if a test was updated to expect some new partition name or
    size, yet the persistent disk image contained the old name or size. This
    change introduces functionality to regenerate the disk image if the
    instructions to generate the image have changed.

    Signed-off-by: Stephen Warren

    Stephen Warren
     

24 Oct, 2017

5 commits