Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Nov 2008 10:45:05 GMT
From:      Edward Tomasz Napierala <trasz@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 152741 for review
Message-ID:  <200811101045.mAAAj5Dv039773@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=152741

Change 152741 by trasz@trasz_victim7 on 2008/11/10 10:44:06

	Adjust rename(2) regression test to the new behaviour.

Affected files ...

.. //depot/projects/soc2008/trasz_nfs4acl/tools/regression/fstest/tests/rename/21.t#2 edit

Differences ...

==== //depot/projects/soc2008/trasz_nfs4acl/tools/regression/fstest/tests/rename/21.t#2 (text+ko) ====

@@ -1,11 +1,12 @@
 #!/bin/sh
+# $FreeBSD: head/tools/regression/fstest/tests/rename/21.t 184749 2008-11-07 14:46:46Z trasz $
 
-desc="write access to the directory is not required to rename it"
+desc="write access to subdirectory is required to move it to another directory"
 
 dir=`dirname $0`
 . ${dir}/../misc.sh
 
-echo "1..12"
+echo "1..13"
 
 n0=`namegen`
 n1=`namegen`
@@ -17,12 +18,16 @@
 cdir=`pwd`
 
 # Check that write permission on containing directory (${n2}) is enough
+# to rename subdirectory (${n0}).
+expect 0 mkdir ${n2}/${n0} 0700
+expect 0 -u  65534 -g 65534 rename ${n2}/${n0} ${n2}/${n1}
+
+# Check that write permission on containing directory (${n2}) is not enough
 # to move subdirectory (${n0}) from that directory.
-expect 0 mkdir ${n2}/${n0} 0755
-expect 0 -u  65534 -g 65534 rename ${n2}/${n0} ${n3}/${n0}
+expect EACCES -u  65534 -g 65534 rename ${n2}/${n1} ${n3}/${n0}
 
-expect 0 rmdir ${n3}/${n0}
-expect ENOENT rmdir ${n2}/${n0}
+expect 0 rmdir ${n2}/${n1}
+expect ENOENT rmdir ${n2}/${n1}
 
 # Check that write permission on containing directory (${n2}) is enough
 # to move file (${n0}) from that directory.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200811101045.mAAAj5Dv039773>