skip bash tests that use multiplexing on Windows with explicit if
This commit is contained in:
parent
0c166db115
commit
afd613528f
|
@ -28,7 +28,7 @@ mux_client() {
|
|||
${SSH} -F $OBJ/ssh_proxy -oControlPath=$MUXPATH somehost "$@"
|
||||
}
|
||||
|
||||
rm -f $OBJ/sshd_proxy.orig
|
||||
rm -f $OBJ/sshd_proxy.orig
|
||||
cp $OBJ/sshd_proxy $OBJ/sshd_proxy.orig
|
||||
|
||||
verbose "no timeout"
|
||||
|
@ -77,43 +77,45 @@ if [ $r -ne 23 ]; then
|
|||
fail "ssh failed"
|
||||
fi
|
||||
|
||||
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
|
||||
if [ "$os" != "windows" ]; then
|
||||
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
|
||||
fi
|
||||
|
||||
# Set up a "slow sftp server" that sleeps before executing the real one.
|
||||
|
|
Loading…
Reference in New Issue