aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh/test/ssh_sup_SUITE.erl
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2017-03-29 12:57:23 +0200
committerHans Nilsson <[email protected]>2017-04-07 10:23:40 +0200
commit2f91341ae855b28c82024caa87c7541e94f68a18 (patch)
tree3f05864251d8f9f916bc8565ab49f53054290716 /lib/ssh/test/ssh_sup_SUITE.erl
parenta9fc169d5d0ca63a3062800429e3a16169901ab3 (diff)
downloadotp-2f91341ae855b28c82024caa87c7541e94f68a18.tar.gz
otp-2f91341ae855b28c82024caa87c7541e94f68a18.tar.bz2
otp-2f91341ae855b28c82024caa87c7541e94f68a18.zip
ssh: Make test suites pass
Diffstat (limited to 'lib/ssh/test/ssh_sup_SUITE.erl')
-rw-r--r--lib/ssh/test/ssh_sup_SUITE.erl31
1 files changed, 18 insertions, 13 deletions
diff --git a/lib/ssh/test/ssh_sup_SUITE.erl b/lib/ssh/test/ssh_sup_SUITE.erl
index fdeb8186a5..dd7c4b1473 100644
--- a/lib/ssh/test/ssh_sup_SUITE.erl
+++ b/lib/ssh/test/ssh_sup_SUITE.erl
@@ -137,16 +137,18 @@ sshd_subtree(Config) when is_list(Config) ->
HostIP = proplists:get_value(host_ip, Config),
Port = proplists:get_value(port, Config),
SystemDir = proplists:get_value(data_dir, Config),
- ssh:daemon(HostIP, Port, [{system_dir, SystemDir},
- {failfun, fun ssh_test_lib:failfun/2},
- {user_passwords,
- [{?USER, ?PASSWD}]}]),
+ {ok,Daemon} = ssh:daemon(HostIP, Port, [{system_dir, SystemDir},
+ {failfun, fun ssh_test_lib:failfun/2},
+ {user_passwords,
+ [{?USER, ?PASSWD}]}]),
- ?wait_match([{{server,ssh_system_sup, HostIP, Port, ?DEFAULT_PROFILE},
+ ct:log("Expect HostIP=~p, Port=~p, Daemon=~p",[HostIP,Port,Daemon]),
+ ?wait_match([{{server,ssh_system_sup, ListenIP, Port, ?DEFAULT_PROFILE},
Daemon, supervisor,
[ssh_system_sup]}],
supervisor:which_children(sshd_sup),
- Daemon),
+ [ListenIP,Daemon]),
+ true = ssh_test_lib:match_ip(HostIP, ListenIP),
check_sshd_system_tree(Daemon, Config),
ssh:stop_daemon(HostIP, Port),
ct:sleep(?WAIT_FOR_SHUTDOWN),
@@ -161,16 +163,18 @@ sshd_subtree_profile(Config) when is_list(Config) ->
Profile = proplists:get_value(profile, Config),
SystemDir = proplists:get_value(data_dir, Config),
- {ok, _} = ssh:daemon(HostIP, Port, [{system_dir, SystemDir},
- {failfun, fun ssh_test_lib:failfun/2},
- {user_passwords,
- [{?USER, ?PASSWD}]},
- {profile, Profile}]),
- ?wait_match([{{server,ssh_system_sup, HostIP,Port,Profile},
+ {ok, Daemon} = ssh:daemon(HostIP, Port, [{system_dir, SystemDir},
+ {failfun, fun ssh_test_lib:failfun/2},
+ {user_passwords,
+ [{?USER, ?PASSWD}]},
+ {profile, Profile}]),
+ ct:log("Expect HostIP=~p, Port=~p, Profile=~p, Daemon=~p",[HostIP,Port,Profile,Daemon]),
+ ?wait_match([{{server,ssh_system_sup, ListenIP,Port,Profile},
Daemon, supervisor,
[ssh_system_sup]}],
supervisor:which_children(sshd_sup),
- Daemon),
+ [ListenIP,Daemon]),
+ true = ssh_test_lib:match_ip(HostIP, ListenIP),
check_sshd_system_tree(Daemon, Config),
ssh:stop_daemon(HostIP, Port, Profile),
ct:sleep(?WAIT_FOR_SHUTDOWN),
@@ -310,3 +314,4 @@ acceptor_pid(DaemonPid) ->
receive {Pid, supsearch, L} -> {ok,L}
after 2000 -> timeout
end.
+