From: Shuah Khan (Samsung OSG) Date: Fri, 5 Oct 2018 22:17:43 +0000 (-0600) Subject: selftests: usbip: add wait after attach and before checking port status X-Git-Tag: v4.18.19~305 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d1d394e201f050b1fe5261933d67cb2f3a76c78c;p=thirdparty%2Fkernel%2Fstable.git selftests: usbip: add wait after attach and before checking port status [ Upstream commit 4b0aaacee51eb6592a03fdefd5ce97558518e291 ] 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) Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- diff --git a/tools/testing/selftests/drivers/usb/usbip/usbip_test.sh b/tools/testing/selftests/drivers/usb/usbip/usbip_test.sh index 1893d0f59ad7b..059b7e81b9227 100755 --- a/tools/testing/selftests/drivers/usb/usbip/usbip_test.sh +++ b/tools/testing/selftests/drivers/usb/usbip/usbip_test.sh @@ -143,6 +143,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 "=============================================================="