diff options
| author | Ingela Anderton Andin <[email protected]> | 2013-02-25 16:10:55 +0100 | 
|---|---|---|
| committer | Ingela Anderton Andin <[email protected]> | 2013-03-01 14:33:11 +0100 | 
| commit | 15575256bb42255f01d3b32e0a43262a7e69501c (patch) | |
| tree | 5b69f5813dd948db968da1d8d6b4bb52e2bb765a /lib/ssh | |
| parent | 052ec4f26e4bf1c0e648bfd0432b4928f9f73977 (diff) | |
| download | otp-15575256bb42255f01d3b32e0a43262a7e69501c.tar.gz otp-15575256bb42255f01d3b32e0a43262a7e69501c.tar.bz2 otp-15575256bb42255f01d3b32e0a43262a7e69501c.zip  | |
ssh: Ctify test doc
Diffstat (limited to 'lib/ssh')
| -rw-r--r-- | lib/ssh/test/ssh_basic_SUITE.erl | 68 | ||||
| -rw-r--r-- | lib/ssh/test/ssh_connection_SUITE.erl | 22 | ||||
| -rw-r--r-- | lib/ssh/test/ssh_echo_server.erl | 4 | ||||
| -rw-r--r-- | lib/ssh/test/ssh_sftp_SUITE.erl | 68 | ||||
| -rw-r--r-- | lib/ssh/test/ssh_sftpd_SUITE.erl | 65 | ||||
| -rw-r--r-- | lib/ssh/test/ssh_sftpd_erlclient_SUITE.erl | 29 | ||||
| -rw-r--r-- | lib/ssh/test/ssh_to_openssh_SUITE.erl | 42 | 
7 files changed, 147 insertions, 151 deletions
diff --git a/lib/ssh/test/ssh_basic_SUITE.erl b/lib/ssh/test/ssh_basic_SUITE.erl index efcb11f88f..dceec52464 100644 --- a/lib/ssh/test/ssh_basic_SUITE.erl +++ b/lib/ssh/test/ssh_basic_SUITE.erl @@ -1,7 +1,7 @@  %%  %% %CopyrightBegin%  %% -%% Copyright Ericsson AB 2008-2012. All Rights Reserved. +%% Copyright Ericsson AB 2008-2013. All Rights Reserved.  %%  %% The contents of this file are subject to the Erlang Public License,  %% Version 1.1, (the "License"); you may not use this file except in @@ -137,16 +137,16 @@ end_per_testcase(_Config) ->  %%--------------------------------------------------------------------  %% Test Cases --------------------------------------------------------  %%-------------------------------------------------------------------- -app_test(doc) -> -    ["Application consistency test."]; +app_test() -> +    [{doc, "App lication consistency test."}].  app_test(Config) when is_list(Config) ->      ?t:app_test(ssh),      ok.  %%-------------------------------------------------------------------- -misc_ssh_options(doc) -> -    ["Test that we can set some misc options not tested elsewhere, " -     "some options not yet present are not decided if we should support or " -     "if they need thier own test case."]; +misc_ssh_options() -> +    [{doc, "Test that we can set some misc options not tested elsewhere, " +      "some options not yet present are not decided if we should support or " +      "if they need thier own test case."}].  misc_ssh_options(Config) when is_list(Config) ->        SystemDir = filename:join(?config(priv_dir, Config), system),      UserDir = ?config(priv_dir, Config), @@ -163,8 +163,8 @@ misc_ssh_options(Config) when is_list(Config) ->      basic_test([{client_opts, CMiscOpt1 ++ ClientOpts}, {server_opts, SMiscOpt1 ++ ServerOpts}]).  %%-------------------------------------------------------------------- -exec(doc) -> -    ["Test api function ssh_connection:exec"]; +exec() -> +    [{doc, "Test api function ssh_connection:exec"}].  exec(Config) when is_list(Config) ->      process_flag(trap_exit, true),      SystemDir = filename:join(?config(priv_dir, Config), system), @@ -205,8 +205,8 @@ exec(Config) when is_list(Config) ->      ssh:stop_daemon(Pid).  %%-------------------------------------------------------------------- -exec_compressed(doc) -> -    ["Test that compression option works"]; +exec_compressed() -> +    [{doc, "Test that compression option works"}].  exec_compressed(Config) when is_list(Config) ->      process_flag(trap_exit, true),      SystemDir = filename:join(?config(priv_dir, Config), system), @@ -234,8 +234,8 @@ exec_compressed(Config) when is_list(Config) ->      ssh:stop_daemon(Pid).  %%-------------------------------------------------------------------- -idle_time(doc) -> -    ["Idle timeout test"]; +idle_time() -> +    [{doc, "Idle timeout test"}].  idle_time(Config) ->      SystemDir = filename:join(?config(priv_dir, Config), system),      UserDir = ?config(priv_dir, Config), @@ -256,8 +256,8 @@ idle_time(Config) ->      end,      ssh:stop_daemon(Pid).  %%-------------------------------------------------------------------- -rekey(doc) -> -    ["Idle timeout test"]; +rekey() -> +    [{doc, "Idle timeout test"}].  rekey(Config) ->      SystemDir = filename:join(?config(priv_dir, Config), system),      UserDir = ?config(priv_dir, Config), @@ -278,8 +278,8 @@ rekey(Config) ->  	    ssh:stop_daemon(Pid)      end.  %%-------------------------------------------------------------------- -shell(doc) -> -    ["Test that ssh:shell/2 works"]; +shell() -> +    [{doc, "Test that ssh:shell/2 works"}].  shell(Config) when is_list(Config) ->      process_flag(trap_exit, true),      SystemDir = filename:join(?config(priv_dir, Config), system), @@ -300,9 +300,9 @@ shell(Config) when is_list(Config) ->      end.  %%-------------------------------------------------------------------- -daemon_already_started(doc) -> -    ["Test that get correct error message if you try to start a daemon", -    "on an adress that already runs a daemon see also seq10667" ]; +daemon_already_started() -> +    [{doc, "Test that get correct error message if you try to start a daemon", +      "on an adress that already runs a daemon see also seq10667"}].  daemon_already_started(Config) when is_list(Config) ->      SystemDir = ?config(data_dir, Config),      UserDir = ?config(priv_dir, Config), @@ -317,8 +317,8 @@ daemon_already_started(Config) when is_list(Config) ->      ssh:stop_daemon(Pid).  %%-------------------------------------------------------------------- -server_password_option(doc) -> -    ["validate to server that uses the 'password' option"]; +server_password_option() -> +    [{doc, "validate to server that uses the 'password' option"}].  server_password_option(Config) when is_list(Config) ->      PrivDir = ?config(priv_dir, Config),      UserDir = filename:join(PrivDir, nopubkey), % to make sure we don't use public-key-auth @@ -351,8 +351,8 @@ server_password_option(Config) when is_list(Config) ->  %%-------------------------------------------------------------------- -server_userpassword_option(doc) -> -    ["validate to server that uses the 'password' option"]; +server_userpassword_option() -> +    [{doc, "validate to server that uses the 'password' option"}].  server_userpassword_option(Config) when is_list(Config) ->      PrivDir = ?config(priv_dir, Config),      UserDir = filename:join(PrivDir, nopubkey), % to make sure we don't use public-key-auth @@ -387,8 +387,8 @@ server_userpassword_option(Config) when is_list(Config) ->      ssh:stop_daemon(Pid).  %%-------------------------------------------------------------------- -known_hosts(doc) -> -    ["check that known_hosts is updated correctly"]; +known_hosts() -> +    [{doc, "check that known_hosts is updated correctly"}].  known_hosts(Config) when is_list(Config) ->      SystemDir = ?config(data_dir, Config),      PrivDir = ?config(priv_dir, Config),  @@ -414,8 +414,8 @@ known_hosts(Config) when is_list(Config) ->      ssh:stop_daemon(Pid).  %%-------------------------------------------------------------------- -pass_phrase(doc) -> -    ["Test that we can use keyes protected by pass phrases"]; +pass_phrase() -> +    [{doc, "Test that we can use keyes protected by pass phrases"}].  pass_phrase(Config) when is_list(Config) ->      process_flag(trap_exit, true),      SystemDir = filename:join(?config(priv_dir, Config), system), @@ -435,8 +435,8 @@ pass_phrase(Config) when is_list(Config) ->  %%-------------------------------------------------------------------- -internal_error(doc) -> -    ["Test that client does not hang if disconnects due to internal error"]; +internal_error() -> +    [{doc,"Test that client does not hang if disconnects due to internal error"}].  internal_error(Config) when is_list(Config) ->      process_flag(trap_exit, true),      SystemDir = filename:join(?config(priv_dir, Config), system), @@ -452,8 +452,8 @@ internal_error(Config) when is_list(Config) ->      ssh:stop_daemon(Pid).  %%-------------------------------------------------------------------- -send(doc) -> -    ["Test ssh_connection:send/3"]; +send() -> +    [{doc, "Test ssh_connection:send/3"}].  send(Config) when is_list(Config) ->      process_flag(trap_exit, true),      SystemDir = filename:join(?config(priv_dir, Config), system), @@ -473,8 +473,8 @@ send(Config) when is_list(Config) ->  %%-------------------------------------------------------------------- -close(doc) -> -    ["Simulate that we try to close an already closed connection"]; +close() -> +    [{doc, "Simulate that we try to close an already closed connection"}].  close(Config) when is_list(Config) ->      SystemDir = ?config(data_dir, Config),      PrivDir = ?config(priv_dir, Config),  diff --git a/lib/ssh/test/ssh_connection_SUITE.erl b/lib/ssh/test/ssh_connection_SUITE.erl index acaf3d6eeb..6c781e0e91 100644 --- a/lib/ssh/test/ssh_connection_SUITE.erl +++ b/lib/ssh/test/ssh_connection_SUITE.erl @@ -1,7 +1,7 @@  %%  %% %CopyrightBegin%  %% -%% Copyright Ericsson AB 2008-2012. All Rights Reserved. +%% Copyright Ericsson AB 2008-2013. All Rights Reserved.  %%  %% The contents of this file are subject to the Erlang Public License,  %% Version 1.1, (the "License"); you may not use this file except in @@ -82,8 +82,8 @@ end_per_testcase(_Config) ->  %%--------------------------------------------------------------------  %% Test Cases --------------------------------------------------------  %%-------------------------------------------------------------------- -simple_exec(doc) -> -    ["Simple openssh connectivity test for ssh_connection:exec"]; +simple_exec() -> +    [{doc, "Simple openssh connectivity test for ssh_connection:exec"}].  simple_exec(Config) when is_list(Config) ->      ConnectionRef = ssh_test_lib:connect(?SSH_DEFAULT_PORT, [{silently_accept_hosts, true}, @@ -113,8 +113,8 @@ simple_exec(Config) when is_list(Config) ->      end.  %%-------------------------------------------------------------------- -small_cat(doc) -> -    ["Use 'cat' to echo small data block back to us."]; +small_cat() -> +    [{doc, "Use 'cat' to echo small data block back to us."}].  small_cat(Config) when is_list(Config) ->      ConnectionRef = ssh_test_lib:connect(?SSH_DEFAULT_PORT, [{silently_accept_hosts, true}, @@ -148,8 +148,8 @@ small_cat(Config) when is_list(Config) ->      end.  %%-------------------------------------------------------------------- -big_cat(doc) -> -    ["Use 'cat' to echo large data block back to us."]; +big_cat() -> +    [{doc,"Use 'cat' to echo large data block back to us."}].  big_cat(Config) when is_list(Config) ->      ConnectionRef = ssh_test_lib:connect(?SSH_DEFAULT_PORT, [{silently_accept_hosts, true}, @@ -197,8 +197,8 @@ big_cat(Config) when is_list(Config) ->      end.  %%-------------------------------------------------------------------- -send_after_exit(doc) -> -    ["Send channel data after the channel has been closed."]; +send_after_exit() -> +    [{doc, "Send channel data after the channel has been closed."}].  send_after_exit(Config) when is_list(Config) ->      ConnectionRef = ssh_test_lib:connect(?SSH_DEFAULT_PORT, [{silently_accept_hosts, true}, @@ -236,8 +236,8 @@ send_after_exit(Config) when is_list(Config) ->  	    ok      end.  %%-------------------------------------------------------------------- -interrupted_send(doc) -> -    ["Use a subsystem that echos n char and then sends eof to cause a channel exit partway through a large send."]; +interrupted_send() -> +    [{doc, "Use a subsystem that echos n char and then sends eof to cause a channel exit partway through a large send."}].  interrupted_send(Config) when is_list(Config) ->      PrivDir = ?config(priv_dir, Config), diff --git a/lib/ssh/test/ssh_echo_server.erl b/lib/ssh/test/ssh_echo_server.erl index 007b00c373..315ffecfd7 100644 --- a/lib/ssh/test/ssh_echo_server.erl +++ b/lib/ssh/test/ssh_echo_server.erl @@ -1,7 +1,7 @@  %%  %% %CopyrightBegin%  %% -%% Copyright Ericsson AB 2005-2012. All Rights Reserved. +%% Copyright Ericsson AB 2005-2013. All Rights Reserved.  %%  %% The contents of this file are subject to the Erlang Public License,  %% Version 1.1, (the "License"); you may not use this file except in @@ -21,7 +21,7 @@  %%% Description: Example ssh server  -module(ssh_echo_server). --behaviour(ssh_subsytem). +-behaviour(ssh_daemon_channel).  -record(state, {  	  n,  	  id, diff --git a/lib/ssh/test/ssh_sftp_SUITE.erl b/lib/ssh/test/ssh_sftp_SUITE.erl index ac93db8f2e..56b1363b7a 100644 --- a/lib/ssh/test/ssh_sftp_SUITE.erl +++ b/lib/ssh/test/ssh_sftp_SUITE.erl @@ -1,7 +1,7 @@  %%  %% %CopyrightBegin%  %% -%% Copyright Ericsson AB 2005-2012. All Rights Reserved. +%% Copyright Ericsson AB 2005-2013. All Rights Reserved.  %%  %% The contents of this file are subject to the Erlang Public License,  %% Version 1.1, (the "License"); you may not use this file except in @@ -158,8 +158,8 @@ end_per_testcase(Config) ->  %%--------------------------------------------------------------------  %% Test Cases --------------------------------------------------------  %%-------------------------------------------------------------------- -open_close_file(doc) -> -    ["Test API functions open/3 and close/2"]; +open_close_file() -> +    [{doc, "Test API functions open/3 and close/2"}].  open_close_file(Config) when is_list(Config) ->      PrivDir =  ?config(priv_dir, Config),      FileName = filename:join(PrivDir, "sftp.txt"), @@ -178,8 +178,8 @@ open_close_file(Server, File, Mode) ->      ok = ssh_sftp:close(Server, Handle).  %%-------------------------------------------------------------------- -open_close_dir(doc) -> -    ["Test API functions opendir/2 and close/2"]; +open_close_dir() -> +    [{doc, "Test API functions opendir/2 and close/2"}].  open_close_dir(Config) when is_list(Config) ->      PrivDir = ?config(priv_dir, Config),      {Sftp, _} = ?config(sftp, Config), @@ -190,8 +190,8 @@ open_close_dir(Config) when is_list(Config) ->      {error, _} =  ssh_sftp:opendir(Sftp, FileName).  %%-------------------------------------------------------------------- -read_file(doc) -> -    ["Test API funtion read_file/2"]; +read_file() -> +    [{doc, "Test API funtion read_file/2"}].  read_file(Config) when is_list(Config) ->      PrivDir =  ?config(priv_dir, Config),      FileName = filename:join(PrivDir, "sftp.txt"), @@ -200,8 +200,8 @@ read_file(Config) when is_list(Config) ->      {ok, Data} = file:read_file(FileName).  %%-------------------------------------------------------------------- -read_dir(doc) -> -    ["Test API function list_dir/2"]; +read_dir() -> +    [{doc,"Test API function list_dir/2"}].  read_dir(Config) when is_list(Config) ->      PrivDir = ?config(priv_dir, Config),      {Sftp, _} = ?config(sftp, Config), @@ -209,8 +209,8 @@ read_dir(Config) when is_list(Config) ->      ct:pal("sftp list dir: ~p~n", [Files]).  %%-------------------------------------------------------------------- -write_file(doc) -> -    ["Test API function write_file/2"]; +write_file() -> +    [{doc, "Test API function write_file/2"}].  write_file(Config) when is_list(Config) ->      PrivDir =  ?config(priv_dir, Config),      FileName = filename:join(PrivDir, "sftp.txt"), @@ -221,8 +221,8 @@ write_file(Config) when is_list(Config) ->      {ok, Data} = file:read_file(FileName).  %%-------------------------------------------------------------------- -remove_file(doc) -> -    ["Test API function delete/2"]; +remove_file() -> +    [{doc,"Test API function delete/2"}].  remove_file(Config) when is_list(Config) ->      PrivDir =  ?config(priv_dir, Config),      FileName = filename:join(PrivDir, "sftp.txt"), @@ -235,8 +235,8 @@ remove_file(Config) when is_list(Config) ->      false = lists:member(filename:basename(FileName), NewFiles),      {error, _} = ssh_sftp:delete(Sftp, FileName).  %%-------------------------------------------------------------------- -rename_file(doc) -> -    ["Test API function rename_file/2"]; +rename_file() -> +    [{doc, "Test API function rename_file/2"}].  rename_file(Config) when is_list(Config) ->      PrivDir =  ?config(priv_dir, Config),      FileName = filename:join(PrivDir, "sftp.txt"), @@ -255,8 +255,8 @@ rename_file(Config) when is_list(Config) ->      true = lists:member(filename:basename(NewFileName), NewFiles).  %%-------------------------------------------------------------------- -mk_rm_dir(doc) -> -    ["Test API functions make_dir/2, del_dir/2"]; +mk_rm_dir() -> +    [{doc,"Test API functions make_dir/2, del_dir/2"}].  mk_rm_dir(Config) when is_list(Config) ->      PrivDir = ?config(priv_dir, Config),      {Sftp, _} = ?config(sftp, Config), @@ -269,8 +269,8 @@ mk_rm_dir(Config) when is_list(Config) ->      {error, _} = ssh_sftp:del_dir(Sftp, PrivDir).  %%-------------------------------------------------------------------- -links(doc) -> -    ["Tests API function make_symlink/3"]; +links() -> +    [{doc,"Tests API function make_symlink/3"}].  links(Config) when is_list(Config) ->      case os:type() of  	{win32, _} -> @@ -286,8 +286,8 @@ links(Config) when is_list(Config) ->      end.  %%-------------------------------------------------------------------- -retrieve_attributes(doc) -> -    ["Test API function read_file_info/3"]; +retrieve_attributes() -> +    [{doc, "Test API function read_file_info/3"}].  retrieve_attributes(Config) when is_list(Config) ->      PrivDir =  ?config(priv_dir, Config),      FileName = filename:join(PrivDir, "sftp.txt"), @@ -300,8 +300,8 @@ retrieve_attributes(Config) when is_list(Config) ->      ct:pal("SFTP: ~p   FILE: ~p~n", [FileInfo, NewFileInfo]).  %%-------------------------------------------------------------------- -set_attributes(doc) -> -    ["Test API function write_file_info/3"]; +set_attributes() -> +    [{doc,"Test API function write_file_info/3"}].  set_attributes(Config) when is_list(Config) ->      PrivDir =  ?config(priv_dir, Config),      FileName = filename:join(PrivDir, "test.txt"), @@ -316,8 +316,8 @@ set_attributes(Config) when is_list(Config) ->  %%-------------------------------------------------------------------- -async_read(doc) -> -    ["Test API aread/3"]; +async_read() -> +    [{doc,"Test API aread/3"}].  async_read(Config) when is_list(Config) ->      {Sftp, _} = ?config(sftp, Config),      PrivDir =  ?config(priv_dir, Config), @@ -334,8 +334,8 @@ async_read(Config) when is_list(Config) ->  	    ct:fail(Msg)      end.  %%-------------------------------------------------------------------- -async_write(doc) -> -    ["Test API awrite/3"]; +async_write() -> +    [{doc,"Test API awrite/3"}].  async_write(Config) when is_list(Config) ->      {Sftp, _} = ?config(sftp, Config),      PrivDir =  ?config(priv_dir, Config), @@ -353,8 +353,8 @@ async_write(Config) when is_list(Config) ->  %%-------------------------------------------------------------------- -position(doc) -> -    ["Test API functions position/3"]; +position() -> +    [{doc, "Test API functions position/3"}].  position(Config) when is_list(Config) ->      PrivDir =  ?config(priv_dir, Config),      FileName = filename:join(PrivDir, "test.txt"), @@ -383,8 +383,8 @@ position(Config) when is_list(Config) ->      {ok, "2"} = ssh_sftp:read(Sftp, Handle, 1).  %%-------------------------------------------------------------------- -pos_read(doc) -> -    ["Test API functions pread/3 and apread/3"]; +pos_read() -> +    [{doc,"Test API functions pread/3 and apread/3"}].  pos_read(Config) when is_list(Config) ->      PrivDir =  ?config(priv_dir, Config),      FileName = filename:join(PrivDir, "test.txt"), @@ -409,8 +409,8 @@ pos_read(Config) when is_list(Config) ->      {ok, NewData1} = ssh_sftp:pread(Sftp, Handle, {bof, 4}, 4).  %%-------------------------------------------------------------------- -pos_write(doc) -> -    ["Test API functions pwrite/4 and apwrite/4"]; +pos_write() -> +    [{doc,"Test API functions pwrite/4 and apwrite/4"}].  pos_write(Config) when is_list(Config) ->      PrivDir =  ?config(priv_dir, Config),      FileName = filename:join(PrivDir, "test.txt"), @@ -437,7 +437,7 @@ pos_write(Config) when is_list(Config) ->  %%--------------------------------------------------------------------  sftp_nonexistent_subsystem() -> -    [""]. +    [{doc, "Try to execute sftp subsystem on a server that does not support it"}].  sftp_nonexistent_subsystem(Config) when is_list(Config) ->      {_,Host, Port} =  ?config(sftpd, Config),      {error,"server failed to start sftp subsystem"} = diff --git a/lib/ssh/test/ssh_sftpd_SUITE.erl b/lib/ssh/test/ssh_sftpd_SUITE.erl index 5aa46872ee..7b22e45d5e 100644 --- a/lib/ssh/test/ssh_sftpd_SUITE.erl +++ b/lib/ssh/test/ssh_sftpd_SUITE.erl @@ -1,7 +1,7 @@  %%  %% %CopyrightBegin%  %% -%% Copyright Ericsson AB 2006-2012. All Rights Reserved. +%% Copyright Ericsson AB 2006-2013. All Rights Reserved.  %%  %% The contents of this file are subject to the Erlang Public License,  %% Version 1.1, (the "License"); you may not use this file except in @@ -163,8 +163,8 @@ end_per_testcase(_TestCase, Config) ->  %%--------------------------------------------------------------------  %% Test Cases --------------------------------------------------------  %%-------------------------------------------------------------------- -open_close_file(doc) -> -    ["Test SSH_FXP_OPEN and SSH_FXP_CLOSE commands"]; +open_close_file() -> +    [{doc, "Test SSH_FXP_OPEN and SSH_FXP_CLOSE commands"}].  open_close_file(Config) when is_list(Config) ->      PrivDir =  ?config(priv_dir, Config),      FileName = filename:join(PrivDir, "test.txt"), @@ -194,8 +194,8 @@ open_close_file(Config) when is_list(Config) ->  		  ?SSH_FXF_OPEN_EXISTING).  %%-------------------------------------------------------------------- -open_close_dir(doc) -> -    ["Test SSH_FXP_OPENDIR and SSH_FXP_CLOSE commands"]; +open_close_dir() -> +    [{doc,"Test SSH_FXP_OPENDIR and SSH_FXP_CLOSE commands"}].  open_close_dir(Config) when is_list(Config) ->      PrivDir = ?config(priv_dir, Config),      {Cm, Channel} = ?config(sftp, Config), @@ -221,8 +221,8 @@ open_close_dir(Config) when is_list(Config) ->      end.  %%-------------------------------------------------------------------- -read_file(doc) -> -    ["Test SSH_FXP_READ command"]; +read_file() -> +    [{doc, "Test SSH_FXP_READ command"}].  read_file(Config) when is_list(Config) ->      PrivDir =  ?config(priv_dir, Config),      FileName = filename:join(PrivDir, "test.txt"), @@ -244,8 +244,8 @@ read_file(Config) when is_list(Config) ->      {ok, Data} = file:read_file(FileName).  %%-------------------------------------------------------------------- -read_dir(doc) -> -    ["Test SSH_FXP_READDIR command"]; +read_dir() -> +    [{doc,"Test SSH_FXP_READDIR command"}].  read_dir(Config) when is_list(Config) ->      PrivDir = ?config(priv_dir, Config),      {Cm, Channel} = ?config(sftp, Config), @@ -255,8 +255,8 @@ read_dir(Config) when is_list(Config) ->      ok = read_dir(Handle, Cm, Channel, ReqId).  %%-------------------------------------------------------------------- -write_file(doc) -> -    ["Test SSH_FXP_WRITE command"]; +write_file() -> +    [{doc, "Test SSH_FXP_WRITE command"}].  write_file(Config) when is_list(Config) ->      PrivDir =  ?config(priv_dir, Config),      FileName = filename:join(PrivDir, "test.txt"), @@ -279,8 +279,8 @@ write_file(Config) when is_list(Config) ->      {ok, Data} = file:read_file(FileName).  %%-------------------------------------------------------------------- -remove_file(doc) -> -    ["Test SSH_FXP_REMOVE command"]; +remove_file() -> +    [{doc, "Test SSH_FXP_REMOVE command"}].  remove_file(Config) when is_list(Config) ->      PrivDir =  ?config(priv_dir, Config),      FileName = filename:join(PrivDir, "test.txt"), @@ -300,8 +300,8 @@ remove_file(Config) when is_list(Config) ->  	remove(PrivDir, Cm, Channel, NewReqId).  %%-------------------------------------------------------------------- -rename_file(doc) -> -    ["Test SSH_FXP_RENAME command"]; +rename_file() -> +    [{doc, "Test SSH_FXP_RENAME command"}].  rename_file(Config) when is_list(Config) ->      PrivDir =  ?config(priv_dir, Config),      FileName = filename:join(PrivDir, "test.txt"), @@ -337,8 +337,8 @@ rename_file(Config) when is_list(Config) ->  	       ?SSH_FXP_RENAME_ATOMIC).  %%-------------------------------------------------------------------- -mk_rm_dir(doc) -> -    ["Test SSH_FXP_MKDIR and SSH_FXP_RMDIR command"]; +mk_rm_dir() -> +    [{doc, "Test SSH_FXP_MKDIR and SSH_FXP_RMDIR command"}].  mk_rm_dir(Config) when is_list(Config) ->      PrivDir = ?config(priv_dir, Config),      {Cm, Channel} = ?config(sftp, Config), @@ -360,8 +360,8 @@ mk_rm_dir(Config) when is_list(Config) ->  	    _/binary>>, _} = rmdir(DirName, Cm, Channel, NewReqId2).  %%-------------------------------------------------------------------- -real_path(doc) -> -    ["Test SSH_FXP_REALPATH command"]; +real_path() -> +    [{doc, "Test SSH_FXP_REALPATH command"}].  real_path(Config) when is_list(Config) ->      case os:type() of  	{win32, _} -> @@ -388,8 +388,6 @@ real_path(Config) when is_list(Config) ->      end.  %%-------------------------------------------------------------------- -links(doc) -> -    [];  links(Config) when is_list(Config) ->      case os:type() of  	{win32, _} -> @@ -417,8 +415,8 @@ links(Config) when is_list(Config) ->      end.  %%-------------------------------------------------------------------- -retrieve_attributes(doc) -> -    ["Test SSH_FXP_STAT, SSH_FXP_LSTAT AND SSH_FXP_FSTAT commands"]; +retrieve_attributes() -> +    [{"Test SSH_FXP_STAT, SSH_FXP_LSTAT AND SSH_FXP_FSTAT commands"}].  retrieve_attributes(Config) when is_list(Config) ->      PrivDir =  ?config(priv_dir, Config),      FileName = filename:join(PrivDir, "test.txt"), @@ -482,8 +480,8 @@ retrieve_attributes(Config) when is_list(Config) ->  		  end, AttrValues).  %%-------------------------------------------------------------------- -set_attributes(doc) -> -    ["Test SSH_FXP_SETSTAT AND SSH_FXP_FSETSTAT commands"]; +set_attributes() -> +    [{doc, "Test SSH_FXP_SETSTAT AND SSH_FXP_FSETSTAT commands"}].  set_attributes(Config) when is_list(Config) ->      case os:type() of  	{win32, _} -> @@ -540,8 +538,8 @@ set_attributes(Config) when is_list(Config) ->      end.  %%-------------------------------------------------------------------- -ver3_rename(doc) -> -    ["Test that ver3 rename message is handled OTP 6352"]; +ver3_rename() -> +    [{doc, "Test that ver3 rename message is handled OTP 6352"}].  ver3_rename(Config) when is_list(Config) ->      PrivDir =  ?config(priv_dir, Config),      FileName = filename:join(PrivDir, "test.txt"), @@ -554,8 +552,8 @@ ver3_rename(Config) when is_list(Config) ->  	rename(FileName, NewFileName, Cm, Channel, ReqId, 3, 0).  %%-------------------------------------------------------------------- -relpath(doc) -> -    ["Check that realpath works ok seq10670"]; +relpath() -> +    [{doc, "Check that realpath works ok seq10670"}].  relpath(Config) when is_list(Config) ->      ReqId = 0,      {Cm, Channel} = ?config(sftp, Config), @@ -577,8 +575,8 @@ relpath(Config) when is_list(Config) ->      end.  %%-------------------------------------------------------------------- -sshd_read_file(doc) -> -    ["Test SSH_FXP_READ command, using sshd-server"]; +sshd_read_file() -> +    [{doc,"Test SSH_FXP_READ command, using sshd-server"}].  sshd_read_file(Config) when is_list(Config) ->      PrivDir =  ?config(priv_dir, Config),      FileName = filename:join(PrivDir, "test.txt"), @@ -598,8 +596,9 @@ 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() -> +    [{doc, "Test SFTP Version 6"}].  ver6_basic(Config) when is_list(Config) ->      PrivDir =  ?config(priv_dir, Config),      %FileName = filename:join(PrivDir, "test.txt"), diff --git a/lib/ssh/test/ssh_sftpd_erlclient_SUITE.erl b/lib/ssh/test/ssh_sftpd_erlclient_SUITE.erl index 8f722941d4..cc34cc0793 100644 --- a/lib/ssh/test/ssh_sftpd_erlclient_SUITE.erl +++ b/lib/ssh/test/ssh_sftpd_erlclient_SUITE.erl @@ -1,7 +1,7 @@  %%  %% %CopyrightBegin%  %% -%% Copyright Ericsson AB 2007-2012. All Rights Reserved. +%% Copyright Ericsson AB 2007-2013. All Rights Reserved.  %%  %% The contents of this file are subject to the Erlang Public License,  %% Version 1.1, (the "License"); you may not use this file except in @@ -145,9 +145,9 @@ end_per_testcase(_TestCase, Config) ->  %%--------------------------------------------------------------------  %% Test cases starts here. -------------------------------------------  %%-------------------------------------------------------------------- -close_file(doc) -> -    ["Test that sftpd closes its fildescriptors after compleating the " -     "transfer OTP-6350"]; +close_file() -> +    [{doc, "Test that sftpd closes its fildescriptors after compleating the " +     "transfer OTP-6350"}].  close_file(Config) when is_list(Config) ->      DataDir = ?config(data_dir, Config), @@ -165,10 +165,10 @@ close_file(Config) when is_list(Config) ->  %%-------------------------------------------------------------------- -quit(doc) -> -    [" When the sftp client ends the session the " +quit() -> +    [{doc, " When the sftp client ends the session the "       "server will now behave correctly and not leave the " -     "client hanging. OTP-6349"]; +     "client hanging. OTP-6349"}].  quit(Config) when is_list(Config) ->      DataDir = ?config(data_dir, Config), @@ -197,9 +197,9 @@ quit(Config) when is_list(Config) ->  %%-------------------------------------------------------------------- -file_cb(doc) -> -    ["Test that it is possible to change the callback module for" -    " the sftpds filehandling. OTP-6356"]; +file_cb() -> +    [{"Test that it is possible to change the callback module for" +      " the sftpds filehandling. OTP-6356"}].  file_cb(Config) when is_list(Config) ->      DataDir = ?config(data_dir, Config), @@ -245,8 +245,6 @@ file_cb(Config) when is_list(Config) ->      alt_file_handler_check(alt_del_dir).  %%-------------------------------------------------------------------- -root_dir(doc) -> -    [""];  root_dir(Config) when is_list(Config) ->      {Sftp, _} = ?config(sftp, Config),      FileName = "test.txt", @@ -258,16 +256,15 @@ root_dir(Config) when is_list(Config) ->      ct:pal("Listing: ~p~n", [Listing]).  %%-------------------------------------------------------------------- -list_dir_limited(doc) -> -    [""];  list_dir_limited(Config) when is_list(Config) ->      {Sftp, _} = ?config(sftp, Config),      {ok, Listing} =  	ssh_sftp:list_dir(Sftp, "."),      ct:pal("Listing: ~p~n", [Listing]). -ver6_basic(doc) -> -    ["Test some version 6 features"]; +%%-------------------------------------------------------------------- +ver6_basic() -> +    [{doc, "Test some version 6 features"}].  ver6_basic(Config) when is_list(Config) ->      PrivDir =  ?config(priv_dir, Config),      NewDir = filename:join(PrivDir, "testdir2"), diff --git a/lib/ssh/test/ssh_to_openssh_SUITE.erl b/lib/ssh/test/ssh_to_openssh_SUITE.erl index 75e73712f1..8b5343cecc 100644 --- a/lib/ssh/test/ssh_to_openssh_SUITE.erl +++ b/lib/ssh/test/ssh_to_openssh_SUITE.erl @@ -1,7 +1,7 @@  %%  %% %CopyrightBegin%  %% -%% Copyright Ericsson AB 2008-2012. All Rights Reserved. +%% Copyright Ericsson AB 2008-2013. All Rights Reserved.  %%  %% The contents of this file are subject to the Erlang Public License,  %% Version 1.1, (the "License"); you may not use this file except in @@ -101,8 +101,8 @@ end_per_testcase(_TestCase, _Config) ->  %% Test Cases --------------------------------------------------------  %%-------------------------------------------------------------------- -erlang_shell_client_openssh_server(doc) -> -    ["Test that ssh:shell/2 works"]; +erlang_shell_client_openssh_server() -> +    [{doc, "Test that ssh:shell/2 works"}].  erlang_shell_client_openssh_server(Config) when is_list(Config) ->      process_flag(trap_exit, true), @@ -128,8 +128,8 @@ erlang_shell_client_openssh_server(Config) when is_list(Config) ->      end.  %-------------------------------------------------------------------- -erlang_client_openssh_server_exec(doc) -> -    ["Test api function ssh_connection:exec"]; +erlang_client_openssh_server_exec() -> +    [{doc, "Test api function ssh_connection:exec"}].  erlang_client_openssh_server_exec(Config) when is_list(Config) ->      ConnectionRef = ssh_test_lib:connect(?SSH_DEFAULT_PORT, [{silently_accept_hosts, true}, @@ -167,8 +167,8 @@ erlang_client_openssh_server_exec(Config) when is_list(Config) ->      end.  %%-------------------------------------------------------------------- -erlang_client_openssh_server_exec_compressed(doc) -> -    ["Test that compression option works"]; +erlang_client_openssh_server_exec_compressed() -> +    [{doc, "Test that compression option works"}].  erlang_client_openssh_server_exec_compressed(Config) when is_list(Config) ->      ConnectionRef = ssh_test_lib:connect(?SSH_DEFAULT_PORT, [{silently_accept_hosts, true}, @@ -190,8 +190,8 @@ erlang_client_openssh_server_exec_compressed(Config) when is_list(Config) ->      end.  %%-------------------------------------------------------------------- -erlang_server_openssh_client_exec(doc) -> -    ["Test that exec command works."]; +erlang_server_openssh_client_exec() -> +    [{doc, "Test that exec command works."}].  erlang_server_openssh_client_exec(Config) when is_list(Config) ->      SystemDir = ?config(data_dir, Config), @@ -221,8 +221,8 @@ erlang_server_openssh_client_exec(Config) when is_list(Config) ->       ssh:stop_daemon(Pid).  %%-------------------------------------------------------------------- -erlang_server_openssh_client_exec_compressed(doc) -> -    ["Test that exec command works."]; +erlang_server_openssh_client_exec_compressed() -> +    [{doc, "Test that exec command works."}].  erlang_server_openssh_client_exec_compressed(Config) when is_list(Config) ->      SystemDir = ?config(data_dir, Config), @@ -249,8 +249,8 @@ erlang_server_openssh_client_exec_compressed(Config) when is_list(Config) ->      ssh:stop_daemon(Pid).  %%-------------------------------------------------------------------- -erlang_client_openssh_server_setenv(doc) -> -    ["Test api function ssh_connection:setenv"]; +erlang_client_openssh_server_setenv() -> +    [{doc, "Test api function ssh_connection:setenv"}].  erlang_client_openssh_server_setenv(Config) when is_list(Config) ->      ConnectionRef = @@ -292,8 +292,8 @@ erlang_client_openssh_server_setenv(Config) when is_list(Config) ->  %% setenv not meaningfull on erlang ssh daemon!  %%-------------------------------------------------------------------- -erlang_client_openssh_server_publickey_rsa(doc) -> -    ["Validate using rsa publickey."]; +erlang_client_openssh_server_publickey_rsa() -> +    [{doc, "Validate using rsa publickey."}].  erlang_client_openssh_server_publickey_rsa(Config) when is_list(Config) ->      {ok,[[Home]]} = init:get_argument(home),      KeyFile =  filename:join(Home, ".ssh/id_rsa"), @@ -319,8 +319,8 @@ erlang_client_openssh_server_publickey_rsa(Config) when is_list(Config) ->  %%-------------------------------------------------------------------- -erlang_client_openssh_server_publickey_dsa(doc) -> -    ["Validate using dsa publickey."]; +erlang_client_openssh_server_publickey_dsa() -> +    [{doc, "Validate using dsa publickey."}].  erlang_client_openssh_server_publickey_dsa(Config) when is_list(Config) ->      {ok,[[Home]]} = init:get_argument(home),      KeyFile =  filename:join(Home, ".ssh/id_dsa"), @@ -344,8 +344,8 @@ erlang_client_openssh_server_publickey_dsa(Config) when is_list(Config) ->  	    {skip, "no ~/.ssh/id_dsa"}        end.  %%-------------------------------------------------------------------- -erlang_server_openssh_client_pulic_key_dsa(doc) -> -    ["Validate using dsa publickey."]; +erlang_server_openssh_client_pulic_key_dsa() -> +    [{doc, "Validate using dsa publickey."}].  erlang_server_openssh_client_pulic_key_dsa(Config) when is_list(Config) ->      SystemDir = ?config(data_dir, Config),      PrivDir = ?config(priv_dir, Config), @@ -371,8 +371,8 @@ erlang_server_openssh_client_pulic_key_dsa(Config) when is_list(Config) ->       ssh:stop_daemon(Pid).  %%-------------------------------------------------------------------- -erlang_client_openssh_server_password(doc) -> -    ["Test client password option"]; +erlang_client_openssh_server_password() -> +    [{doc, "Test client password option"}].  erlang_client_openssh_server_password(Config) when is_list(Config) ->      %% to make sure we don't public-key-auth      UserDir = ?config(data_dir, Config),  | 
