PERFORCE change 152741 for review

Edward Tomasz Napierala trasz at FreeBSD.org
Mon Nov 10 02:45:06 PST 2008


http://perforce.freebsd.org/chv.cgi?CH=152741

Change 152741 by trasz at 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.


More information about the p4-projects mailing list