summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorArtyom V. Poptsov <poptsov.artyom@gmail.com>2017-05-23 20:43:22 +0300
committerArtyom V. Poptsov <poptsov.artyom@gmail.com>2017-05-23 20:43:22 +0300
commitc91852f897d74034f1810c142f00baabe9d60c1c (patch)
tree2b1f3f08e64066fd044f0baf8982aec1eca837a1 /tests
parentchannel-type.c (print_channel): Add a check for Guile 2.2 (diff)
downloadguile-ssh-c91852f897d74034f1810c142f00baabe9d60c1c.tar.gz
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.
Diffstat (limited to 'tests')
-rw-r--r--tests/tunnel.scm15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/tunnel.scm b/tests/tunnel.scm
index a5ce933..4a7045a 100644
--- a/tests/tunnel.scm
+++ b/tests/tunnel.scm
@@ -79,6 +79,21 @@
(write-line %test-string channel)
(poll channel read-line))))))))
+(test-error-with-log "port forwarding, direct, disconnected session"
+ (run-client-test
+ ;; server
+ (lambda (server)
+ (start-server/dt-test server
+ (lambda (channel)
+ (write-line (read-line channel) channel))))
+ ;; client
+ (lambda ()
+ (call-with-connected-session/tunnel
+ (lambda (session)
+ (disconnect! session)
+ (call-with-forward-channel session
+ (const #f)))))))
+
;; Create a tunnel, check the result.
(test-assert-with-log "make-tunnel"
(run-client-test