USB: usbtest: add a timeout for scatter-gather tests
authorAlan Stern <stern@rowland.harvard.edu>
Tue, 3 Jun 2014 15:11:34 +0000 (11:11 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 1 Jul 2014 03:01:30 +0000 (20:01 -0700)
commit35a58e89b97b037978ba768bb7b055d1ed61078b
treef897595387bfd527872b0863c3340bcd7c5d40d2
parent43e5e63ffac81183717c0bde818c18d3466fee17
USB: usbtest: add a timeout for scatter-gather tests

commit 32b36eeae6a859670d2939a7d6136cb5e9ed64f8 upstream.

In usbtest, tests 5 - 8 use the scatter-gather library in usbcore
without any sort of timeout.  If there's a problem in the gadget or
host controller being tested, the test can hang.

This patch adds a 10-second timeout to the tests, so that they will
fail gracefully with an ETIMEDOUT error instead of hanging.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Reported-by: Huang Rui <ray.huang@amd.com>
Tested-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/misc/usbtest.c