aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2016-01-18 12:01:56 +0100
committerAndreas Schneider <asn@cryptomilk.org>2018-10-05 12:09:45 +0200
commit5a1ebdec9dc74b0a4d21396c5348206c679da7a0 (patch)
tree375d18827d744b43e10a921905ef57be46d0487e
parentbf2a33b21e3fb8143811a1ac4a8eabe2b8441dd2 (diff)
downloadlibssh-5a1ebdec9dc74b0a4d21396c5348206c679da7a0.tar.gz
libssh-5a1ebdec9dc74b0a4d21396c5348206c679da7a0.tar.xz
libssh-5a1ebdec9dc74b0a4d21396c5348206c679da7a0.zip
tests: Wait for sshd to start before connecting
Signed-off-by: Andreas Schneider <asn@cryptomilk.org> (cherry-picked from commit a3557b81)
-rw-r--r--tests/torture.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/torture.c b/tests/torture.c
index f9c9c036..3102d888 100644
--- a/tests/torture.c
+++ b/tests/torture.c
@@ -869,6 +869,9 @@ void torture_setup_sshd_server(void **state)
rc = system(sshd_start_cmd);
assert_return_code(rc, errno);
+ /* Give the process some time to start */
+ usleep(300);
+
setenv("SOCKET_WRAPPER_DEFAULT_IFACE", "21", 1);
unsetenv("UID_WRAPPER_ROOT");
unsetenv("PAM_WRAPPER");