Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Sep 2009 15:54:05 GMT
From:      Edward Tomasz Napierala <trasz@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 168828 for review
Message-ID:  <200909231554.n8NFs5s0053599@repoman.freebsd.org>

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

Change 168828 by trasz@trasz_victim on 2009/09/23 15:53:23

	Fix mismerge.

Affected files ...

.. //depot/projects/soc2008/trasz_nfs4acl/tools/regression/acltools/03.t#4 integrate
.. //depot/projects/soc2008/trasz_nfs4acl/tools/regression/acltools/aclfuzzer.sh#2 integrate
.. //depot/projects/soc2008/trasz_nfs4acl/tools/regression/acltools/tools-crossfs.test#4 integrate

Differences ...

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

@@ -1,7 +1,36 @@
 #!/bin/sh
 #
-# This is a wrapper script to run tools-crossfs.test, intended to verify
-# whether cp(1) and mv(1) do the correct thing wrt ACLs.
+# Copyright (c) 2008, 2009 Edward Tomasz Napierała <trasz@FreeBSD.org>
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
+# $FreeBSD: src/tools/regression/acltools/03.t,v 1.1 2009/09/23 15:12:20 trasz Exp $
+#
+
+# This is a wrapper script to run tools-crossfs.test between UFS without
+# ACLs, UFS with POSIX.1e ACLs, and ZFS with NFSv4 ACLs.
+#
+# WARNING: It uses hardcoded ZFS pool name "acltools"
 #
 # Output should be obvious.
 
@@ -16,13 +45,12 @@
 MNTROOT=`mktemp -dt acltools`
 
 # Set up the test filesystems.
-MD1=`mdconfig -at swap -s 10m`
+MD1=`mdconfig -at swap -s 64m`
 MNT1=$MNTROOT/nfs4
 mkdir $MNT1
-newfs /dev/$MD1 > /dev/null
-mount -o nfs4acls /dev/$MD1 $MNT1
+zpool create -R $MNT1 acltools /dev/$MD1
 if [ $? -ne 0 ]; then
-	echo "not ok 1 - mount failed."
+	echo "not ok 1 - 'zpool create' failed."
 	exit 1
 fi
 
@@ -72,7 +100,7 @@
 rmdir $MNT2
 mdconfig -du $MD2
 
-umount -f $MNT1
+zpool destroy -f acltools
 rmdir $MNT1
 mdconfig -du $MD1
 

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

@@ -1,8 +1,35 @@
 #!/bin/sh
-# This is an NFSv4 ACL fuzzer.  It expects to be run by non-root
-# in a scratch directory on a filesystem with NFSv4 ACLs support.
-# It generates the output that is expected to be fed to
-# /usr/src/tools/regression/acltools/run script.
+#
+# Copyright (c) 2008, 2009 Edward Tomasz Napierała <trasz@FreeBSD.org>
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
+# $FreeBSD: src/tools/regression/acltools/aclfuzzer.sh,v 1.1 2009/09/23 15:06:51 trasz Exp $
+#
+
+# This is an NFSv4 ACL fuzzer.  It expects to be run by non-root in a scratch
+# directory on a filesystem with NFSv4 ACLs support.  Output it generates
+# is expected to be fed to /usr/src/tools/regression/acltools/run script.
 
 NUMBER_OF_COMMANDS=300
 
@@ -150,11 +177,11 @@
 	run_command "mv -f $from $to"
 }
 
-# XXX: chown(8), setting times with touch(1).
+# XXX: To be implemented: chown(8), setting times with touch(1).
 
 switch_to_random_user()
 {
-#	echo "switch"
+	# XXX: To be implemented.
 }
 
 execute_random_command()

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

@@ -1,5 +1,33 @@
-# This is a tools-level test whether cp(1) and mv(1) do the correct
-# thing wrt ACLs.  Run it as root using ACL-enabled kernel:
+# Copyright (c) 2008, 2009 Edward Tomasz Napierała <trasz@FreeBSD.org>
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
+# $FreeBSD: src/tools/regression/acltools/tools-crossfs.test,v 1.1 2009/09/23 15:12:20 trasz Exp $
+#
+
+# This is a tools-level test intended to verify that cp(1) and mv(1)
+# do the right thing with respect to ACLs.  Run it as root using
+# ACL-enabled kernel:
 #
 # /usr/src/tools/regression/acltools/run /usr/src/tools/regression/acltools/tools-nfs4.test
 #
@@ -51,7 +79,7 @@
 # mv from POSIX.1e to NFSv4.
 $ rm -f nfs4/xxx
 $ mv posix/yyy nfs4/xxx
-> mv: ACL brand of source is POSIX.1e, but destination is NFSv4; ACL not copied
+> mv: failed to set acl entries for nfs4/xxx: Invalid argument
 $ getfacl -nq nfs4/xxx
 >             owner@:-wxp----------:------:deny
 >             owner@:r------A-W-Co-:------:allow
@@ -77,13 +105,14 @@
 # mv from NFSv4 to POSIX.1e.
 $ rm -f posix/xxx
 $ mv nfs4/yyy posix/xxx
-> mv: ACL brand of source is NFSv4, but destination is POSIX.1e; ACL not copied
+> mv: failed to set acl entries for posix/xxx: Invalid argument
 $ ls -l posix/xxx | cut -d' ' -f1
 > -r--rwxrw-
 
 # mv from POSIX.1e to none.
 $ setfacl -m u:42:x,g:43:w posix/xxx
 $ mv posix/xxx none/xxx
+> mv: failed to set acl entries for none/xxx: Operation not supported
 $ ls -l none/xxx | cut -d' ' -f1
 > -r--rwxrw-
 
@@ -119,7 +148,7 @@
 # mv from POSIX.1e to NFSv4.
 $ rm -f nfs4/xxx
 $ cp -p posix/xxx nfs4/xxx
-> cp: failed to set acl entries for nfs4/xxx: Operation not supported
+> cp: failed to set acl entries for nfs4/xxx: Invalid argument
 $ ls -l nfs4/xxx | cut -d' ' -f1
 > -rw-rwxr--
 
@@ -140,7 +169,7 @@
 # cp from NFSv4 to POSIX.1e.
 $ rm -f posix/xxx
 $ cp -p nfs4/xxx posix/xxx
-> cp: failed to set acl entries for posix/xxx: Operation not supported
+> cp: failed to set acl entries for posix/xxx: Invalid argument
 $ ls -l posix/xxx | cut -d' ' -f1
 > -rw-rwxr--
 



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