From a3557b81de2b37b021bc048a569045094866c461 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Mon, 18 Jan 2016 12:01:56 +0100 Subject: [PATCH] tests: Wait for sshd to start before connecting Signed-off-by: Andreas Schneider --- tests/torture.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/torture.c b/tests/torture.c index 067dc5d9..6a744bf7 100644 --- a/tests/torture.c +++ b/tests/torture.c @@ -971,6 +971,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");