From owner-p4-projects@FreeBSD.ORG Thu Aug 14 07:15:17 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 428C9106567E; Thu, 14 Aug 2008 07:15:17 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E2104106567A for ; Thu, 14 Aug 2008 07:15:16 +0000 (UTC) (envelope-from trasz@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id CD7ED8FC22 for ; Thu, 14 Aug 2008 07:15:16 +0000 (UTC) (envelope-from trasz@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.2/8.14.2) with ESMTP id m7E7FGLT029322 for ; Thu, 14 Aug 2008 07:15:16 GMT (envelope-from trasz@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.2/8.14.1/Submit) id m7E7FGFB029320 for perforce@freebsd.org; Thu, 14 Aug 2008 07:15:16 GMT (envelope-from trasz@freebsd.org) Date: Thu, 14 Aug 2008 07:15:16 GMT Message-Id: <200808140715.m7E7FGFB029320@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to trasz@freebsd.org using -f From: Edward Tomasz Napierala To: Perforce Change Reviews Cc: Subject: PERFORCE change 147365 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Aug 2008 07:15:17 -0000 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