summaryrefslogtreecommitdiff
path: root/tests (follow)
Commit message (Expand)AuthorAgeFilesLines
* channel-func.c (guile_ssh_channel_open_forward): Log warnings•••* 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. Artyom V. Poptsov2017-05-231-0/+15
* channel-func.c (guile_ssh_channel_get_exit_status): Handle freed channels•••* 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. Artyom V. Poptsov2017-05-222-8/+46
* channel-type.c (print_channel): Bugfix: Handle freed channels•••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. Artyom V. Poptsov2017-05-211-0/+19
* node.scm (node-guile-version): Bugfix•••'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. Artyom V. Poptsov2017-05-212-0/+29
* 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 channel•••* tests/dist.scm ("with-ssh") <server>: Close channel as soon as data sent to the client. Artyom V. Poptsov2017-05-081-1/+2
* tests/tunnel.scm: CleanupArtyom V. Poptsov2017-05-081-1/+1
* node.scm (rrepl-get-result): Handle unknown # objects properly•••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 Artyom V. Poptsov2017-05-021-0/+9
* node.scm (rrepl-get-result): Handle "unbound variable" errors•••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. Artyom V. Poptsov2017-04-301-0/+13
* tests/tunnel.scm ("call-with-ssh-forward"): Wait for 1s before polling•••* 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.) Artyom V. Poptsov2017-04-231-0/+1
* Merge branch 'master' into ludo-guile2.2Artyom V. Poptsov2017-04-231-7/+20
|\
| * node.scm (rrepl-get-result): Bugfix: Handle compilation errors•••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. Artyom V. Poptsov2017-04-231-7/+20
* | build: Allow VPATH builds.•••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> Ludovic Courtès2017-04-232-2/+4
* | tests: Use 'inet-ntop' instead of 'inet-ntoa'.•••* 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> Ludovic Courtès2017-04-231-1/+1
|/
* tests/server-client.scm ("message-get-type"): Wait for a session•••* tests/server-client.scm ("message-get-type"): Wait for a session to be connected on the client side. Artyom V. Poptsov2017-01-041-3/+3
* tests/dist.scm ("with-ssh"): Wait for the client process•••* tests/dist.scm ("with-ssh"): Wait for the client process to read the response. Artyom V. Poptsov2017-01-041-2/+2
* tests/shell.scm ("pgrep"): New TC•••* tests/shell.scm ("pgrep"): New test case. Artyom V. Poptsov2017-01-041-0/+12
* tests/shell.scm ("loadavg"): New TC•••* tests/shell.scm ("loadavg"): New TC. * tests/common.scm (start-server/exec): Handle "loadavg" request. Artyom V. Poptsov2017-01-022-0/+14
* tests/shell.scm ("command-available?"): New TC•••* tests/shell.scm ("command-available?"): New TC Artyom V. Poptsov2017-01-011-0/+8
* tests/common.scm (start-server/exec): Close output pipeArtyom V. Poptsov2017-01-011-0/+1
* tests/shell.scm ("fallback-pgrep"): New TC•••* tests/shell.scm ("fallback-pgrep"): New TC. * tests/common.scm (start-server/exec): Handle 'fallback-pgrep' request. Artyom V. Poptsov2017-01-012-0/+19
* tests/shell.scm: Update copyright datesArtyom V. Poptsov2017-01-011-1/+1
* tests/shell.scm ("which"): New TC•••* tests/shell.scm ("which"): New TC. * tests/common.scm (start-server/exec): Echo the received command back by default. Artyom V. Poptsov2017-01-012-0/+16
* tests/shell.scm: Add to the repository•••* tests/shell.scm: Add to the repository. * tests/Makefile.am (SCM_TESTS): Add 'shell.scm'. Artyom V. Poptsov2016-12-312-0/+66
* tests/common.scm: (start-server/exec): Send EOF after response•••* tests/common.scm: (start-server/exec): Send EOF after response. Artyom V. Poptsov2016-12-311-2/+10
* channel.scm: Remove trailing bang from 'channel-send-eof'.•••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> Ludovic Courtès2016-11-061-2/+2
* channel.scm (channel-send-eof!): New procedure•••* 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. Artyom V. Poptsov2016-10-301-0/+26
* tests/Makefile.am (CLEANFILES): Add 'key-*.log' filesArtyom V. Poptsov2016-08-191-0/+2
* tests/key.scm ("string->public-key, RSA, gc test"): New TC•••* tests/key.scm ("string->public-key, RSA, gc test"): New TC. * tests/session.scm ("%make-session, gc test"): New TC. Artyom V. Poptsov2016-08-192-0/+20
* libguile-ssh/key-type.c (free_key_smob): Bugfix: Check smob type•••* 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. Artyom V. Poptsov2016-08-192-8/+9
* 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 TCs•••* 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. Artyom V. Poptsov2016-07-171-64/+68
* tests/tunnel.scm ("call-with-ssh-forward"): Use 'poll'•••* tests/tunnel.scm ("call-with-ssh-forward"): Use 'poll' procedure from 'common.scm'. Artyom V. Poptsov2016-07-161-2/+1
* tests/tunnel.scm ("port forwarding, direct"): Use 'poll'•••* tests/tunnel.scm ("port forwarding, direct"): Use 'poll' procedure from 'common.scm'. Artyom V. Poptsov2016-07-161-2/+1
* 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 connected•••* 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. Artyom V. Poptsov2016-07-152-14/+24
* tests/tunnel.scm: Update copyright datesArtyom V. Poptsov2016-07-041-1/+1
* tests/tunnel.scm (call-with-forward-channel): New proc•••* tests/tunnel.scm (call-with-forward-channel): New procedure. Use it instead of 'make-channel/pf-test'. ('make-channel/pf-test): Remove. Artyom V. Poptsov2016-07-041-15/+18
* tests/tunnel.scm: Use 'test-equal-with-log'•••* tests/tunnel.scm: Use 'test-equal-with-log' where it is possible. Artyom V. Poptsov2016-07-041-13/+13
* tests/tunnel.scm (call-with-connected-session/tunnel): New proc•••* tests/tunnel.scm (call-with-connected-session/tunnel): New procedure. Use it in the tests. Artyom V. Poptsov2016-07-041-51/+52
* tests/common.scm: Don't export internal procedures•••* tests/common.scm (setup-libssh-logging!, setup-error-logging!) (setup-test-suite-logging!): Don't export. Artyom V. Poptsov2016-07-041-3/+0
* tests/common.scm (test-begin-with-log): New procedure•••* 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. Artyom V. Poptsov2016-07-049-68/+28