tests: Wait for sshd to start before connecting

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>

(cherry-picked from commit a3557b81)
This commit is contained in:
Andreas Schneider
2016-01-18 12:01:56 +01:00
parent bf2a33b21e
commit 5a1ebdec9d

View File

@@ -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");