svn commit: r184749 - head/tools/regression/fstest/tests/rename

Edward Tomasz Napierala trasz at FreeBSD.org
Fri Nov 7 06:46:46 PST 2008


Author: trasz
Date: Fri Nov  7 14:46:46 2008
New Revision: 184749
URL: http://svn.freebsd.org/changeset/base/184749

Log:
  Make test for write access to the directory being moved a little more
  specific.
  
  Approved by:	rwatson (mentor)

Modified:
  head/tools/regression/fstest/tests/rename/21.t

Modified: head/tools/regression/fstest/tests/rename/21.t
==============================================================================
--- head/tools/regression/fstest/tests/rename/21.t	Fri Nov  7 14:45:42 2008	(r184748)
+++ head/tools/regression/fstest/tests/rename/21.t	Fri Nov  7 14:46:46 2008	(r184749)
@@ -6,7 +6,7 @@ desc="write access to subdirectory is re
 dir=`dirname $0`
 . ${dir}/../misc.sh
 
-echo "1..12"
+echo "1..13"
 
 n0=`namegen`
 n1=`namegen`
@@ -17,13 +17,17 @@ expect 0 mkdir ${n2} 0777
 expect 0 mkdir ${n3} 0777
 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} 0700
-expect EACCES -u  65534 -g 65534 rename ${n2}/${n0} ${n3}/${n0}
+expect EACCES -u  65534 -g 65534 rename ${n2}/${n1} ${n3}/${n0}
 
-expect 0 rmdir ${n2}/${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 svn-src-all mailing list