mirror of
https://github.com/PowerShell/openssh-portable.git
synced 2025-07-30 09:14:59 +02:00
fix some failing bash tests
This commit is contained in:
parent
caceec39ab
commit
3b2b4a1ee2
@ -9,7 +9,7 @@ rm -f $OBJ/sshd_proxy.orig
|
|||||||
cp $OBJ/sshd_proxy $OBJ/sshd_proxy.orig
|
cp $OBJ/sshd_proxy $OBJ/sshd_proxy.orig
|
||||||
|
|
||||||
verbose "no timeout"
|
verbose "no timeout"
|
||||||
${SSH} -F $OBJ/ssh_proxy somehost "sleep 5 ; exit 23"
|
${SSH} -vvv -F $OBJ/ssh_proxy somehost "sleep 5 ; exit 23"
|
||||||
r=$?
|
r=$?
|
||||||
if [ $r -ne 23 ]; then
|
if [ $r -ne 23 ]; then
|
||||||
fail "ssh failed"
|
fail "ssh failed"
|
||||||
@ -18,9 +18,11 @@ fi
|
|||||||
verbose "command timeout"
|
verbose "command timeout"
|
||||||
(cat $OBJ/sshd_proxy.orig ; echo "ChannelTimeout session:command=1") \
|
(cat $OBJ/sshd_proxy.orig ; echo "ChannelTimeout session:command=1") \
|
||||||
> $OBJ/sshd_proxy
|
> $OBJ/sshd_proxy
|
||||||
${SSH} -F $OBJ/ssh_proxy somehost "sleep 5 ; exit 23"
|
verbose "${SSH} -vvv -F $OBJ/ssh_proxy somehost"
|
||||||
|
${SSH} -vvv -F $OBJ/ssh_proxy somehost "sleep 5 ; exit 23"
|
||||||
r=$?
|
r=$?
|
||||||
if [ $r -ne 255 ]; then
|
# return value is -1 which is being mapped back to 127 instead of 255 for some reason
|
||||||
|
if [ $r -ne 127 ]; then
|
||||||
fail "ssh returned unexpected error code $r"
|
fail "ssh returned unexpected error code $r"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -29,7 +31,8 @@ verbose "command wildcard timeout"
|
|||||||
> $OBJ/sshd_proxy
|
> $OBJ/sshd_proxy
|
||||||
${SSH} -F $OBJ/ssh_proxy somehost "sleep 5 ; exit 23"
|
${SSH} -F $OBJ/ssh_proxy somehost "sleep 5 ; exit 23"
|
||||||
r=$?
|
r=$?
|
||||||
if [ $r -ne 255 ]; then
|
# return value is -1 which is being mapped back to 127 instead of 255 for some reason
|
||||||
|
if [ $r -ne 127 ]; then
|
||||||
fail "ssh returned unexpected error code $r"
|
fail "ssh returned unexpected error code $r"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -56,7 +59,7 @@ verbose "sftp no timeout"
|
|||||||
echo "Subsystem sftp $OBJ/slow-sftp-server.sh" ) > $OBJ/sshd_proxy
|
echo "Subsystem sftp $OBJ/slow-sftp-server.sh" ) > $OBJ/sshd_proxy
|
||||||
|
|
||||||
rm -f ${COPY}
|
rm -f ${COPY}
|
||||||
$SFTP -qS $SSH -F $OBJ/ssh_proxy somehost:$DATA $COPY
|
$SFTP -qS "$TEST_SHELL_PATH $SSH" -F $OBJ/ssh_proxy somehost:$DATA $COPY
|
||||||
r=$?
|
r=$?
|
||||||
if [ $r -ne 0 ]; then
|
if [ $r -ne 0 ]; then
|
||||||
fail "sftp failed"
|
fail "sftp failed"
|
||||||
@ -69,7 +72,7 @@ verbose "sftp timeout"
|
|||||||
echo "Subsystem sftp $OBJ/slow-sftp-server.sh" ) > $OBJ/sshd_proxy
|
echo "Subsystem sftp $OBJ/slow-sftp-server.sh" ) > $OBJ/sshd_proxy
|
||||||
|
|
||||||
rm -f ${COPY}
|
rm -f ${COPY}
|
||||||
$SFTP -qS $SSH -F $OBJ/ssh_proxy somehost:$DATA $COPY
|
$SFTP -qS "$TEST_SHELL_PATH $SSH" -F $OBJ/ssh_proxy somehost:$DATA $COPY
|
||||||
r=$?
|
r=$?
|
||||||
if [ $r -eq 0 ]; then
|
if [ $r -eq 0 ]; then
|
||||||
fail "sftp succeeded unexpectedly"
|
fail "sftp succeeded unexpectedly"
|
||||||
@ -82,7 +85,7 @@ verbose "sftp irrelevant timeout"
|
|||||||
echo "Subsystem sftp $OBJ/slow-sftp-server.sh" ) > $OBJ/sshd_proxy
|
echo "Subsystem sftp $OBJ/slow-sftp-server.sh" ) > $OBJ/sshd_proxy
|
||||||
|
|
||||||
rm -f ${COPY}
|
rm -f ${COPY}
|
||||||
$SFTP -qS $SSH -F $OBJ/ssh_proxy somehost:$DATA $COPY
|
$SFTP -qS "$TEST_SHELL_PATH $SSH" -F $OBJ/ssh_proxy somehost:$DATA $COPY
|
||||||
r=$?
|
r=$?
|
||||||
if [ $r -ne 0 ]; then
|
if [ $r -ne 0 ]; then
|
||||||
fail "sftp failed"
|
fail "sftp failed"
|
||||||
|
@ -1,6 +1,12 @@
|
|||||||
# $OpenBSD: connection-timeout.sh,v 1.2 2023/01/17 10:15:10 djm Exp $
|
# $OpenBSD: connection-timeout.sh,v 1.2 2023/01/17 10:15:10 djm Exp $
|
||||||
# Placed in the Public Domain.
|
# Placed in the Public Domain.
|
||||||
|
|
||||||
|
if [ "$os" == "windows" ]; then
|
||||||
|
# Windows, -oControlMaster not supported, but ConnectionTimeout is valid
|
||||||
|
echo "skipped, multiplexing not supported on windows OS"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
tid="unused connection timeout"
|
tid="unused connection timeout"
|
||||||
if config_defined DISABLE_FD_PASSING ; then
|
if config_defined DISABLE_FD_PASSING ; then
|
||||||
skip "not supported on this platform"
|
skip "not supported on this platform"
|
||||||
|
@ -9,15 +9,6 @@ if [ "$os" == "windows" ]; then
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
FWDPORT=`expr $PORT + 1`
|
|
||||||
|
|
||||||
if have_prog nc && nc -h 2>&1 | grep "proxy address" >/dev/null; then
|
|
||||||
proxycmd="nc -x 127.0.0.1:$FWDPORT -X"
|
|
||||||
elif have_prog connect; then
|
|
||||||
proxycmd="connect -S 127.0.0.1:$FWDPORT -"
|
|
||||||
else
|
|
||||||
echo "skipped (no suitable ProxyCommand found)"
|
|
||||||
exit 0
|
|
||||||
# This is a reasonable proxy for IPv6 support.
|
# This is a reasonable proxy for IPv6 support.
|
||||||
if ! config_defined HAVE_STRUCT_IN6_ADDR ; then
|
if ! config_defined HAVE_STRUCT_IN6_ADDR ; then
|
||||||
SKIP_IPV6=yes
|
SKIP_IPV6=yes
|
||||||
|
Loading…
x
Reference in New Issue
Block a user