aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh/test
diff options
context:
space:
mode:
authorFredrik Gustafsson <[email protected]>2012-11-27 15:33:47 +0100
committerFredrik Gustafsson <[email protected]>2012-11-27 15:33:47 +0100
commit9971f38968b19ba90e0267b8c7a549fc568d5611 (patch)
tree81da409d5262ddf2ca4525788be60c6be3d08552 /lib/ssh/test
parent2d974c56b23a7544b13f78061850a877316ae938 (diff)
downloadotp-9971f38968b19ba90e0267b8c7a549fc568d5611.tar.gz
otp-9971f38968b19ba90e0267b8c7a549fc568d5611.tar.bz2
otp-9971f38968b19ba90e0267b8c7a549fc568d5611.zip
Basic functionality for sftp ver6 and testcase
Diffstat (limited to 'lib/ssh/test')
-rw-r--r--lib/ssh/test/ssh_sftpd_SUITE.erl18
1 files changed, 16 insertions, 2 deletions
diff --git a/lib/ssh/test/ssh_sftpd_SUITE.erl b/lib/ssh/test/ssh_sftpd_SUITE.erl
index b995eb9f0e..ad4652521f 100644
--- a/lib/ssh/test/ssh_sftpd_SUITE.erl
+++ b/lib/ssh/test/ssh_sftpd_SUITE.erl
@@ -58,7 +58,8 @@ all() ->
links,
ver3_rename,
relpath,
- sshd_read_file].
+ sshd_read_file,
+ ver6_basic].
groups() ->
[].
@@ -128,6 +129,8 @@ init_per_testcase(TestCase, Config) ->
ProtocolVer = case atom_to_list(TestCase) of
"ver3_" ++ _ ->
3;
+ "ver6_" ++ _ ->
+ 6;
_ ->
?SSH_SFTP_PROTOCOL_VERSION
end,
@@ -591,7 +594,18 @@ sshd_read_file(Config) when is_list(Config) ->
read_file(Handle, 100, 0, Cm, Channel, NewReqId),
{ok, Data} = file:read_file(FileName).
-
+ver6_basic(doc) ->
+ ["Test SFTP Version 6"];
+ver6_basic(Config) when is_list(Config) ->
+ PrivDir = ?config(priv_dir, Config),
+ %FileName = filename:join(PrivDir, "test.txt"),
+ {Cm, Channel} = ?config(sftp, Config),
+ ReqId = 0,
+ {ok, <<?SSH_FXP_STATUS, ?UINT32(ReqId), % Ver 6 we have 5
+ ?UINT32(?SSH_FX_FILE_IS_A_DIRECTORY), _/binary>>, _} =
+ open_file(PrivDir, Cm, Channel, ReqId,
+ ?ACE4_READ_DATA bor ?ACE4_READ_ATTRIBUTES,
+ ?SSH_FXF_OPEN_EXISTING).
%%--------------------------------------------------------------------
%% Internal functions ------------------------------------------------
%%--------------------------------------------------------------------