aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests
diff options
context:
space:
mode:
authorShuah Khan (Samsung OSG) <shuah@kernel.org>2018-10-05 16:17:43 -0600
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-10-09 16:13:42 +0200
commit4b0aaacee51eb6592a03fdefd5ce97558518e291 (patch)
tree110a61f0d56f127a6106b8f37f31d8c4ba7c4c4e /tools/testing/selftests
parentLinux 4.19-rc7 (diff)
downloadlinux-dev-4b0aaacee51eb6592a03fdefd5ce97558518e291.tar.xz
linux-dev-4b0aaacee51eb6592a03fdefd5ce97558518e291.zip
selftests: usbip: add wait after attach and before checking port status
Add sleep between attach and "usbip port" check to make sure status is updated. Running attach and query back shows incorrect status. Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/testing/selftests')
-rwxr-xr-xtools/testing/selftests/drivers/usb/usbip/usbip_test.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/testing/selftests/drivers/usb/usbip/usbip_test.sh b/tools/testing/selftests/drivers/usb/usbip/usbip_test.sh
index a72df93cf1f8..128f0ab24307 100755
--- a/tools/testing/selftests/drivers/usb/usbip/usbip_test.sh
+++ b/tools/testing/selftests/drivers/usb/usbip/usbip_test.sh
@@ -141,6 +141,10 @@ echo "Import devices from localhost - should work"
src/usbip attach -r localhost -b $busid;
echo "=============================================================="
+# Wait for sysfs file to be updated. Without this sleep, usbip port
+# shows no imported devices.
+sleep 3;
+
echo "List imported devices - expect to see imported devices";
src/usbip port;
echo "=============================================================="