[U-Boot] [PATCH 4/4] test/py: make net test aware of USB and PCI enumeration

Simon Glass sjg at chromium.org
Tue Jan 26 21:00:03 CET 2016


On 26 January 2016 at 11:10, Stephen Warren <swarren at wwwdotorg.org> wrote:
> From: Stephen Warren <swarren at nvidia.com>
>
> The existing net test executes a list of commands supplied by boardenv
> variable env__net_pre_commands. The idea was that boardenv would know
> whether the Ethernet device was attached to USB, PCI, ... and hence was
> the best place to put any commands required to probe the device.
>
> However, this approach doesn't scale well when attempting to use a single
> boardenv across multiple branches of U-Boot, some of which require "pci
> enum" to enumerate PCI and others of which don't, or don't /yet/ simply
> because various upstream changes haven't been merged down.
>
> This patch updates the test to require that the boardenv state which HW
> features are required for Ethernet to work, and lets the test itself map
> that knowledge to the set of commands to execute. Since this mapping is
> part of the test script, which is part of the U-Boot code/branch, this
> approach is more scalable. It also feels cleaner, since again boardenv
> is only providing data, rather than test logic.
>
> Signed-off-by: Stephen Warren <swarren at nvidia.com>
> ---
>  test/py/tests/test_net.py | 28 +++++++++++++++-------------
>  1 file changed, 15 insertions(+), 13 deletions(-)

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


More information about the U-Boot mailing list