From c91852f897d74034f1810c142f00baabe9d60c1c Mon Sep 17 00:00:00 2001 From: "Artyom V. Poptsov" Date: Tue, 23 May 2017 20:43:22 +0300 Subject: 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. --- tests/tunnel.scm | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'tests') 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 -- cgit v1.2.3