From fcbf2e682cedebdf768dc90273889b1f8d4b2ce4 Mon Sep 17 00:00:00 2001 From: Ingela Anderton Andin Date: Fri, 26 Jun 2015 08:47:38 +0200 Subject: ssh: Use old crypto with newer ssh Many issues with previous process design, causing for instance process leaks, are compleatly gone in the redesigned ssh-3.0 and later. This is a backport of newer ssh design to R15B --- lib/ssh/test/ssh_basic_SUITE.erl | 12 +++++++++++- lib/ssh/test/ssh_sftpd_SUITE.erl | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'lib/ssh/test') diff --git a/lib/ssh/test/ssh_basic_SUITE.erl b/lib/ssh/test/ssh_basic_SUITE.erl index 2ceaa9daa5..6be1346752 100644 --- a/lib/ssh/test/ssh_basic_SUITE.erl +++ b/lib/ssh/test/ssh_basic_SUITE.erl @@ -525,10 +525,11 @@ internal_error(Config) when is_list(Config) -> {Pid, Host, Port} = ssh_test_lib:daemon([{system_dir, SystemDir}, {user_dir, UserDir}, {failfun, fun ssh_test_lib:failfun/2}]), - {error,"Internal error"} = + {error, Error} = ssh:connect(Host, Port, [{silently_accept_hosts, true}, {user_dir, UserDir}, {user_interaction, false}]), + check_error(Error), ssh:stop_daemon(Pid). %%-------------------------------------------------------------------- @@ -571,3 +572,12 @@ basic_test(Config) -> {ok, CM} = ssh:connect(Host, Port, ClientOpts), ok = ssh:close(CM), ssh:stop_daemon(Pid). + +%% Due to timing the error message may or may not be delivered to +%% the "tcp-application" before the socket closed message is recived +check_error("Internal error") -> + ok; +check_error("Connection closed") -> + ok; +check_error(Error) -> + ct:fail(Error). diff --git a/lib/ssh/test/ssh_sftpd_SUITE.erl b/lib/ssh/test/ssh_sftpd_SUITE.erl index 695a7caa7d..eabaca3248 100644 --- a/lib/ssh/test/ssh_sftpd_SUITE.erl +++ b/lib/ssh/test/ssh_sftpd_SUITE.erl @@ -395,7 +395,7 @@ mk_rm_dir(Config) when is_list(Config) -> _/binary>>, _} = mkdir(DirName, Cm, Channel, ReqId), NewReqId = 1, - {ok, <>, _} = mkdir(DirName, Cm, Channel, NewReqId), NewReqId1 = 2, -- cgit v1.2.3