mirror of git://anongit.mindrot.org/openssh.git
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.
This commit is contained in:
parent
50080fa42f
commit
0d96b1506b
|
@ -74,40 +74,44 @@ if [ $r -ne 23 ]; then
|
||||||
fail "ssh failed"
|
fail "ssh failed"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
verbose "multiplexed command timeout"
|
if config_defined DISABLE_FD_PASSING ; then
|
||||||
(cat $OBJ/sshd_proxy.orig ; echo "ChannelTimeout session:command=1") \
|
verbose "skipping multiplexing tests"
|
||||||
> $OBJ/sshd_proxy
|
else
|
||||||
open_mux
|
verbose "multiplexed command timeout"
|
||||||
mux_client "sleep 5 ; exit 23"
|
(cat $OBJ/sshd_proxy.orig ; echo "ChannelTimeout session:command=1") \
|
||||||
r=$?
|
> $OBJ/sshd_proxy
|
||||||
if [ $r -ne 255 ]; then
|
open_mux
|
||||||
fail "ssh returned unexpected error code $r"
|
mux_client "sleep 5 ; exit 23"
|
||||||
fi
|
r=$?
|
||||||
close_mux
|
if [ $r -ne 255 ]; then
|
||||||
|
fail "ssh returned unexpected error code $r"
|
||||||
|
fi
|
||||||
|
close_mux
|
||||||
|
|
||||||
verbose "irrelevant multiplexed command timeout"
|
verbose "irrelevant multiplexed command timeout"
|
||||||
(cat $OBJ/sshd_proxy.orig ; echo "ChannelTimeout session:shell=1") \
|
(cat $OBJ/sshd_proxy.orig ; echo "ChannelTimeout session:shell=1") \
|
||||||
> $OBJ/sshd_proxy
|
> $OBJ/sshd_proxy
|
||||||
open_mux
|
open_mux
|
||||||
mux_client "sleep 5 ; exit 23"
|
mux_client "sleep 5 ; exit 23"
|
||||||
r=$?
|
r=$?
|
||||||
if [ $r -ne 23 ]; then
|
if [ $r -ne 23 ]; then
|
||||||
fail "ssh returned unexpected error code $r"
|
fail "ssh returned unexpected error code $r"
|
||||||
fi
|
fi
|
||||||
close_mux
|
close_mux
|
||||||
|
|
||||||
verbose "global command timeout"
|
verbose "global command timeout"
|
||||||
(cat $OBJ/sshd_proxy.orig ; echo "ChannelTimeout global=10") \
|
(cat $OBJ/sshd_proxy.orig ; echo "ChannelTimeout global=10") \
|
||||||
> $OBJ/sshd_proxy
|
> $OBJ/sshd_proxy
|
||||||
open_mux
|
open_mux
|
||||||
mux_client "sleep 1 ; echo ok ; sleep 1; echo ok; sleep 60; touch $OBJ/finished.1" >/dev/null &
|
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 60 ; touch $OBJ/finished.2" >/dev/null &
|
||||||
mux_client "sleep 2 ; touch $OBJ/finished.3" >/dev/null &
|
mux_client "sleep 2 ; touch $OBJ/finished.3" >/dev/null &
|
||||||
wait
|
wait
|
||||||
test -f $OBJ/finished.1 && fail "first mux process completed"
|
test -f $OBJ/finished.1 && fail "first mux process completed"
|
||||||
test -f $OBJ/finished.2 && fail "second 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"
|
test -f $OBJ/finished.3 || fail "third mux process did not complete"
|
||||||
close_mux
|
close_mux
|
||||||
|
fi
|
||||||
|
|
||||||
# Set up a "slow sftp server" that sleeps before executing the real one.
|
# Set up a "slow sftp server" that sleeps before executing the real one.
|
||||||
cat > $OBJ/slow-sftp-server.sh << _EOF
|
cat > $OBJ/slow-sftp-server.sh << _EOF
|
||||||
|
|
Loading…
Reference in New Issue