Call for testing: OpenSSH-5.7

Damien Miller djm at mindrot.org
Mon Jan 17 12:07:22 EST 2011


On Sat, 15 Jan 2011, Corinna Vinschen wrote:

> > I think we should propogate the host type into the regress environment,
> > since there are a couple of other platform quirks that we can use it for
> > (e.g. Darwin/OSX's failure of the agent-ptrace test).
> 
> That's a good idea.  I just don't think you should use "CYGWIN" as the
> name of the variable.  It should rather reflect the affected restriction
> so you can abstract from the name of the host system.  I think that would
> be clearer

Darren suggested a better way that avoid passing umpteen variables
through the recursive make invocation; grep for specific defines in
config.h.

This diff implements this approach and tidies up a few existing cases:


Index: configure.ac
===================================================================
RCS file: /var/cvs/openssh/configure.ac,v
retrieving revision 1.465
diff -u -p -r1.465 configure.ac
--- configure.ac	16 Jan 2011 07:28:12 -0000	1.465
+++ configure.ac	17 Jan 2011 01:03:03 -0000
@@ -483,6 +483,7 @@ int main(void) { exit(0); }
 		[Define if your platform needs to skip post auth
 		file descriptor passing])
 	AC_DEFINE(SSH_IOBUFSZ, 65535, [Windows is sensitive to read buffer size])
+	AC_DEFINE(FILESYSTEM_NO_BACKSLASH, 1, [File names may not contain backslash characters]) 
 	;;
 *-*-dgux*)
 	AC_DEFINE(IP_TOS_IS_BROKEN, 1,
Index: regress/agent-getpeereid.sh
===================================================================
RCS file: /var/cvs/openssh/regress/agent-getpeereid.sh,v
retrieving revision 1.8
diff -u -p -r1.8 agent-getpeereid.sh
--- regress/agent-getpeereid.sh	17 Jan 2011 00:52:42 -0000	1.8
+++ regress/agent-getpeereid.sh	17 Jan 2011 01:03:03 -0000
@@ -7,10 +7,7 @@ UNPRIV=nobody
 ASOCK=${OBJ}/agent
 SSH_AUTH_SOCK=/nonexistent
 
-if grep "#undef.*HAVE_GETPEEREID" ${BUILDDIR}/config.h >/dev/null 2>&1 && \
-	grep "#undef.*HAVE_GETPEERUCRED" ${BUILDDIR}/config.h >/dev/null && \
-	grep "#undef.*HAVE_SO_PEERCRED" ${BUILDDIR}/config.h >/dev/null
-then
+if ! config_defined HAVE_GETPEEREID HAVE_GETPEERUCRED HAVE_SO_PEERCRED ; then
 	echo "skipped (not supported on this platform)"
 	exit 0
 fi
Index: regress/multiplex.sh
===================================================================
RCS file: /var/cvs/openssh/regress/multiplex.sh,v
retrieving revision 1.18
diff -u -p -r1.18 multiplex.sh
--- regress/multiplex.sh	6 Oct 2009 23:30:57 -0000	1.18
+++ regress/multiplex.sh	17 Jan 2011 01:03:03 -0000
@@ -5,8 +5,7 @@ CTL=/tmp/openssh.regress.ctl-sock.$$
 
 tid="connection multiplexing"
 
-if grep "#define.*DISABLE_FD_PASSING" ${BUILDDIR}/config.h >/dev/null 2>&1
-then
+if config_defined DISABLE_FD_PASSING ; then
 	echo "skipped (not supported on this platform)"
 	exit 0
 fi
Index: regress/sftp-glob.sh
===================================================================
RCS file: /var/cvs/openssh/regress/sftp-glob.sh,v
retrieving revision 1.5
diff -u -p -r1.5 sftp-glob.sh
--- regress/sftp-glob.sh	6 Oct 2009 23:43:57 -0000	1.5
+++ regress/sftp-glob.sh	17 Jan 2011 01:03:03 -0000
@@ -3,11 +3,18 @@
 
 tid="sftp glob"
 
+config_defined FILESYSTEM_NO_BACKSLASH && nobs="not supported on this platform"
+
 sftp_ls() {
 	target=$1
 	errtag=$2
 	expected=$3
 	unexpected=$4
+	skip=$5
+	if test "x$skip" != "x" ; then
+		verbose "$tid: $errtag (skipped: $skip)"
+		return
+	fi
 	verbose "$tid: $errtag"
 	printf "ls -l %s" "${target}" | \
 		${SFTP} -b - -D ${SFTPSERVER} 2>/dev/null | \
@@ -44,8 +51,8 @@ SPACE="${DIR}/g-q space"
 
 rm -rf ${BASE}
 mkdir -p ${DIR}
-touch "${DATA}" "${GLOB1}" "${GLOB2}" "${QUOTE}"
-touch "${QSLASH}" "${ESLASH}" "${SLASH}" "${SPACE}"
+touch "${DATA}" "${GLOB1}" "${GLOB2}" "${QUOTE}" "${SPACE}"
+test "x$nobs" = "x" && touch "${QSLASH}" "${ESLASH}" "${SLASH}"
 
 #       target                   message                expected     unexpected
 sftp_ls "${DIR}/fil*"            "file glob"            "${DATA}"    ""
@@ -55,14 +62,14 @@ sftp_ls "${DIR}/g-wild\*"        "escape
 sftp_ls "${DIR}/g-quote\\\""     "escaped quote"        "g-quote\""  ""
 sftp_ls "\"${DIR}/g-quote\\\"\"" "quoted quote"         "g-quote\""  ""
 sftp_ls "'${DIR}/g-quote\"'"     "single-quoted quote"  "g-quote\""  ""
-sftp_ls "${DIR}/g-sl\\\\ash"     "escaped slash"        "g-sl\\ash"  ""
-sftp_ls "'${DIR}/g-sl\\\\ash'"   "quoted slash"         "g-sl\\ash"  ""
-sftp_ls "${DIR}/g-slash\\\\"     "escaped slash at EOL" "g-slash\\"  ""
-sftp_ls "'${DIR}/g-slash\\\\'"   "quoted slash at EOL"  "g-slash\\"  ""
-sftp_ls "${DIR}/g-qs\\\\\\\""    "escaped slash+quote"  "g-qs\\\""   ""
-sftp_ls "'${DIR}/g-qs\\\\\"'"    "quoted slash+quote"   "g-qs\\\""   ""
 sftp_ls "${DIR}/g-q\\ space"     "escaped space"        "g-q space"  ""
 sftp_ls "'${DIR}/g-q space'"     "quoted space"         "g-q space"  ""
+sftp_ls "${DIR}/g-sl\\\\ash"     "escaped slash"        "g-sl\\ash"  "" "$nobs"
+sftp_ls "'${DIR}/g-sl\\\\ash'"   "quoted slash"         "g-sl\\ash"  "" "$nobs"
+sftp_ls "${DIR}/g-slash\\\\"     "escaped slash at EOL" "g-slash\\"  "" "$nobs"
+sftp_ls "'${DIR}/g-slash\\\\'"   "quoted slash at EOL"  "g-slash\\"  "" "$nobs"
+sftp_ls "${DIR}/g-qs\\\\\\\""    "escaped slash+quote"  "g-qs\\\""   "" "$nobs"
+sftp_ls "'${DIR}/g-qs\\\\\"'"    "quoted slash+quote"   "g-qs\\\""   "" "$nobs"
 
 rm -rf ${BASE}
 
Index: regress/test-exec.sh
===================================================================
RCS file: /var/cvs/openssh/regress/test-exec.sh,v
retrieving revision 1.41
diff -u -p -r1.41 test-exec.sh
--- regress/test-exec.sh	12 Aug 2010 16:43:13 -0000	1.41
+++ regress/test-exec.sh	17 Jan 2011 01:03:03 -0000
@@ -221,6 +221,17 @@ fatal ()
 	exit $RESULT
 }
 
+# Check whether preprocessor symbols are defined in config.h.
+config_defined ()
+{
+	str=$1
+	while test "x$2" != "x" ; do
+		str="$str|$2"
+		shift
+	done
+	egrep "^#define.*($str)" ${BUILDDIR}/config.h >/dev/null 2>&1
+}
+
 RESULT=0
 PIDFILE=$OBJ/pidfile
 


More information about the openssh-unix-dev mailing list