04 Jun, 2016

1 commit


28 May, 2016

2 commits

  • For odroid-c2 (arch-meson) for now disable designware eth as meson
    now needs to do some harder GPIO work.

    Signed-off-by: Tom Rini

    Conflicts:
    lib/efi_loader/efi_disk.c

    Modified:
    configs/odroid-c2_defconfig

    Tom Rini
     
  • Large file transfers, flash erasing and more complicated tests
    requires more time to finish. Provide a way to setup specific
    timeout directly in test.

    For example description for 50s test:
    timeout = 50000
    with u_boot_console.temporary_timeout(timeout):
    u_boot_console.run_command(...)

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

    Michal Simek
     

27 May, 2016

3 commits

  • test/py raises an error, if a board has not enabled bdi command

    > pytest.skip('bdinfo command not supported')
    E NameError: global name 'pytest' is not defined

    import pytest in test/py/u_boot_utils.py fixes this.

    Signed-off-by: Heiko Schocher
    Reviewed-by: Stephen Warren

    Heiko Schocher
     
  • This adds a sandbox mailbox implementation (provider), a test client
    device, instantiates them both from Sandbox's DT, and adds a DM test
    that excercises everything.

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

    Stephen Warren
     
  • The current reset API implements a method to reset the entire system.
    In the near future, I'd like to introduce code that implements the device
    tree reset bindings; i.e. the equivalent of the Linux kernel's reset API.
    This controls resets to individual HW blocks or external chips with reset
    signals. It doesn't make sense to merge the two APIs into one since they
    have different semantic purposes. Resolve the naming conflict by renaming
    the existing reset API to sysreset instead, so the new reset API can be
    called just reset.

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

    Stephen Warren
     

17 May, 2016

3 commits


13 May, 2016

1 commit


06 May, 2016

1 commit

  • It can take a while for a host machine to notice that a USB device has
    disconnected, and process the change. At the end of the DFU test, we wait
    up to 10 seconds for this to happen. This change makes the test wait the
    same (up to) 10 seconds at the start of the test for any previously active
    USB device-mode session to be cleaned up. Such as session might have been
    used to download U-Boot into memory for example; this is certainly true
    on my Tegra test systems. This changes should solve the DFU test
    intermittency issues I've been seeing on some Tegra devices.

    Signed-off-by: Stephen Warren

    Stephen Warren
     

25 Apr, 2016

3 commits

  • After concatenation of "dfu_alt_info" variable from "dfu_alt_boot" and
    "dfu_alt_system" it may happen that test and dummy files alt settings
    are different than default 0 and 1.

    This patch provides the ability to set different values for them.

    Signed-off-by: Lukasz Majewski
    Acked-by: Stephen Warren
    ---
    Changes for v3:
    - replace variables declarations with ones read from configuration file
    - remove not necessary str() conversion at DFU host command generation

    Changes for v2:
    - generate "alt_info" automatically
    - use file names as alt settings instead of numerical values
    - extend in-code documentation

    Lukasz Majewski
     
  • By default (on almost all systems) the dfu env variable, which defines
    available alt settings, is named as "dfu_alt_info".

    However on some platforms (i.e. Odroid XU3), the 'dfu_alt_info' is concatenated
    from other variables - namely 'dfu_alt_boot' and 'dfu_alt_system' at run time
    (when one types 'dfu 0 mmc 0' for first time).

    'dfu_alt_boot' describes alt settings which depend on boot medium - for example
    boot loader's LBA sectors which are different on eMMC and SD card because of e.g.
    MBR/GPT.

    'dfu_alt_system' describes board agnostic alt settings - like rootfs, kernel.
    On such system we can only append/modify this env variable.

    Because of the above, we must have way to modify other than "dfu_ale_info"
    variable to perform tests.

    Signed-off-by: Lukasz Majewski
    Acked-by: Stephen Warren
    ---
    Changes for v3:
    - None

    Changes for v2:
    - Rewrite of "alt_info_env_name" variable description
    - Use of get() method on python's dictionary to easily obtain default
    value

    Lukasz Majewski
     
  • This patch replaces hardcoded (i.e. 0 and 1) values passed to dfu_{read|write}
    with variables.

    Signed-off-by: Lukasz Majewski
    Acked-by: Stephen Warren
    ---
    Changes for v3:
    - Replace per module global variables with ones defined inside a function
    Changes for v2:
    - None

    Lukasz Majewski
     

15 Apr, 2016

1 commit

  • LLVM 3.5 noted:
    test/dm/core.c:41:35: warning: unused variable 'test_pdata_pre_reloc' [-Wunused-const-variable]
    static const struct dm_test_pdata test_pdata_pre_reloc = {

    And the correct fix here is that the driver_info_pre_reloc test should
    use the test_pdata_pre_reloc not test_pdata_manual variable

    Cc: Simon Glass
    Signed-off-by: Tom Rini
    Reviewed-by: Simon Glass

    Tom Rini
     

12 Apr, 2016

3 commits


02 Apr, 2016

1 commit


18 Mar, 2016

1 commit


15 Mar, 2016

4 commits

  • The USB subsystem has a few counters that need to be reset since they are
    stored in static variables rather than driver-model data. An example is
    usb_max_devs. Ultimately we should move this data into the USB uclass.

    For now, make sure that USB is reset after each test, so that the counters
    go back to zero.

    Note: this is not a perfect solution: It a USB test fails it will exit
    immediately and leave USB un-reset. The impact here is that it may cause
    subsequence test failures in the same run.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • To ease conversion to driver model, add helper functions which deal with
    calling each block device method. With driver model we can reimplement these
    functions with the same arguments.

    Use inline functions to avoid increasing code size on some boards.

    Signed-off-by: Simon Glass
    Reviewed-by: Bin Meng
    Tested-by: Stephen Warren

    Simon Glass
     
  • The current name is too generic. The function returns a block device based
    on a provided string. Rename it to aid searching and make its purpose
    clearer. Also add a few comments.

    Signed-off-by: Simon Glass
    Reviewed-by: Bin Meng
    Tested-by: Stephen Warren

    Simon Glass
     
  • Use 'struct' instead of a typdef. Also since 'struct block_dev_desc' is long
    and causes 80-column violations, rename it to struct blk_desc.

    Signed-off-by: Simon Glass
    Reviewed-by: Bin Meng
    Tested-by: Stephen Warren

    Simon Glass
     

26 Feb, 2016

5 commits

  • These are working correctly again, so re-enable them.

    Signed-off-by: Simon Glass
    Reviewed-by: Jagan Teki
    Tested-by: Jagan Teki

    Simon Glass
     
  • The awk tool can be confused by return character (ASCII 13) in its input
    since it thinks there is a separate field. These can appear if the terminal
    is in raw mode, perhaps due to a previous U-Boot crash with sandbox. This
    is very confusing. Remove these so that the trace test passes.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • When used with a device tree, sandbox now requires a 'reset' controller. Add
    this to the device trees so that reset works and the tests can complete.

    Signed-off-by: Simon Glass
    Fixes: 5010d98f (sandbox: Use the reset driver to handle reset)

    Simon Glass
     
  • test_hush_if_test.py executes commands that require large values of
    CONFIG_SYS_MAXARGS. Detect cases where the configured value is too low
    and skip those tests.

    Ideally, this would be implemented inside console.run_command(). However,
    the command passed to that function is already a completely formed string,
    and determining its argument count usage would require splitting commands
    at ;, handling quoting to deal with arguments containing spaces, etc. Even
    passing the command as a list wouldn't solve all these issues, since we'd
    still need to split commands on ; and deal with cases like "if test ..."
    which consumes 0 of the argument count.

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

    Stephen Warren
     
  • Sending CTRL-C to QEMU's stdin aborts the process, even if stdin is being
    used as a serial port (at least in the raspi2 machine with "qemu -serial
    stdin"). Avoid sending CTRL-C to U-Boot to prevent it exiting.

    I'd originally used CTRL-C to make sure that if the character used to
    abort autoboot ended up being treated as part of a command as well, it'd
    abort command entry and return the prompt to a known state. However, this
    is not needed, since aborting the autoboot eats the character used to do
    that.

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

    Stephen Warren
     

25 Feb, 2016

2 commits

  • Provide user option to skip SPL signature verification for cases where
    u-boot is build with SPL support but full U-Boot is also verified
    without SPL.

    If you want to support this feature please add env__spl_skipped = True
    to your boardenv configuration file.

    For example Xilinx Zynq is using this feature where the same U-Boot
    binary is checked with SPL and without SPL(with FSBL).

    Signed-off-by: Michal Simek

    Michal Simek
     
  • check for U-Boot SPL signature only if SPL really has a serial output.
    So check if CONFIG_SPL_SERIAL_SUPPORT is active in board config.

    Signed-off-by: Heiko Schocher
    Tested-by: Stephen Warren
    Reviewed-by: Stephen Warren

    Heiko Schocher
     

16 Feb, 2016

7 commits

  • The initial boot of U-Boot happens within the context of the first test
    that needs to access the U-Boot console when there is no existing
    connection. This keeps all activity nestled within test execution, which
    fits well into the pytest model. However, this mingles the U-Boot startup
    logs with the execution of some test(s), which hides find the boundary
    between the two.

    To solve this, wrap the "Starting U-Boot" logic into a separate log
    section. If the user wishes, they can simply collapse this log section
    when viewing the HTML log, to concentrate purely on the test's own
    interaction.

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

    Stephen Warren
     
  • u_boot_console.exec_attach.get_spawn() performs two steps:
    1) Spawn a process to communicate with the serial console.
    2) Reset the board so that U-Boot starts running from scratch.

    Currently, if an exception happens in step (2), no cleanup is performed on
    the process created in step (1). That process stays running and may e.g.
    hold serial port locks, or simply continue to read data from the serial
    port, thus preventing it from reaching any other process that attempts to
    read from the same serial port later. While there is error cleanup code in
    u_boot_console_base.ensure_spawned(), this is not triggered since the
    exception prevents assignment to self.p there, and hence the exception
    handler has no object to operate upon in cleanup_spawn().

    Solve this by enhancing u_boot_console.exec_attach.get_spawn() to clean
    up any objects it has created.

    In theory, u_boot_spawn.Spawn's constructor has a similar issue, so fix
    this too.

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

    Stephen Warren
     
  • Use lists rather than sets to record the status of tests. This causes
    the test summary in the HTML file to be generated in the same order as
    the tests are (or would have been) run. This makes it easier to locate
    the first failed test. The log for this test might have interesting
    first clues re: interaction with the environment (e.g. hardware flashing,
    serial console, ...) and may help tracking down external issues.

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

    Stephen Warren
     
  • The Python ini file parser that's used to parse .config converts all keys
    to lower-case. Hence, all queries against the results must use lower-case.
    Fix u_boot_console.ensure_spawned() to test CONFIG_SPL correctly, or the
    connection will fail for boards that have SPL.

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

    Stephen Warren
     
  • The code replaced pexpect with custom code long ago. Don't import the
    unused module so it doesn't need to be installed.

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

    Stephen Warren
     
  • Add documentation describing the new --gdbserver feature, and some common
    pytest options.

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

    Stephen Warren
     
  • Invoke each "ut"-based unit test as a separate pytest.

    Now that the DM unit test runs under test/py, remove the manual shell
    script that invokes it.

    Signed-off-by: Stephen Warren
    Acked-by: Simon Glass
    Tested-by: Simon Glass # v2, on sandbox

    Stephen Warren
     

10 Feb, 2016

2 commits