[U-Boot] [PATCH 2/2] test/py: dfu: error out if USB device already exists
Simon Glass
sjg at chromium.org
Tue Jan 26 20:59:52 CET 2016
On 26 January 2016 at 10:59, Stephen Warren <swarren at wwwdotorg.org> wrote:
> From: Stephen Warren <swarren at nvidia.com>
>
> The DFU test requests U-Boot configure its USB controller in device mode,
> then waits for the host machine to enumerate the USB device and create a
> device node for it. However, this wait can be fooled if the USB device
> node already exists before the test starts, e.g. if some previous software
> stack already configured the USB controller into device mode and never
> de-configured it. This "previous software stack" could even be another
> test/py test, if U-Boot's own USB teardown does not operate correctly. If
> this happens, dfu-util may be run before U-Boot is ready to serve DFU
> commands, which may cause false test failures.
>
> Enhance the dfu test to fail if the device node exists before it is
> expected to.
>
> Signed-off-by: Stephen Warren <swarren at nvidia.com>
> ---
> This patch depends on the previous patch "ARM: tegra: shut down USB
> device controller at boot", so needs to be applied in the same branch.
> Otherwise, test failures will occur.
> ---
> test/py/tests/test_dfu.py | 6 ++++++
> 1 file changed, 6 insertions(+)
Reviewed-by: Simon Glass <sjg at chromium.org>
More information about the U-Boot
mailing list