From 5e236d05879260d3a2465dcb4cd6cf044f214161 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Wed, 18 May 2016 17:21:31 +0200 Subject: ssh: Benchmark suite timeouts were to short --- lib/ssh/test/ssh_benchmark_SUITE.erl | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'lib/ssh/test') diff --git a/lib/ssh/test/ssh_benchmark_SUITE.erl b/lib/ssh/test/ssh_benchmark_SUITE.erl index d9be1a32b7..5d8c94be73 100644 --- a/lib/ssh/test/ssh_benchmark_SUITE.erl +++ b/lib/ssh/test/ssh_benchmark_SUITE.erl @@ -184,7 +184,7 @@ openssh_client_shell(Config, Options) -> end, Times), ssh:stop_daemon(ServerPid), ok - after 10000 -> + after 60*1000 -> ssh:stop_daemon(ServerPid), exit(SlavePid, kill), {fail, timeout} @@ -215,6 +215,7 @@ openssh_client_sftp(Config, Options) -> {root, SftpSrcDir}])]}, {failfun, fun ssh_test_lib:failfun/2} | Options]), + ct:pal("ServerPid = ~p",[ServerPid]), ct:sleep(500), Cmd = lists:concat(["sftp", " -b -", @@ -231,7 +232,7 @@ openssh_client_sftp(Config, Options) -> end), receive {SlavePid, _ClientResponse} -> - ct:pal("ClientResponse = ~p",[_ClientResponse]), + ct:pal("ClientResponse = ~p~nServerPid = ~p",[_ClientResponse,ServerPid]), {ok, List} = get_trace_list(TracerPid), %%ct:pal("List=~p",[List]), Times = find_times(List, [channel_open_close]), @@ -260,7 +261,7 @@ openssh_client_sftp(Config, Options) -> end, Times), ssh:stop_daemon(ServerPid), ok - after 10000 -> + after 2*60*1000 -> ssh:stop_daemon(ServerPid), exit(SlavePid, kill), {fail, timeout} @@ -445,10 +446,18 @@ increment({Alg,Sz,T},[]) -> %%% API for the traceing %%% get_trace_list(TracerPid) -> + MonRef = monitor(process, TracerPid), TracerPid ! {get_trace_list,self()}, receive - {trace_list,L} -> {ok, pair_events(lists:reverse(L))} - after 5000 -> {error,no_reply} + {trace_list,L} -> + demonitor(MonRef), + {ok, pair_events(lists:reverse(L))}; + {'DOWN', MonRef, process, TracerPid, Info} -> + {error, {tracer_down,Info}} + + after 3*60*1000 -> + demonitor(MonRef), + {error,no_reply} end. erlang_trace() -> -- cgit v1.2.3