aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh/test/ssh_test_lib.erl
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2016-10-17 12:54:06 +0200
committerHans Nilsson <[email protected]>2016-10-17 13:13:21 +0200
commitdff506800fe54de928e430ce8e76f4eeb76100fb (patch)
treef5f394fce78cbf7f9c73c994f23ee0e0d13fa2c1 /lib/ssh/test/ssh_test_lib.erl
parentc1c2149818396bdefe9eff995184f8864f18fca3 (diff)
downloadotp-dff506800fe54de928e430ce8e76f4eeb76100fb.tar.gz
otp-dff506800fe54de928e430ce8e76f4eeb76100fb.tar.bz2
otp-dff506800fe54de928e430ce8e76f4eeb76100fb.zip
ssh: test case for renegotiation with openssh client
Diffstat (limited to 'lib/ssh/test/ssh_test_lib.erl')
-rw-r--r--lib/ssh/test/ssh_test_lib.erl10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/ssh/test/ssh_test_lib.erl b/lib/ssh/test/ssh_test_lib.erl
index c43c6519f9..6fd401d182 100644
--- a/lib/ssh/test/ssh_test_lib.erl
+++ b/lib/ssh/test/ssh_test_lib.erl
@@ -208,6 +208,16 @@ reply(TestCase, Result) ->
rcv_expected(Expect, SshPort, Timeout) ->
receive
+ {SshPort, Recvd} when is_function(Expect) ->
+ case Expect(Recvd) of
+ true ->
+ ct:log("Got expected ~p from ~p",[Recvd,SshPort]),
+ catch port_close(SshPort),
+ rcv_lingering(50);
+ false ->
+ ct:log("Got UNEXPECTED ~p~n",[Recvd]),
+ rcv_expected(Expect, SshPort, Timeout)
+ end;
{SshPort, Expect} ->
ct:log("Got expected ~p from ~p",[Expect,SshPort]),
catch port_close(SshPort),