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:09:41 +0000 (20:09 -0700)
commit5dde7fc8137b342b67d229edcbf6bccfff732e96
tree2609b3bf71f44de1a170ef9a7816d902a9673b03
parent88d04dcd558ff714b2512540124bdff5953325ef
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