mirror of
https://github.com/PowerShell/openssh-portable.git
synced 2025-07-27 15:54:22 +02:00
upstream: Add a function to skip remaining tests.
Many tests skip tests for various reasons but not in a consistent way and don't always clean up, so add that and switch the tests that do that over. OpenBSD-Regress-ID: 72d2ec90a3ee8849486956a808811734281af735
This commit is contained in:
parent
d486845c07
commit
8b02ef0f28
@ -1,4 +1,4 @@
|
|||||||
# $OpenBSD: agent-getpeereid.sh,v 1.11 2019/11/26 23:43:10 djm Exp $
|
# $OpenBSD: agent-getpeereid.sh,v 1.13 2021/09/01 00:50:27 dtucker Exp $
|
||||||
# Placed in the Public Domain.
|
# Placed in the Public Domain.
|
||||||
|
|
||||||
tid="disallow agent attach from other uid"
|
tid="disallow agent attach from other uid"
|
||||||
@ -10,19 +10,15 @@ SSH_AUTH_SOCK=/nonexistent
|
|||||||
if config_defined HAVE_GETPEEREID HAVE_GETPEERUCRED HAVE_SO_PEERCRED ; then
|
if config_defined HAVE_GETPEEREID HAVE_GETPEERUCRED HAVE_SO_PEERCRED ; then
|
||||||
:
|
:
|
||||||
else
|
else
|
||||||
echo "skipped (not supported on this platform)"
|
skip "skipped (not supported on this platform)"
|
||||||
exit 0
|
|
||||||
fi
|
fi
|
||||||
case "x$SUDO" in
|
case "x$SUDO" in
|
||||||
xsudo) sudo=1;;
|
xsudo) sudo=1;;
|
||||||
xdoas|xdoas\ *) ;;
|
xdoas|xdoas\ *) ;;
|
||||||
x)
|
x)
|
||||||
echo "need SUDO to switch to uid $UNPRIV"
|
skip "need SUDO to switch to uid $UNPRIV" ;;
|
||||||
echo SKIPPED
|
|
||||||
exit 0 ;;
|
|
||||||
*)
|
*)
|
||||||
echo "unsupported $SUDO - "doas" and "sudo" are allowed"
|
skip "unsupported $SUDO - "doas" and "sudo" are allowed" ;;
|
||||||
exit 0 ;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
trace "start agent"
|
trace "start agent"
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# $OpenBSD: keys-command.sh,v 1.6 2019/07/25 08:48:11 dtucker Exp $
|
# $OpenBSD: keys-command.sh,v 1.7 2021/09/01 00:50:27 dtucker Exp $
|
||||||
# Placed in the Public Domain.
|
# Placed in the Public Domain.
|
||||||
|
|
||||||
tid="authorized keys from command"
|
tid="authorized keys from command"
|
||||||
@ -77,5 +77,5 @@ if [ -x $KEY_COMMAND ]; then
|
|||||||
fail "connect failed"
|
fail "connect failed"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "SKIPPED: $KEY_COMMAND not executable (/var/run mounted noexec?)"
|
skip "$KEY_COMMAND not executable (/var/run mounted noexec?)"
|
||||||
fi
|
fi
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
# $OpenBSD: putty-ciphers.sh,v 1.9 2021/08/31 07:13:59 dtucker Exp $
|
# $OpenBSD: putty-ciphers.sh,v 1.10 2021/09/01 00:50:27 dtucker Exp $
|
||||||
# Placed in the Public Domain.
|
# Placed in the Public Domain.
|
||||||
|
|
||||||
tid="putty ciphers"
|
tid="putty ciphers"
|
||||||
|
|
||||||
if test "x$REGRESS_INTEROP_PUTTY" != "xyes" ; then
|
if test "x$REGRESS_INTEROP_PUTTY" != "xyes" ; then
|
||||||
fatal "putty interop tests not enabled"
|
skip "putty interop tests not enabled"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Re-enable ssh-rsa on older PuTTY versions.
|
# Re-enable ssh-rsa on older PuTTY versions.
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
# $OpenBSD: putty-kex.sh,v 1.7 2021/08/31 07:13:59 dtucker Exp $
|
# $OpenBSD: putty-kex.sh,v 1.8 2021/09/01 00:50:27 dtucker Exp $
|
||||||
# Placed in the Public Domain.
|
# Placed in the Public Domain.
|
||||||
|
|
||||||
tid="putty KEX"
|
tid="putty KEX"
|
||||||
|
|
||||||
if test "x$REGRESS_INTEROP_PUTTY" != "xyes" ; then
|
if test "x$REGRESS_INTEROP_PUTTY" != "xyes" ; then
|
||||||
fatal "putty interop tests not enabled"
|
skip "putty interop tests not enabled"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Re-enable ssh-rsa on older PuTTY versions.
|
# Re-enable ssh-rsa on older PuTTY versions.
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
# $OpenBSD: putty-transfer.sh,v 1.9 2021/08/31 07:13:59 dtucker Exp $
|
# $OpenBSD: putty-transfer.sh,v 1.10 2021/09/01 00:50:27 dtucker Exp $
|
||||||
# Placed in the Public Domain.
|
# Placed in the Public Domain.
|
||||||
|
|
||||||
tid="putty transfer data"
|
tid="putty transfer data"
|
||||||
|
|
||||||
if test "x$REGRESS_INTEROP_PUTTY" != "xyes" ; then
|
if test "x$REGRESS_INTEROP_PUTTY" != "xyes" ; then
|
||||||
fatal "putty interop tests not enabled"
|
skip "putty interop tests not enabled"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Re-enable ssh-rsa on older PuTTY versions.
|
# Re-enable ssh-rsa on older PuTTY versions.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# $OpenBSD: sftp-chroot.sh,v 1.7 2018/11/22 08:48:32 dtucker Exp $
|
# $OpenBSD: sftp-chroot.sh,v 1.8 2021/09/01 00:50:27 dtucker Exp $
|
||||||
# Placed in the Public Domain.
|
# Placed in the Public Domain.
|
||||||
|
|
||||||
tid="sftp in chroot"
|
tid="sftp in chroot"
|
||||||
@ -9,14 +9,11 @@ PRIVDATA=${CHROOT}/${FILENAME}
|
|||||||
trap "${SUDO} rm -f ${PRIVDATA}" 0
|
trap "${SUDO} rm -f ${PRIVDATA}" 0
|
||||||
|
|
||||||
if [ -z "$SUDO" -a ! -w /var/run ]; then
|
if [ -z "$SUDO" -a ! -w /var/run ]; then
|
||||||
echo "need SUDO to create file in /var/run, test won't work without"
|
skip "need SUDO to create file in /var/run, test won't work without"
|
||||||
echo SKIPPED
|
|
||||||
exit 0
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! $OBJ/check-perm -m chroot "$CHROOT" ; then
|
if ! $OBJ/check-perm -m chroot "$CHROOT" ; then
|
||||||
echo "skipped: $CHROOT is unsuitable as ChrootDirectory"
|
skip "$CHROOT is unsuitable as ChrootDirectory"
|
||||||
exit 0
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
$SUDO sh -c "echo mekmitastdigoat > $PRIVDATA" || \
|
$SUDO sh -c "echo mekmitastdigoat > $PRIVDATA" || \
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# $OpenBSD: sshfp-connect.sh,v 1.3 2021/08/31 01:25:27 dtucker Exp $
|
# $OpenBSD: sshfp-connect.sh,v 1.4 2021/09/01 00:50:27 dtucker Exp $
|
||||||
# Placed in the Public Domain.
|
# Placed in the Public Domain.
|
||||||
|
|
||||||
# This test requires external setup and thus is skipped unless
|
# This test requires external setup and thus is skipped unless
|
||||||
@ -25,9 +25,9 @@
|
|||||||
tid="sshfp connect"
|
tid="sshfp connect"
|
||||||
|
|
||||||
if ! $SSH -Q key-plain | grep ssh-rsa >/dev/null; then
|
if ! $SSH -Q key-plain | grep ssh-rsa >/dev/null; then
|
||||||
echo SKIPPED: RSA keys not supported.
|
skip "RSA keys not supported."
|
||||||
elif [ -z "${TEST_SSH_SSHFP_DOMAIN}" ]; then
|
elif [ -z "${TEST_SSH_SSHFP_DOMAIN}" ]; then
|
||||||
echo SKIPPED: TEST_SSH_SSHFP_DOMAIN not set.
|
skip "TEST_SSH_SSHFP_DOMAIN not set."
|
||||||
else
|
else
|
||||||
# Set RSA host key to match fingerprints above.
|
# Set RSA host key to match fingerprints above.
|
||||||
mv $OBJ/sshd_proxy $OBJ/sshd_proxy.orig
|
mv $OBJ/sshd_proxy $OBJ/sshd_proxy.orig
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# $OpenBSD: test-exec.sh,v 1.86 2021/08/08 08:27:28 dtucker Exp $
|
# $OpenBSD: test-exec.sh,v 1.87 2021/09/01 00:50:27 dtucker Exp $
|
||||||
# Placed in the Public Domain.
|
# Placed in the Public Domain.
|
||||||
|
|
||||||
#SUDO=sudo
|
#SUDO=sudo
|
||||||
@ -462,6 +462,14 @@ fatal ()
|
|||||||
exit $RESULT
|
exit $RESULT
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Skip remaining tests in script.
|
||||||
|
skip ()
|
||||||
|
{
|
||||||
|
echo "SKIPPED: $@"
|
||||||
|
cleanup
|
||||||
|
exit $RESULT
|
||||||
|
}
|
||||||
|
|
||||||
RESULT=0
|
RESULT=0
|
||||||
PIDFILE=$OBJ/pidfile
|
PIDFILE=$OBJ/pidfile
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user