From 6032030a1248514d277f15e0c3d4bed3298f9f8a Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Mon, 21 Mar 2016 15:14:15 +0100 Subject: ssh: Make test case ssh_algorithms_SUITE report unexpected messages --- lib/ssh/test/ssh_algorithms_SUITE.erl | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/ssh/test/ssh_algorithms_SUITE.erl b/lib/ssh/test/ssh_algorithms_SUITE.erl index 256c8c8da3..094c9d406d 100644 --- a/lib/ssh/test/ssh_algorithms_SUITE.erl +++ b/lib/ssh/test/ssh_algorithms_SUITE.erl @@ -233,11 +233,19 @@ sshc_simple_exec(Config) -> ct:log("~p",[Cmd]), SshPort = open_port({spawn, Cmd}, [binary]), Expect = <<"2\n">>, + rcv_expected(SshPort, Expect). + + +rcv_expected(SshPort, Expect) -> receive {SshPort, {data,Expect}} -> ct:log("Got expected ~p from ~p",[Expect,SshPort]), catch port_close(SshPort), - ok + ok; + Other -> + ct:log("Got UNEXPECTED ~p",[Expect]), + rcv_expected(SshPort, Expect) + after ?TIMEOUT -> ct:fail("Did not receive answer") end. -- cgit v1.2.3 From 59f8b16d04ef738097564d3a33cd6f67949a3742 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Tue, 22 Mar 2016 12:23:00 +0100 Subject: ssh: Increase timetrap for GEX --- lib/ssh/test/ssh_algorithms_SUITE.erl | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/ssh/test/ssh_algorithms_SUITE.erl b/lib/ssh/test/ssh_algorithms_SUITE.erl index 094c9d406d..2dc228a3cf 100644 --- a/lib/ssh/test/ssh_algorithms_SUITE.erl +++ b/lib/ssh/test/ssh_algorithms_SUITE.erl @@ -28,7 +28,7 @@ %% Note: This directive should only be used in test suites. -compile(export_all). --define(TIMEOUT, 50000). +-define(TIMEOUT, 10000). %%-------------------------------------------------------------------- %% Common Test interface functions ----------------------------------- @@ -192,7 +192,7 @@ simple_exec_groups_no_match_too_large(Config) -> %%-------------------------------------------------------------------- %% Testing all default groups -simple_exec_groups() -> [{timetrap,{seconds,90}}]. +simple_exec_groups() -> [{timetrap,{seconds,180}}]. simple_exec_groups(Config) -> Sizes = interpolate( public_key:dh_gex_group_sizes() ), @@ -221,8 +221,6 @@ interpolate(Is) -> %%-------------------------------------------------------------------- %% Use the ssh client of the OS to connect -sshc_simple_exec() -> [{timetrap,{seconds,90}}]. - sshc_simple_exec(Config) -> PrivDir = ?config(priv_dir, Config), KnownHosts = filename:join(PrivDir, "known_hosts"), @@ -243,10 +241,11 @@ rcv_expected(SshPort, Expect) -> catch port_close(SshPort), ok; Other -> - ct:log("Got UNEXPECTED ~p",[Expect]), + ct:log("Got UNEXPECTED ~p",[Other]), rcv_expected(SshPort, Expect) after ?TIMEOUT -> + catch port_close(SshPort), ct:fail("Did not receive answer") end. -- cgit v1.2.3 From bedbc46b08fc58c1c907e58c3443a4b0831f7aba Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Thu, 24 Mar 2016 14:39:12 +0100 Subject: ssh: Add logging in testing subsystem --- lib/ssh/test/ssh_echo_server.erl | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/ssh/test/ssh_echo_server.erl b/lib/ssh/test/ssh_echo_server.erl index 96c9aad135..8b6273c3fe 100644 --- a/lib/ssh/test/ssh_echo_server.erl +++ b/lib/ssh/test/ssh_echo_server.erl @@ -31,6 +31,7 @@ -export([init/1, handle_msg/2, handle_ssh_msg/2, terminate/2]). init([N]) -> + ct:pal("Echo server: ~p",[self()]), {ok, #state{n = N}}. handle_msg({ssh_channel_up, ChannelId, ConnectionManager}, State) -> -- cgit v1.2.3