diff options
author | Hans Nilsson <[email protected]> | 2016-05-25 12:43:29 +0200 |
---|---|---|
committer | Hans Nilsson <[email protected]> | 2016-05-25 12:43:29 +0200 |
commit | 16e733bc6aa83bf0d2c86bcddb63095d9ed0cf3a (patch) | |
tree | ade2727892e6a72f67dfdd2e0a4db3d52f9cbd34 | |
parent | 0941e2148388f8509301da7dc454004923823016 (diff) | |
parent | 5e236d05879260d3a2465dcb4cd6cf044f214161 (diff) | |
download | otp-16e733bc6aa83bf0d2c86bcddb63095d9ed0cf3a.tar.gz otp-16e733bc6aa83bf0d2c86bcddb63095d9ed0cf3a.tar.bz2 otp-16e733bc6aa83bf0d2c86bcddb63095d9ed0cf3a.zip |
Merge branch 'hans/ssh/benchmark_crash'
* hans/ssh/benchmark_crash:
ssh: Benchmark suite timeouts were to short
-rw-r--r-- | lib/ssh/test/ssh_benchmark_SUITE.erl | 19 |
1 files changed, 14 insertions, 5 deletions
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() -> |