SSH regression test failure question

Damien Miller djm at mindrot.org
Fri Oct 18 08:59:05 EST 2013


> Hi,
> 
> meanwhile I am deeper into OpenSSH (followed the well-done docs, that I missed 
> in the beginning).
> 
> 'make build' works with current CVS.
> 
> But
> 	REGRESS_FULL=1 make regress
> fails for ssh:
> failed sftp permissions
> *** Error 1 in ssh (Makefile:145 't-sftp-perm')
> FAILED
> *** Error 1 in ssh (<bsd.regress.mk>:101 'regress')
> *** Error 1 in /usr/src/regress/usr.bin (<bsd.subdir.mk>:48 'regress')
> 
> I can see it is due to
> 	postcondition check failed: setstat readonly
> which fails since I am running the regression test as user 'root'.

Thanks for the diagnosis and thanks for running the regress tests :)

The fix is pretty simple: set/test executability instead of writability.
I'll commit this, it should be in tomorrow's snapshot.

Index: sftp-perm.sh
===================================================================
RCS file: /cvs/src/regress/usr.bin/ssh/sftp-perm.sh,v
retrieving revision 1.1
diff -u -p -r1.1 sftp-perm.sh
--- sftp-perm.sh	9 Oct 2013 23:44:14 -0000	1.1
+++ sftp-perm.sh	17 Oct 2013 21:57:49 -0000
@@ -90,10 +90,10 @@ ro_test \
 
 ro_test \
 	"setstat" \
-	"chmod 0600 $COPY" \
+	"chmod 0700 $COPY" \
 	"touch $COPY; chmod 0400 $COPY" \
-	"test -w $COPY" \
-	"test ! -w $COPY"
+	"test -x $COPY" \
+	"test ! -x $COPY"
 
 ro_test \
 	"rm" \
@@ -191,10 +191,10 @@ perm_test \
 perm_test \
 	"setstat" \
 	"realpath,stat,lstat" \
-	"chmod 0600 $COPY" \
+	"chmod 0700 $COPY" \
 	"touch $COPY; chmod 0400 $COPY" \
-	"test -w $COPY" \
-	"test ! -w $COPY"
+	"test -x $COPY" \
+	"test ! -x $COPY"
 
 perm_test \
 	"remove" \


More information about the openssh-unix-dev mailing list