aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2017-04-25 13:43:56 +0200
committerHans Nilsson <[email protected]>2017-04-26 12:15:06 +0200
commit98fa13854707fc1f4aecb6d2f7bc167f478bdd6f (patch)
tree3de25377ada310700ef31c921ef9a9329c7e07e6 /lib/ssh
parent2e55f44545504aa1ba109e072e6833f5c045b58f (diff)
downloadotp-98fa13854707fc1f4aecb6d2f7bc167f478bdd6f.tar.gz
otp-98fa13854707fc1f4aecb6d2f7bc167f478bdd6f.tar.bz2
otp-98fa13854707fc1f4aecb6d2f7bc167f478bdd6f.zip
ssh: test case adjustments
Diffstat (limited to 'lib/ssh')
-rw-r--r--lib/ssh/test/ssh_basic_SUITE.erl1
-rw-r--r--lib/ssh/test/ssh_protocol_SUITE.erl1
-rw-r--r--lib/ssh/test/ssh_test_lib.erl13
3 files changed, 11 insertions, 4 deletions
diff --git a/lib/ssh/test/ssh_basic_SUITE.erl b/lib/ssh/test/ssh_basic_SUITE.erl
index 089d191fea..34928ab0e9 100644
--- a/lib/ssh/test/ssh_basic_SUITE.erl
+++ b/lib/ssh/test/ssh_basic_SUITE.erl
@@ -651,6 +651,7 @@ exec_key_differs_fail(Config) when is_list(Config) ->
IO = ssh_test_lib:start_io_server(),
ssh_test_lib:start_shell(Port, IO, [{user_dir,UserDir},
+ {recv_ext_info, false},
{preferred_algorithms,[{public_key,['ssh-rsa']}]},
{pref_public_key_algs,['ssh-dss']}]),
receive
diff --git a/lib/ssh/test/ssh_protocol_SUITE.erl b/lib/ssh/test/ssh_protocol_SUITE.erl
index 2c4fa8be88..9e7d1a5fa3 100644
--- a/lib/ssh/test/ssh_protocol_SUITE.erl
+++ b/lib/ssh/test/ssh_protocol_SUITE.erl
@@ -752,6 +752,7 @@ connect_and_kex(Config, InitialState) ->
{cipher,?DEFAULT_CIPHERS}
]},
{silently_accept_hosts, true},
+ {recv_ext_info, false},
{user_dir, user_dir(Config)},
{user_interaction, false}]},
receive_hello,
diff --git a/lib/ssh/test/ssh_test_lib.erl b/lib/ssh/test/ssh_test_lib.erl
index 6186d44890..ab44fc8275 100644
--- a/lib/ssh/test/ssh_test_lib.erl
+++ b/lib/ssh/test/ssh_test_lib.erl
@@ -858,8 +858,9 @@ get_kex_init(Conn) ->
get_kex_init(Conn, Ref, TRef) ->
%% First, validate the key exchange is complete (StateName == connected)
- case sys:get_state(Conn) of
- {{connected,_}, S} ->
+ {State, S} = sys:get_state(Conn),
+ case expected_state(State) of
+ true ->
timer:cancel(TRef),
%% Next, walk through the elements of the #state record looking
%% for the #ssh_msg_kexinit record. This method is robust against
@@ -873,8 +874,8 @@ get_kex_init(Conn, Ref, TRef) ->
KexInit
end;
- {OtherState, S} ->
- ct:log("Not in 'connected' state: ~p",[OtherState]),
+ false ->
+ ct:log("Not in 'connected' state: ~p",[State]),
receive
{reneg_timeout,Ref} ->
ct:log("S = ~p", [S]),
@@ -886,6 +887,10 @@ get_kex_init(Conn, Ref, TRef) ->
end
end.
+expected_state({ext_info,_,_}) -> true;
+expected_state({connected,_}) -> true;
+expected_state(_) -> false.
+
%%%----------------------------------------------------------------
%%% Return a string with N random characters
%%%