[openssh-commits] [openssh] 01/01: skip tests that use multiplexing on Windows

git+noreply at mindrot.org git+noreply at mindrot.org
Tue Jan 16 14:41:20 AEDT 2024


This is an automated email from the git hooks/post-receive script.

djm pushed a commit to branch master
in repository openssh.

commit 0d96b1506b2f4757fefa5d1f884d49e96a6fd4c3
Author: Damien Miller <djm at mindrot.org>
Date:   Tue Jan 16 14:40:18 2024 +1100

    skip tests that use multiplexing on Windows
    
    Some tests here use multiplexing, skip these if DISABLE_FD_PASSING
    is set. Should unbreak tests on Windows.
---
 regress/channel-timeout.sh | 68 ++++++++++++++++++++++++----------------------
 1 file changed, 36 insertions(+), 32 deletions(-)

diff --git a/regress/channel-timeout.sh b/regress/channel-timeout.sh
index 4293f017..97708f2a 100644
--- a/regress/channel-timeout.sh
+++ b/regress/channel-timeout.sh
@@ -74,40 +74,44 @@ if [ $r -ne 23 ]; then
 	fail "ssh failed"
 fi
 
-verbose "multiplexed command timeout"
-(cat $OBJ/sshd_proxy.orig ; echo "ChannelTimeout session:command=1") \
-	> $OBJ/sshd_proxy
-open_mux
-mux_client "sleep 5 ; exit 23"
-r=$?
-if [ $r -ne 255 ]; then
-	fail "ssh returned unexpected error code $r"
-fi
-close_mux
+if config_defined DISABLE_FD_PASSING ; then
+	verbose "skipping multiplexing tests"
+else
+	verbose "multiplexed command timeout"
+	(cat $OBJ/sshd_proxy.orig ; echo "ChannelTimeout session:command=1") \
+		> $OBJ/sshd_proxy
+	open_mux
+	mux_client "sleep 5 ; exit 23"
+	r=$?
+	if [ $r -ne 255 ]; then
+		fail "ssh returned unexpected error code $r"
+	fi
+	close_mux
 
-verbose "irrelevant multiplexed command timeout"
-(cat $OBJ/sshd_proxy.orig ; echo "ChannelTimeout session:shell=1") \
-	> $OBJ/sshd_proxy
-open_mux
-mux_client "sleep 5 ; exit 23"
-r=$?
-if [ $r -ne 23 ]; then
-	fail "ssh returned unexpected error code $r"
-fi
-close_mux
+	verbose "irrelevant multiplexed command timeout"
+	(cat $OBJ/sshd_proxy.orig ; echo "ChannelTimeout session:shell=1") \
+		> $OBJ/sshd_proxy
+	open_mux
+	mux_client "sleep 5 ; exit 23"
+	r=$?
+	if [ $r -ne 23 ]; then
+		fail "ssh returned unexpected error code $r"
+	fi
+	close_mux
 
-verbose "global command timeout"
-(cat $OBJ/sshd_proxy.orig ; echo "ChannelTimeout global=10") \
-	> $OBJ/sshd_proxy
-open_mux
-mux_client "sleep 1 ; echo ok ; sleep 1; echo ok; sleep 60; touch $OBJ/finished.1" >/dev/null &
-mux_client "sleep 60 ; touch $OBJ/finished.2" >/dev/null &
-mux_client "sleep 2 ; touch $OBJ/finished.3" >/dev/null &
-wait
-test -f $OBJ/finished.1 && fail "first mux process completed"
-test -f $OBJ/finished.2 && fail "second mux process completed"
-test -f $OBJ/finished.3 || fail "third mux process did not complete"
-close_mux
+	verbose "global command timeout"
+	(cat $OBJ/sshd_proxy.orig ; echo "ChannelTimeout global=10") \
+		> $OBJ/sshd_proxy
+	open_mux
+	mux_client "sleep 1 ; echo ok ; sleep 1; echo ok; sleep 60; touch $OBJ/finished.1" >/dev/null &
+	mux_client "sleep 60 ; touch $OBJ/finished.2" >/dev/null &
+	mux_client "sleep 2 ; touch $OBJ/finished.3" >/dev/null &
+	wait
+	test -f $OBJ/finished.1 && fail "first mux process completed"
+	test -f $OBJ/finished.2 && fail "second mux process completed"
+	test -f $OBJ/finished.3 || fail "third mux process did not complete"
+	close_mux
+fi
 
 # Set up a "slow sftp server" that sleeps before executing the real one.
 cat > $OBJ/slow-sftp-server.sh << _EOF

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list