summaryrefslogtreecommitdiff
path: root/tests (follow)
Commit message (Collapse)AuthorAgeFilesLines
* channel-func.c (guile_ssh_channel_open_forward): Log warningsArtyom V. Poptsov2017-05-231-0/+15
| | | | | | | * libguile-ssh/channel-func.c (guile_ssh_channel_open_forward): Log a warning if a forwarding channel could not be open. * tests/tunnel.scm ("port forwarding, direct, disconnected session"): New test case.
* channel-func.c (guile_ssh_channel_get_exit_status): Handle freed channelsArtyom V. Poptsov2017-05-222-8/+46
| | | | | | | | | | | | | | * libguile-ssh/channel-func.c (guile_ssh_channel_get_exit_status): Throw 'wrong-type-arg' if a freed channel is passed as an argument. * libguile-ssh/channel-type.h (GSSH_VALIDATE_OPEN_CHANNEL): Check if a channel is freed. * tests/client-server.scm ("channel-get-exit-status, freed channel"): New test case. * tests/common.scm (test-error-with-log/=): Check error key and message properly. (test-error-with-log): Check an error key. (test-error-with-log/handler): Remove extra rules. * NEWS: Update.
* channel-type.c (print_channel): Bugfix: Handle freed channelsArtyom V. Poptsov2017-05-211-0/+19
| | | | | | | | | | | | Guile-SSH would always crash with SIGSEGV errors when tried to print a freed channel object (e.g. after calling 'close' on a channel). This patch fixes the bug. * libguile-ssh/channel-type.c (print_channel): Bugfix: Handle freed channels properly. * tests/client-server.scm ("channel-request-exec, printing a freed channel"): New test case. * NEWS: Update.
* node.scm (node-guile-version): BugfixArtyom V. Poptsov2017-05-212-0/+29
| | | | | | | | | | | | | | | 'node-guile-version' would always fail due to a wrong call to 'rexec' procedure passing it a node object instead of a session object. This patch fixes the bug. Reported by Mark H Weaver <mhw@netris.org> and Ludovic Courtès <ludo@gnu.org>: <https://bugs.gnu.org/26976> * modules/ssh/dist/node.scm (node-guile-version): Pass node session to a 'rexec' procedure instead of a node object. * tests/common.scm (start-server/exec): Handle node version requests. * tests/dist.scm ("node-guile-version, valid response"): New test case. * NEWS: Update.
* tests/server-client.scm ("message-get-session"): Add additional delaysArtyom V. Poptsov2017-05-091-0/+2
|
* tests/dist.scm ("with-ssh") <server>: Wait before closing a channelArtyom V. Poptsov2017-05-081-0/+1
|
* tests/Makefile.am (CLEANFILES): Add new logsArtyom V. Poptsov2017-05-081-0/+5
|
* tests/sssh-ssshd.scm: Use separate error log fileArtyom V. Poptsov2017-05-081-1/+1
|
* tests/tunnel.scm ("call-with-ssh-forward"): Make TC more robustArtyom V. Poptsov2017-05-081-1/+2
|
* tests/server-client.scm ("message-get-type"): Make TC more robustArtyom V. Poptsov2017-05-081-3/+10
|
* tests/common.scm (start-server-loop): Improve logging and error handlingArtyom V. Poptsov2017-05-081-6/+19
|
* tests/dist.scm ("with-ssh") <server>: Close a channelArtyom V. Poptsov2017-05-081-1/+2
| | | | | * tests/dist.scm ("with-ssh") <server>: Close channel as soon as data sent to the client.
* tests/tunnel.scm: CleanupArtyom V. Poptsov2017-05-081-1/+1
|
* node.scm (rrepl-get-result): Handle unknown # objects properlyArtyom V. Poptsov2017-05-021-0/+9
| | | | | | | | | | | | | | | The procedure would always fail to read unknown objects (e.g. instances of Guile-SSH session) properly, raising an obscure errors like "Unknown # object: #\<". Now the procedure raises 'node-repl-error' with full evaluation result gotten from RREPL. Reported by Mathieu, in <https://github.com/artyom-poptsov/guile-ssh/issues/3> * modules/ssh/dist/node.scm (rrepl-get-result): Handle unknown # objects properly. * tests/dist.scm ("rrepl-get-result, unknown # object error"): New test case. * NEWS: Update
* node.scm (rrepl-get-result): Handle "unbound variable" errorsArtyom V. Poptsov2017-04-301-0/+13
| | | | | | | | | | | | | | The procedure would always fail to read "unbound variable" errors properly, returning wrong result with only two values (current module name and current language name). Now this bug should be fixed. Reported by Mathieu, in <https://github.com/artyom-poptsov/guile-ssh/issues/3> * modules/ssh/dist/node.scm (rrepl-get-result): Handle "unbound variable" errors. * tests/dist.scm ("rrepl-get-result, unbound variable error"): New test case. * AUTHORS, NEWS: Update.
* tests/tunnel.scm ("call-with-ssh-forward"): Wait for 1s before pollingArtyom V. Poptsov2017-04-231-0/+1
| | | | | | * tests/tunnel.scm ("call-with-ssh-forward"): Wait for 1s before polling to prevent errors (yes, that's a dirty hack but it works for me... most of the time.)
* Merge branch 'master' into ludo-guile2.2Artyom V. Poptsov2017-04-231-7/+20
|\
| * node.scm (rrepl-get-result): Bugfix: Handle compilation errorsArtyom V. Poptsov2017-04-231-7/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Guile-SSH would always fail to read compilation errors properly because it considered the message as "undefined" result. Now this bug should be fixed. An example of an error that now should be handled is "no code for module" due to using a non-existing module in 'with-ssh' expression. Reported by Mathieu, in <https://github.com/artyom-poptsov/guile-ssh/issues/3> * modules/ssh/dist/node.scm (rrepl-get-result): Bugfix: Do not consider compilation errors as undefined results. (rrepl-eval): Call 'exit' on the remote side to ensure that the remote side closed a channel. * tests/dist.scm: Improve logging. ("rrepl-get-result, compilation error"): New TC. * doc/guile-ssh.texi (Acknowledgments): Update. * AUTHORS, NEWS, THANKS: Update.
* | build: Allow VPATH builds.Ludovic Courtès2017-04-232-2/+4
| | | | | | | | | | | | | | | | | | | | | | This fixes builds where $(builddir) != $(srcdir). * examples/Makefile.am (.in): Use $(MKDIR_P) to make the target's parent directories. * tests/common.scm (%topbuilddir): New variable. * tests/sssh-ssshd.scm (*ssshd-cmd*, *sssh-cmd*): Use it instead of %TOPDIR. Signed-off-by: Artyom V. Poptsov <poptsov.artyom@gmail.com>
* | tests: Use 'inet-ntop' instead of 'inet-ntoa'.Ludovic Courtès2017-04-231-1/+1
|/ | | | | | | * tests/sssh-ssshd.scm (*sssh-cmd*): Use 'inet-ntop' instead of the deprecated 'inet-ntoa'. Signed-off-by: Artyom V. Poptsov <poptsov.artyom@gmail.com>
* tests/server-client.scm ("message-get-type"): Wait for a sessionArtyom V. Poptsov2017-01-041-3/+3
| | | | | * tests/server-client.scm ("message-get-type"): Wait for a session to be connected on the client side.
* tests/dist.scm ("with-ssh"): Wait for the client processArtyom V. Poptsov2017-01-041-2/+2
| | | | | * tests/dist.scm ("with-ssh"): Wait for the client process to read the response.
* tests/shell.scm ("pgrep"): New TCArtyom V. Poptsov2017-01-041-0/+12
| | | | * tests/shell.scm ("pgrep"): New test case.
* tests/shell.scm ("loadavg"): New TCArtyom V. Poptsov2017-01-022-0/+14
| | | | | * tests/shell.scm ("loadavg"): New TC. * tests/common.scm (start-server/exec): Handle "loadavg" request.
* tests/shell.scm ("command-available?"): New TCArtyom V. Poptsov2017-01-011-0/+8
| | | | * tests/shell.scm ("command-available?"): New TC
* tests/common.scm (start-server/exec): Close output pipeArtyom V. Poptsov2017-01-011-0/+1
|
* tests/shell.scm ("fallback-pgrep"): New TCArtyom V. Poptsov2017-01-012-0/+19
| | | | | * tests/shell.scm ("fallback-pgrep"): New TC. * tests/common.scm (start-server/exec): Handle 'fallback-pgrep' request.
* tests/shell.scm: Update copyright datesArtyom V. Poptsov2017-01-011-1/+1
|
* tests/shell.scm ("which"): New TCArtyom V. Poptsov2017-01-012-0/+16
| | | | | | * tests/shell.scm ("which"): New TC. * tests/common.scm (start-server/exec): Echo the received command back by default.
* tests/shell.scm: Add to the repositoryArtyom V. Poptsov2016-12-312-0/+66
| | | | | * tests/shell.scm: Add to the repository. * tests/Makefile.am (SCM_TESTS): Add 'shell.scm'.
* tests/common.scm: (start-server/exec): Send EOF after responseArtyom V. Poptsov2016-12-311-2/+10
| | | | * tests/common.scm: (start-server/exec): Send EOF after response.
* channel.scm: Remove trailing bang from 'channel-send-eof'.Ludovic Courtès2016-11-061-2/+2
| | | | | | | | | | | | | | | | | This procedure merely does I/O without mutating its argument, so it does not deserve the trailing '!' (similar to Scheme's 'write', 'put-bytevector', etc. procedures). * libguile-ssh/channel-func.c (gssh_channel_send_eof_x): Rename to... (gssh_channel_send_eof): ... this. Change Scheme name to '%channel-send-eof'. Adjust caller. * modules/ssh/channel.scm (channel-send-eof!): Rename to... (channel-send-eof): ... this. * tests/client-server.scm ("channel-send-eof!"): Rename to... ("channel-send-eof"): ... this. Adjust accordingly. * doc/api-channels.texi (Channel Management): Adjust accordingly. Signed-off-by: Artyom V. Poptsov <poptsov.artyom@gmail.com>
* channel.scm (channel-send-eof!): New procedureArtyom V. Poptsov2016-10-301-0/+26
| | | | | | | | * modules/ssh/channel.scm (channel-send-eof!): New procedure. * libguile-ssh/channel-func.c (gssh_channel_send_eof_x): New procedure. * doc/api-channels.texi: Add description of 'channel-send-eof!'. * tests/client-server.scm ("channel-send-eof!"): New TC. * doc/version.texi, NEWS: Update.
* tests/Makefile.am (CLEANFILES): Add 'key-*.log' filesArtyom V. Poptsov2016-08-191-0/+2
|
* tests/key.scm ("string->public-key, RSA, gc test"): New TCArtyom V. Poptsov2016-08-192-0/+20
| | | | | * tests/key.scm ("string->public-key, RSA, gc test"): New TC. * tests/session.scm ("%make-session, gc test"): New TC.
* libguile-ssh/key-type.c (free_key_smob): Bugfix: Check smob typeArtyom V. Poptsov2016-08-192-8/+9
| | | | | | | | * libguile-ssh/key-type.c (free_key_smob): Bugfix: Check if the smob is already freed, don't try to free it once more. * tests/common.scm (test-begin-with-log): Set log verbosity to the highest level by default. * tests/key.scm: Perform test with logging.
* tests/tunnel.scm ("call-with-ssh-forward"): Use 'poll' procedureArtyom V. Poptsov2016-08-071-1/+3
|
* tests/client-server.scm: Add TCs for 'userauth-public-key/auto!'Artyom V. Poptsov2016-08-071-0/+16
|
* tests/client-server.scm: Improve some TCsArtyom V. Poptsov2016-07-171-64/+68
| | | | | | * tests/client-server.scm (call-with-connected-session/channel-test): New procedure. Use it instead of 'make-session/channel-test'. (make-session/channel-test): Remove.
* tests/tunnel.scm ("call-with-ssh-forward"): Use 'poll'Artyom V. Poptsov2016-07-161-2/+1
| | | | | * tests/tunnel.scm ("call-with-ssh-forward"): Use 'poll' procedure from 'common.scm'.
* tests/tunnel.scm ("port forwarding, direct"): Use 'poll'Artyom V. Poptsov2016-07-161-2/+1
| | | | | * tests/tunnel.scm ("port forwarding, direct"): Use 'poll' procedure from 'common.scm'.
* tests/dist.scm: Update copyright datesArtyom V. Poptsov2016-07-151-1/+1
|
* tests/dist.scm ("with-ssh"): Simplify the client partArtyom V. Poptsov2016-07-151-14/+9
|
* tests/common.scm (call-with-connected-session): Ensure that session is connectedArtyom V. Poptsov2016-07-152-14/+24
| | | | | | * tests/common.scm (call-with-connected-session): Ensure that session is connected. * tests/tunnel.scm ("make-tunnel"): Improve test case: start server process before testing of the client part.
* tests/tunnel.scm: Update copyright datesArtyom V. Poptsov2016-07-041-1/+1
|
* tests/tunnel.scm (call-with-forward-channel): New procArtyom V. Poptsov2016-07-041-15/+18
| | | | | | * tests/tunnel.scm (call-with-forward-channel): New procedure. Use it instead of 'make-channel/pf-test'. ('make-channel/pf-test): Remove.
* tests/tunnel.scm: Use 'test-equal-with-log'Artyom V. Poptsov2016-07-041-13/+13
| | | | * tests/tunnel.scm: Use 'test-equal-with-log' where it is possible.
* tests/tunnel.scm (call-with-connected-session/tunnel): New procArtyom V. Poptsov2016-07-041-51/+52
| | | | | * tests/tunnel.scm (call-with-connected-session/tunnel): New procedure. Use it in the tests.
* tests/common.scm: Don't export internal proceduresArtyom V. Poptsov2016-07-041-3/+0
| | | | | * tests/common.scm (setup-libssh-logging!, setup-error-logging!) (setup-test-suite-logging!): Don't export.
* tests/common.scm (test-begin-with-log): New procedureArtyom V. Poptsov2016-07-049-68/+28
| | | | | | | * tests/common.scm (test-begin-with-log): New procedure. * tests/client-server.scm, tests/common.scm, tests/dist.scm, tests/key.scm, tests/popen.scm, tests/server-client.scm, tests/server.scm, tests/session.scm, tests/tunnel.scm: Use it.