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

6 commits


17 Oct, 2017

1 commit


10 Oct, 2017

2 commits


09 Oct, 2017

1 commit


06 Oct, 2017

4 commits

  • Coverity scan has identified potential buffer overruns in these tests.
    Correct this by zeroing our buffer and using strncpy not strcpy.

    Reported-by: Coverity (CID: 155462, 155463)
    Cc: Joe Hershberger
    Cc: Simon Glass
    Cc: Bin Meng
    Signed-off-by: Tom Rini
    Reviewed-by: Simon Glass
    Reviewed-by: Joe Hershberger

    Tom Rini
     
  • With the overlay tests now being built in sandbox Coverity has found a
    number of issues in the tests. In short, if malloc ever failed we would
    leak the previous mallocs, so we need to do the usual goto pattern to
    free each in turn. Finally, we always looked at the free()d location to
    see how many tests had failed for the return code.

    Reported-by: Coverity (CID: 167224, 167227, 167230, 167236)
    Signed-off-by: Tom Rini

    Tom Rini
     
  • The previous commit fixed a problem in FAT code where going back to the
    root directory using '..' wouldn't work correctly on FAT12 or FAT16.
    Add a test to exercise this case (which was once fixed in commit
    18a10d46f26 "fat: handle paths that include ../" but reintroduced due to
    the directory iterator refactoring).

    This test only very barely catches the problem - without the fix the
    size command still gives valid output but the additional spurious
    "Invalid FAT entry" error message makes it not get caught in the
    'egrep -A3 ' output. I tried to make a proper test that grows the root
    directory to two clusters lots of with dummy files but that causes the
    write tests to crash the sandbox totally...

    Signed-off-by: Tuomas Tynkkynen
    Reviewed-by: Tom Rini

    Tuomas Tynkkynen
     
  • Currently we can only test FAT32 which is the default FAT version that
    mkfs.vfat creates by default. Instead make it explicitly create either a
    FAT16 or a FAT32 volume. This allows us to exercise more code, for
    instance the root directory handling is done differently in FAT32 than
    the older FATs.

    Adding FAT12 support is a much bigger job since the test creates a 2.5GB
    file and the FAT12 maximum partition size is way smaller than that.

    Signed-off-by: Tuomas Tynkkynen
    Reviewed-by: Tom Rini

    Tuomas Tynkkynen
     

02 Oct, 2017

1 commit


01 Oct, 2017

2 commits

  • Now that we have changed to remove all devices under the root hub in
    usb_stop(), and corrected the USB emulator select logic, it makes no
    sense to do various tests based on 'usb tree' output since the order
    of devices is no longer fixed. Remove these USB test cases related
    to 'usb tree'.

    For the USB remove test, ideally we should remove an emulator device
    node from the device tree, but this is so far not working. Change to
    test the 'usb stop' only.

    Signed-off-by: Bin Meng

    Bin Meng
     
  • Patch queue for efi - 2017-10-01

    Lots of new things this time. High level highlights are:

    - Shim support (to boot Fedora)
    - Initial set of unit tests
    - Preparations to support UEFI Shell

    Tom Rini
     

30 Sep, 2017

4 commits


29 Sep, 2017

2 commits


19 Sep, 2017

1 commit


16 Sep, 2017

2 commits

  • Tom Rini
     
  • Make various changes to the GPT test:

    1) Reference the disk image using an absolute path in all cases. This
    allows test/py to operate correctly if it's run from a directory other
    than the root of the U-Boot source tree.

    2) Store the disk image in the teswt/py persistent data directory. This
    removes the need to re-generate it every time the tests are run.

    3) Execute sgdisk using u_boot_utils.run_and_log() so that its output is
    captured in the test log. This allows debugging any problems running it.

    4) Make the disk image a test fixture. This removes the requirement to
    always run all GPT tests, and run them in order. The current code doesn't
    create the disk image if e.g. just test_gpt_uuid() is executed via the
    test.py -k command-line option.

    5) Use @pytest.mark.buildconfigspec for all feature dependencies, rather
    than manually implementing some of them.

    6) Make all tests depend on sandbox, since they use the sandbox-specific
    host command.

    Fixes: a2f422555fc8 ("add pytests for 'gpt guid' command in sandbox")
    Fixes: c5772188ede9 ("add pytests for 'gpt rename' and 'gpt swap'")
    Signed-off-by: Stephen Warren
    Tested-by: Tom Rini

    Stephen Warren
     

15 Sep, 2017

6 commits


12 Sep, 2017

2 commits

  • This allows to scan the DT including all "clocks" node's sub-nodes
    in which fixed-clock are defined.
    All fixed-clock should be defined inside a clocks node which collect all
    external oscillators. Until now, all clocks sub-nodes can't be binded except
    if the "simple-bus" compatible string is added which is a hack.

    Update test.dts by moving clk_fixed node inside clocks.

    Signed-off-by: Patrice Chotard
    Reviewed-by: Simon Glass
    Reviewed-by: Simon Glass

    Patrice Chotard
     
  • There is an overflow problem when taking the size instead of the number
    of blocks in blk_create_device(). This results in a wrong device size: the
    device apparent size is its real size modulo 4GB.
    Using the number of blocks instead of the device size fixes the problem and
    is more coherent with the internals of the block layer.

    Signed-off-by: Jean-Jacques Hiblot
    Reviewed-by: Simon Glass

    Jean-Jacques Hiblot
     

16 Aug, 2017

2 commits

  • We are now using an env_ prefix for environment functions. Rename these
    two functions for consistency. Also add function comments in common.h.

    Quite a few places use getenv() in a condition context, provoking a
    warning from checkpatch. These are fixed up in this patch also.

    Suggested-by: Wolfgang Denk
    Signed-off-by: Simon Glass

    Simon Glass
     
  • We are now using an env_ prefix for environment functions. Rename setenv()
    for consistency. Also add function comments in common.h.

    Suggested-by: Wolfgang Denk
    Signed-off-by: Simon Glass

    Simon Glass