Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Aug 2008 07:15:16 GMT
From:      Edward Tomasz Napierala <trasz@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 147365 for review
Message-ID:  <200808140715.m7E7FGFB029320@repoman.freebsd.org>

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

Change 147365 by trasz@trasz_traszkan on 2008/08/14 07:14:19

	Misc fixes for tools-level tests.

Affected files ...

.. //depot/projects/soc2008/trasz_nfs4acl/tools/regression/acltools/00.t#3 edit
.. //depot/projects/soc2008/trasz_nfs4acl/tools/regression/acltools/01.t#2 edit
.. //depot/projects/soc2008/trasz_nfs4acl/tools/regression/acltools/02.t#3 edit
.. //depot/projects/soc2008/trasz_nfs4acl/tools/regression/acltools/03.t#2 edit
.. //depot/projects/soc2008/trasz_nfs4acl/tools/regression/acltools/tools-nfs4.test#3 edit

Differences ...

==== //depot/projects/soc2008/trasz_nfs4acl/tools/regression/acltools/00.t#3 (text+ko) ====

@@ -10,7 +10,7 @@
 #
 # Output should be obvious.
 
-echo "1..1"
+echo "1..4"
 
 if [ `whoami` != "root" ]; then
 	echo "not ok 1 - you need to be root to run this test."
@@ -29,14 +29,25 @@
 	exit 1
 fi
 
+echo "ok 1"
+
 cd $MNT
 
+# First, check whether we can crash the kernel by creating too many
+# entries.  For some reason this won't work in the test file.
+touch xxx
+setfacl -x5 xxx
+while :; do setfacl -a0 u:42:rwx:allow xxx 2> /dev/null; if [ $? -ne 0 ]; then break; fi; done
+chmod 600 xxx
+rm xxx
+echo "ok 2"
+
 $TESTDIR/run $TESTDIR/tools-nfs4.test > /dev/null
 
 if [ $? -eq 0 ]; then
-	echo "ok 1"
+	echo "ok 3"
 else
-	echo "not ok 1"
+	echo "not ok 3"
 fi
 
 cd /
@@ -44,3 +55,5 @@
 rmdir $MNT
 mdconfig -du $MD
 
+echo "ok 4"
+

==== //depot/projects/soc2008/trasz_nfs4acl/tools/regression/acltools/01.t#2 (text+ko) ====

@@ -12,7 +12,7 @@
 #
 # Output should be obvious.
 
-echo "1..1"
+echo "1..4"
 
 if [ `whoami` != "root" ]; then
 	echo "not ok 1 - you need to be root to run this test."
@@ -30,14 +30,25 @@
 	exit 1
 fi
 
+echo "ok 1"
+
 cd $MNT
 
+# First, check whether we can crash the kernel by creating too many
+# entries.  For some reason this won't work in the test file.
+touch xxx
+setfacl -x5 xxx
+while :; do setfacl -a0 u:42:rwx:allow xxx 2> /dev/null; if [ $? -ne 0 ]; then break; fi; done
+chmod 600 xxx
+rm xxx
+echo "ok 2"
+
 $TESTDIR/run $TESTDIR/tools-nfs4.test > /dev/null
 
 if [ $? -eq 0 ]; then
-	echo "ok 1"
+	echo "ok 3"
 else
-	echo "not ok 1"
+	echo "not ok 3"
 fi
 
 cd /
@@ -45,3 +56,5 @@
 rmdir $MNT
 mdconfig -du $MD
 
+echo "ok 4"
+

==== //depot/projects/soc2008/trasz_nfs4acl/tools/regression/acltools/02.t#3 (text+ko) ====

@@ -11,7 +11,7 @@
 # Output should be obvious.
 #
 
-echo "1..1"
+echo "1..4"
 
 if [ `whoami` != "root" ]; then
 	echo "not ok 1 - you need to be root to run this test."
@@ -30,14 +30,26 @@
 	exit 1
 fi
 
+echo "ok 1"
+
 cd $MNT
 
+# First, check whether we can crash the kernel by creating too many
+# entries.  For some reason this won't work in the test file.
+touch xxx
+i=0;
+while :; do i=$(($i+1)); setfacl -m u:$i:rwx xxx 2> /dev/null; if [ $? -ne 0 ]; then break; fi; done
+chmod 600 xxx
+rm xxx
+echo "ok 2"
+
+
 $TESTDIR/run $TESTDIR/tools-posix.test > /dev/null
 
 if [ $? -eq 0 ]; then
-	echo "ok 1"
+	echo "ok 3"
 else
-	echo "not ok 1"
+	echo "not ok 3"
 fi
 
 cd /
@@ -45,3 +57,5 @@
 rmdir $MNT
 mdconfig -du $MD
 
+echo "ok 4"
+

==== //depot/projects/soc2008/trasz_nfs4acl/tools/regression/acltools/03.t#2 (text+ko) ====

@@ -5,7 +5,7 @@
 #
 # Output should be obvious.
 
-echo "1..1"
+echo "1..5"
 
 if [ `whoami` != "root" ]; then
 	echo "not ok 1 - you need to be root to run this test."
@@ -26,35 +26,40 @@
 	exit 1
 fi
 
+echo "ok 1"
+
 MD2=`mdconfig -at swap -s 10m`
 MNT2=$MNTROOT/posix
 mkdir $MNT2
 newfs /dev/$MD2 > /dev/null
 mount -o acls /dev/$MD2 $MNT2
 if [ $? -ne 0 ]; then
-	echo "not ok 1 - mount failed."
+	echo "not ok 2 - mount failed."
 	exit 1
 fi
 
+echo "ok 2"
+
 MD3=`mdconfig -at swap -s 10m`
 MNT3=$MNTROOT/none
 mkdir $MNT3
 newfs /dev/$MD3 > /dev/null
 mount /dev/$MD3 $MNT3
 if [ $? -ne 0 ]; then
-	echo "not ok 1 - mount failed."
+	echo "not ok 3 - mount failed."
 	exit 1
 fi
 
+echo "ok 3"
 
 cd $MNTROOT
 
 $TESTDIR/run $TESTDIR/tools-crossfs.test > /dev/null
 
 if [ $? -eq 0 ]; then
-	echo "ok 1"
+	echo "ok 4"
 else
-	echo "not ok 1"
+	echo "not ok 4"
 fi
 
 cd /
@@ -73,3 +78,5 @@
 
 rmdir $MNTROOT
 
+echo "ok 5"
+

==== //depot/projects/soc2008/trasz_nfs4acl/tools/regression/acltools/tools-nfs4.test#3 (text+ko) ====

@@ -177,13 +177,6 @@
 >          everyone@:-wxp---A-W-Co-:------:deny
 >          everyone@:r-----a-R-c--s:------:allow
 
-# Time for the kernel part.  Check whether we can crash
-# the system using too many entries.
-# XXX: This does not actually work.  Find out why.
-$ while :; do setfacl -a42 u:0:rwx:allow xxx 2> /dev/null; if [ $? -ne 0 ]; then break; fi; done
-$ chmod 600 xxx
-$ setfacl -b xxx
-
 # Check whether chmod actually does what it should do.
 $ rm xxx
 $ touch xxx



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