diff options
author | Erlang/OTP <[email protected]> | 2016-10-17 14:20:00 +0200 |
---|---|---|
committer | Erlang/OTP <[email protected]> | 2016-10-17 14:20:00 +0200 |
commit | 8b11cc9cbd8491303a8725e69cc27b185f78dbdf (patch) | |
tree | 0341cb609461b3c69aa71dc085dfb0c158ebe5c3 /lib/ssh/test/ssh_test_lib.erl | |
parent | c1c2149818396bdefe9eff995184f8864f18fca3 (diff) | |
parent | e875ff334a6d6f8db547868e5d57e71c80ff1859 (diff) | |
download | otp-8b11cc9cbd8491303a8725e69cc27b185f78dbdf.tar.gz otp-8b11cc9cbd8491303a8725e69cc27b185f78dbdf.tar.bz2 otp-8b11cc9cbd8491303a8725e69cc27b185f78dbdf.zip |
Merge branch 'hans/ssh/rekey_problem/OTP-13972' into maint-19
* hans/ssh/rekey_problem/OTP-13972:
ssh: fix renegotiation problem
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.erl | 10 |
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), |