Richacl tests
v3 cover Richacl tests
Here is an updated version that adds generic/178 which runs all of the richacl tests on a scratch richacl filesystem. On filesystems and kernels without richacl support, generic/178 will be skipped.
Previous posting: http://oss.sgi.com/archives/xfs/2015-12/msg00178.html
Andreas Gruenbacher (6):
check: Don't complain about missing tests/$FSTYP/group
check: Enforce xfs filesystem recreation on $TEST_DEV Rename output file templates to match TEST.out*
check: Add support for tests without *.out files generic/178: Add richacl tests
Remove the obsolete nfs4acl tests
.gitignore | 16 +++ Makefile | 2 +- check | 79 +++++++---- common/rc | 33 +++++ nfs4acl/Makefile | 29 ---- nfs4acl/apply-mask.test | 143 ------------------- nfs4acl/basic.test | 70 ---------- nfs4acl/chmod.test | 31 ----- nfs4acl/chown.test | 63 --------- nfs4acl/computed-mode.test | 62 --------- nfs4acl/create.test | 35 ----- nfs4acl/ctime.test | 36 ----- nfs4acl/delete.test | 77 ---------- nfs4acl/run | 298 --------------------------------------- nfs4acl/unrepresentable.test | 20 --- nfs4acl/write-vs-append.test | 46 ------ richacl/Makefile | 23 +++ richacl/apply-masks | 163 ++++++++++++++++++++++ richacl/auto-inheritance | 191 +++++++++++++++++++++++++ richacl/basic | 97 +++++++++++++ richacl/chmod | 40 ++++++ richacl/chown | 42 ++++++ richacl/create | 36 +++++ richacl/ctime | 35 +++++ richacl/delete | 89 ++++++++++++ richacl/setrichacl-modify | 57 ++++++++ richacl/test-lib.sh | 154 ++++++++++++++++++++ richacl/write-vs-append | 54 ++++++++ tests/generic/178 | 77 ++++++++++ tests/generic/group | 1 + tests/xfs/033 | 2 +- tests/xfs/033.crc.out.linux | 197 -------------------------- tests/xfs/033.out.crc.linux | 197 ++++++++++++++++++++++++++ tests/xfs/096 | 4 +- tests/xfs/096.external | 50 ------- tests/xfs/096.internal | 51 ------- tests/xfs/096.out.external | 50 +++++++ tests/xfs/096.out.internal | 51 +++++++ tests/xfs/191 | 75 ---------- tests/xfs/191.out | 324 ------------------------------------------- tests/xfs/group | 1 - 41 files changed, 1462 insertions(+), 1639 deletions(-) delete mode 100644 nfs4acl/Makefile delete mode 100644 nfs4acl/apply-mask.test delete mode 100644 nfs4acl/basic.test delete mode 100644 nfs4acl/chmod.test delete mode 100644 nfs4acl/chown.test delete mode 100644 nfs4acl/computed-mode.test delete mode 100644 nfs4acl/create.test delete mode 100644 nfs4acl/ctime.test delete mode 100644 nfs4acl/delete.test delete mode 100755 nfs4acl/run delete mode 100644 nfs4acl/unrepresentable.test delete mode 100644 nfs4acl/write-vs-append.test create mode 100644 richacl/Makefile create mode 100755 richacl/apply-masks create mode 100755 richacl/auto-inheritance create mode 100755 richacl/basic create mode 100755 richacl/chmod create mode 100755 richacl/chown create mode 100755 richacl/create create mode 100755 richacl/ctime create mode 100755 richacl/delete create mode 100755 richacl/setrichacl-modify create mode 100644 richacl/test-lib.sh create mode 100755 richacl/write-vs-append create mode 100755 tests/generic/178 delete mode 100644 tests/xfs/033.crc.out.linux create mode 100644 tests/xfs/033.out.crc.linux delete mode 100644 tests/xfs/096.external delete mode 100644 tests/xfs/096.internal create mode 100644 tests/xfs/096.out.external create mode 100644 tests/xfs/096.out.internal delete mode 100755 tests/xfs/191 delete mode 100644 tests/xfs/191.out
Signature · 6 lines
2.5.0 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
PATCH v3 1/6 check: Don't complain about missing tests/$FSTYP/group
When filesystems don't have filesystem specific tests, those nonexistent tests also won't have a group file.
--- check | 2 ++ 1 file changed, 2 insertions(+)
check +2 -0
@@ -95,6 +95,8 @@ get_group_list() grp=$1 for d in $SRC_GROUPS $FSTYP; do + [ -e "$SRC_DIR/$d/group" ] || continue + l=$(sed -n < $SRC_DIR/$d/group \ -e 's/#.*//' \ -e 's/$/ /' \
Signature · 6 lines
2.5.0 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
PATCH v3 2/6 check: Enforce xfs filesystem recreation on $TEST_DEV
In reply to Andreas GruenbacherWhen recreating xfs filesystems on $TEST_DEV, pass option -f to enforce the filesystem creation instead of refusing to overwrite existing xfs filesystems. We already do that for ext2/ext3/ext4 filesystems.
--- common/rc | 3 +++ 1 file changed, 3 insertions(+)
common/rc +3 -0
@@ -572,6 +572,9 @@ _test_mkfs() btrfs) $MKFS_BTRFS_PROG $MKFS_OPTIONS $* $TEST_DEV > /dev/null ;; + xfs) + $MKFS_PROG -t $FSTYP -- -f $MKFS_OPTIONS $* $TEST_DEV + ;; ext2|ext3|ext4) $MKFS_PROG -t $FSTYP -- -F $MKFS_OPTIONS $* $TEST_DEV ;;
Signature · 6 lines
2.5.0 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
PATCH v3 3/6 Rename output file templates to match TEST.out*
In reply to Andreas GruenbacherRename the expected output files so that they all match "$TEST_NAME.out*". That way, we can statically check if a test has any .out* files.
Tests with multiple output file variants symlink $TEST_NAME.out to one of those variants. For those tests, add $TEST_NAME.out to .gitignore.
--- .gitignore | 16 ++++ tests/xfs/033 | 2 +- tests/xfs/033.crc.out.linux | 197 -------------------------------------------- tests/xfs/033.out.crc.linux | 197 ++++++++++++++++++++++++++++++++++++++++++++ tests/xfs/096 | 4 +- tests/xfs/096.external | 50 ----------- tests/xfs/096.internal | 51 ------------ tests/xfs/096.out.external | 50 +++++++++++ tests/xfs/096.out.internal | 51 ++++++++++++ 9 files changed, 317 insertions(+), 301 deletions(-) delete mode 100644 tests/xfs/033.crc.out.linux create mode 100644 tests/xfs/033.out.crc.linux delete mode 100644 tests/xfs/096.external delete mode 100644 tests/xfs/096.internal create mode 100644 tests/xfs/096.out.external create mode 100644 tests/xfs/096.out.internal
.gitignore +16 -0
@@ -195,3 +195,19 @@ /dmapi/src/suite2/src/test_invis /dmapi/src/suite2/src/test_region /dmapi/src/suite2/src/test_rights + +# Symlinked .out files +/tests/generic/088.out +/tests/generic/097.out +/tests/xfs/022.out +/tests/xfs/023.out +/tests/xfs/031.out +/tests/xfs/033.out +/tests/xfs/035.out +/tests/xfs/036.out +/tests/xfs/039.out +/tests/xfs/043.out +/tests/xfs/055.out +/tests/xfs/071.out +/tests/xfs/096.out +/tests/xfs/146.out
tests/xfs/033 +1 -1
@@ -85,7 +85,7 @@ _scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs # link correct .out file if [ $_fs_has_crcs -eq 1 ]; then - _link_out_file $seq.crc.out $seqfull.out + _link_out_file $seq.out.crc $seqfull.out else _link_out_file $seq.out $seqfull.out fi
tests/xfs/033.crc.out.linux deleted +0 -197
197 lines not on this page · raw message
tests/xfs/033.out.crc.linux new file +197 -0
197 lines not on this page · raw message
tests/xfs/096 +2 -2
@@ -109,9 +109,9 @@ _require_v2log # choose .out file based on internal/external log rm -f $seqfull.out if [ "$USE_EXTERNAL" = yes ]; then - ln -s $seq.external $seqfull.out + ln -s $seq.out.external $seqfull.out else - ln -s $seq.internal $seqfull.out + ln -s $seq.out.internal $seqfull.out fi # maximum log record size
tests/xfs/096.external deleted +0 -50
50 lines not on this page · raw message
tests/xfs/096.internal deleted +0 -51
51 lines not on this page · raw message
tests/xfs/096.out.external new file +50 -0
50 lines not on this page · raw message
tests/xfs/096.out.internal new file +51 -0
51 lines not on this page · raw message
Signature · 6 lines
2.5.0 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
PATCH v3 4/6 check: Add support for tests without *.out files
In reply to Andreas GruenbacherAdd support for tests which report their status through their exit code instead of producing output that is compared with the expected output.
When such a test returns with exit code 77, it is assumed to have been skipped; all other non-zero exit codes are treated as test failures.
--- check | 77 +++++++++++++++++++++++++++++++++++++++++++------------------------ 1 file changed, 50 insertions(+), 27 deletions(-)
check +50 -27
@@ -204,6 +204,13 @@ _prepare_test_list() fi } +# Check if a test has any .out* files +has_out_files() +{ + set -- "$1".out* + [ $# -gt 0 -a -e "$1" ] +} + # Process command arguments first. while [ $# -gt 0 ]; do case "$1" in
@@ -612,6 +619,13 @@ for section in $HOST_OPTIONS_SECTIONS; do err=true fi + if ! has_out_files $seq; then + if [ $sts -eq 77 ]; then + cat $tmp.out > $seqres.notrun + sts=0 + fi + fi + if [ -f $seqres.notrun ] then $timestamp || echo -n " [not run] "
@@ -624,41 +638,50 @@ for section in $HOST_OPTIONS_SECTIONS; do echo -n " [failed, exit status $sts]" err=true fi - if [ ! -f $seq.out ] - then - echo " - no qualified output" - err=true - else - # coreutils 8.16+ changed quote formats in error messages from - # `foo' to 'foo'. Filter old versions to match the new version. - sed -i "s/\`/\'/g" $tmp.out - if diff $seq.out $tmp.out >/dev/null 2>&1 + if has_out_files $seq; then + if [ ! -f $seq.out ] then - if $err + echo " - no qualified output" + err=true + else + # coreutils 8.16+ changed quote formats in error messages from + # `foo' to 'foo'. Filter old versions to match the new version. + sed -i "s/\`/\'/g" $tmp.out + + if ! diff $seq.out $tmp.out >/dev/null 2>&1 then - : - else - echo "$seqnum `expr $stop - $start`" >>$tmp.time - echo -n " `expr $stop - $start`s" + echo " - output mismatch (see $seqres.out.bad)" + mv $tmp.out $seqres.out.bad + $diff $seq.out $seqres.out.bad | { + if test "$DIFF_LENGTH" -le 0; then + cat + else + head -n "$DIFF_LENGTH" + echo "..." + echo "(Run '$diff $seq.out $seqres.out.bad'" \ + " to see the entire diff)" + fi; } | \ + sed -e 's/^\(.\)/ \1/' + err=true fi - echo "" + fi + else + if ! $err; then + mv $tmp.out $seqres.out.good else - echo " - output mismatch (see $seqres.out.bad)" mv $tmp.out $seqres.out.bad - $diff $seq.out $seqres.out.bad | { - if test "$DIFF_LENGTH" -le 0; then - cat - else - head -n "$DIFF_LENGTH" - echo "..." - echo "(Run '$diff $seq.out $seqres.out.bad'" \ - " to see the entire diff)" - fi; } | \ - sed -e 's/^\(.\)/ \1/' - err=true + echo " - output (see $seqres.out.bad)" + cat $seqres.out.bad fi fi + + if ! $err; then + echo "$seqnum `expr $stop - $start`" >>$tmp.time + echo -n " `expr $stop - $start`s" + echo "" + fi + try="$try $seqnum" n_try=`expr $n_try + 1` _check_filesystems
Signature · 6 lines
2.5.0 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
PATCH v3 5/6 generic/178: Add richacl tests
In reply to Andreas GruenbacherAdd the Rich Access Control List tests from the richacl package as generic/178. The new test requires SCRATCH_DEV and SCRATCH_MNT to be set. It tries to create and mount a scratch filesystem with richacl support before running the tests; if that fails, the richacl tests will be skipped.
--- Makefile | 2 +- common/rc | 30 ++++++++ richacl/Makefile | 23 ++++++ richacl/apply-masks | 163 +++++++++++++++++++++++++++++++++++++++ richacl/auto-inheritance | 191 ++++++++++++++++++++++++++++++++++++++++++++++ richacl/basic | 97 +++++++++++++++++++++++ richacl/chmod | 40 ++++++++++ richacl/chown | 42 ++++++++++ richacl/create | 36 +++++++++ richacl/ctime | 35 +++++++++ richacl/delete | 89 +++++++++++++++++++++ richacl/setrichacl-modify | 57 ++++++++++++++ richacl/test-lib.sh | 154 +++++++++++++++++++++++++++++++++++++ richacl/write-vs-append | 54 +++++++++++++ tests/generic/178 | 77 +++++++++++++++++++ tests/generic/group | 1 + 16 files changed, 1090 insertions(+), 1 deletion(-) create mode 100644 richacl/Makefile create mode 100755 richacl/apply-masks create mode 100755 richacl/auto-inheritance create mode 100755 richacl/basic create mode 100755 richacl/chmod create mode 100755 richacl/chown create mode 100755 richacl/create create mode 100755 richacl/ctime create mode 100755 richacl/delete create mode 100755 richacl/setrichacl-modify create mode 100644 richacl/test-lib.sh create mode 100755 richacl/write-vs-append create mode 100755 tests/generic/178
Makefile +1 -1
@@ -57,7 +57,7 @@ TOOL_SUBDIRS += dmapi endif export TESTS_DIR = tests -SUBDIRS = $(LIB_SUBDIRS) $(TOOL_SUBDIRS) $(TESTS_DIR) +SUBDIRS = $(LIB_SUBDIRS) $(TOOL_SUBDIRS) $(TESTS_DIR) richacl default: include/builddefs $(DMAPI_MAKEFILE) ifeq ($(HAVE_BUILDDEFS), no)
common/rc +30 -0
@@ -1657,6 +1657,36 @@ _require_xfs_io_command() _notrun "xfs_io $command failed (old kernel/wrong fs?)" } +_setup_scratch_richacl_xfs() +{ + _scratch_mkfs_xfs_supported -m richacl=1 >/dev/null 2>&1 \ + || _notrun "mkfs.xfs doesn't have richacl feature" + + _scratch_mkfs_xfs -m richacl=1 >/dev/null 2>&1 + _scratch_mount >/dev/null 2>&1 \ + || _notrun "kernel doesn't support richacl feature" +} + +__setup_scratch_richacl() +{ + _scratch_mkfs -O richacl >/dev/null 2>&1 \ + || _notrun "can't mkfs $FSTYP with option -O richacl" + _scratch_mount >/dev/null 2>&1 \ + || _notrun "kernel doesn't support richacl feature on $FSTYP" +} + +_setup_scratch_richacl() +{ + case "$FSTYP" in + xfs) _setup_scratch_richacl_xfs + ;; + ext4) __setup_scratch_richacl + ;; + *) _notrun "this test requires richacl support on \$SCRATCH_DEV" + ;; + esac +} + # check that kernel and filesystem support direct I/O _require_odirect() {
richacl/Makefile new file +23 -0
@@ -0,0 +1,23 @@ +# +# Copyright (C) 2015 Red Hat, Inc. +# + +TESTS = apply-masks basic chmod chown create delete setrichacl-modify \ + write-vs-append ctime auto-inheritance + +LSRCFILES = test-lib.sh $(TESTS) + +TOPDIR = .. +include $(TOPDIR)/include/builddefs + +TARGET_DIR = $(PKG_LIB_DIR)/richacl + +include $(BUILDRULES) + +install: + $(INSTALL) -m 755 -d $(TARGET_DIR) + $(INSTALL) -m 755 $(TESTS) $(TARGET_DIR) + $(INSTALL) -m 644 test-lib.sh $(TARGET_DIR) + +# Nothing. +install-dev install-lib:
richacl/apply-masks new file +163 -0
163 lines not on this page · raw message
richacl/auto-inheritance new file +191 -0
191 lines not on this page · raw message
richacl/basic new file +97 -0
97 lines not on this page · raw message
richacl/chmod new file +40 -0
@@ -0,0 +1,40 @@ +#! /bin/bash + +. ${0%/*}/test-lib.sh + +require_runas +require_richacls +use_testdir + +export LC_ALL=C + +# Create file as root +ncheck "touch a" + +# We cannot set the acl as another user +runas -u 99 -g 99 +check "setrichacl --set '99:rwc::allow' a || echo status: \$?" <<EOF +a: Operation not permitted +status: 1 +EOF + +# We cannot chmod as another user +check "chmod 666 a || echo status: \$?" <<EOF +chmod: changing permissions of 'a': Operation not permitted +status: 1 +EOF + +# Give user 99 the write_acl permission +runas +ncheck "setrichacl --set '99:rwpC::allow' a" + +# Now user 99 can setrichacl and chmod ... +runas -u 99 -g 99 +ncheck "setrichacl --set '99:rwpC::allow' a" +ncheck "chmod 666 a" + +# ... but chmod disables the write_acl permission +check "setrichacl --set '99:rwpC::allow' a || echo status: \$?" <<EOF +a: Operation not permitted +status: 1 +EOF
richacl/chown new file +42 -0
42 lines not on this page · raw message
richacl/create new file +36 -0
@@ -0,0 +1,36 @@ +#! /bin/bash + +. ${0%/*}/test-lib.sh + +require_runas +require_richacls +use_testdir + +export LC_ALL=C + +# Create directories as root with different permissions +ncheck "mkdir d1 d2 d3" +ncheck "setrichacl --set '99:wx::allow' d2" +ncheck "setrichacl --set '99:px::allow' d3" + +runas -u 99 -g 99 + +# Cannot create files or directories without permissions +check "touch d1/f || :" <<EOF +touch: cannot touch 'd1/f': Permission denied +EOF +check "mkdir d1/d || :" <<EOF +mkdir: cannot create directory 'd1/d': Permission denied +EOF + +# Can create files with add_file (w) permission +ncheck "touch d2/f" +check "mkdir d2/d || :" <<EOF +mkdir: cannot create directory 'd2/d': Permission denied +EOF + +# Can create directories with add_subdirectory (p) permission +check "touch d3/f || :" <<EOF +touch: cannot touch 'd3/f': Permission denied +EOF +ncheck "mkdir d3/d"
richacl/ctime new file +35 -0
@@ -0,0 +1,35 @@ +#! /bin/bash + +. ${0%/*}/test-lib.sh + +require_runas +require_richacls +use_testdir + +export LC_ALL=C + +ncheck "touch a" + +# Without write access, the ctime cannot be changed +runas -u 99 -g 99 +check "touch a || :" <<EOF +touch: cannot touch 'a': Permission denied +EOF + +runas +ncheck "setrichacl --set '99:rw::allow' a" + +# With write access, the ctime can be set to the current time, but not to +# any other time +runas -u 99 -g 99 +ncheck "touch a" +check "touch -d '1 hour ago' a || :" <<EOF +touch: setting times of 'a': Operation not permitted +EOF + +runas +ncheck "setrichacl --set '99:rwA::allow' a" + +# With set_attributes access, the ctime can be set to an arbitrary time +runas -u 99 -g 99 +ncheck "touch -d '1 hour ago' a"
richacl/delete new file +89 -0
89 lines not on this page · raw message
richacl/setrichacl-modify new file +57 -0
57 lines not on this page · raw message
richacl/test-lib.sh new file +154 -0
154 lines not on this page · raw message
richacl/write-vs-append new file +54 -0
54 lines not on this page · raw message
tests/generic/178 new file +77 -0
77 lines not on this page · raw message
tests/generic/group +1 -0
@@ -180,6 +180,7 @@ 175 clone_stress 176 clone_stress 177 auto quick prealloc metadata +178 richacl auto 184 metadata auto quick 192 atime auto 193 metadata auto quick
Signature · 6 lines
2.5.0 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
PATCH v3 6/6 Remove the obsolete nfs4acl tests
In reply to Andreas GruenbacherThe nfs4acl tests don't make sense anymore as they have been obsoleted by richacls.
--- nfs4acl/Makefile | 29 ---- nfs4acl/apply-mask.test | 143 ------------------- nfs4acl/basic.test | 70 ---------- nfs4acl/chmod.test | 31 ----- nfs4acl/chown.test | 63 --------- nfs4acl/computed-mode.test | 62 --------- nfs4acl/create.test | 35 ----- nfs4acl/ctime.test | 36 ----- nfs4acl/delete.test | 77 ---------- nfs4acl/run | 298 --------------------------------------- nfs4acl/unrepresentable.test | 20 --- nfs4acl/write-vs-append.test | 46 ------ tests/xfs/191 | 75 ---------- tests/xfs/191.out | 324 ------------------------------------------- tests/xfs/group | 1 - 15 files changed, 1310 deletions(-) delete mode 100644 nfs4acl/Makefile delete mode 100644 nfs4acl/apply-mask.test delete mode 100644 nfs4acl/basic.test delete mode 100644 nfs4acl/chmod.test delete mode 100644 nfs4acl/chown.test delete mode 100644 nfs4acl/computed-mode.test delete mode 100644 nfs4acl/create.test delete mode 100644 nfs4acl/ctime.test delete mode 100644 nfs4acl/delete.test delete mode 100755 nfs4acl/run delete mode 100644 nfs4acl/unrepresentable.test delete mode 100644 nfs4acl/write-vs-append.test delete mode 100755 tests/xfs/191 delete mode 100644 tests/xfs/191.out
nfs4acl/Makefile deleted +0 -29
@@ -1,29 +0,0 @@ -#----------------------------------------------------------------------- -# Copyright (c) 2008 Silicon Graphics, Inc. All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it would be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# -#----------------------------------------------------------------------- - -TOPDIR = .. -include $(TOPDIR)/include/builddefs - -LSRCFILES = run \ - apply-mask.test chmod.test computed-mode.test ctime.test \ - unrepresentable.test basic.test chown.test create.test \ - delete.test write-vs-append.test - -include $(BUILDRULES) - -default install install-dev install-lib:
nfs4acl/apply-mask.test deleted +0 -143
143 lines not on this page · raw message
nfs4acl/basic.test deleted +0 -70
70 lines not on this page · raw message
nfs4acl/chmod.test deleted +0 -31
@@ -1,31 +0,0 @@ -$ mkdir d -$ cd d - -$ whoami -> root - -$ touch a - -Neet to have write_acl permission to chmod or set the acl: - $ su bin - $ chmod 666 a - > chmod: changing permissions of `a': Operation not permitted - $ nfs4acl --set 'bin:rwM::allow' a - > a: Operation not permitted - -$ su -$ nfs4acl --set 'bin:rwm::allow' a - -Can set the acl now: - $ su bin - $ nfs4acl --set 'bin:rwm::allow' a - -A chmod limits the permissions to the specified mode, which always disables -write_acl: - $ chmod 666 a - $ nfs4acl --set 'bin:rwm::allow' a - > a: Operation not permitted - -$ su -$ cd .. -$ rm -rf d
nfs4acl/chown.test deleted +0 -63
63 lines not on this page · raw message
nfs4acl/computed-mode.test deleted +0 -62
62 lines not on this page · raw message
nfs4acl/create.test deleted +0 -35
@@ -1,35 +0,0 @@ -$ mkdir d -$ cd d - -$ whoami -> root - -$ mkdir d1 d2 d3 d4 -$ nfs4acl --set 'daemon:wx::allow' d2 -$ nfs4acl --set 'daemon:ax::allow' d3 -$ nfs4acl --set 'daemon:wax::allow' d4 - -$ su daemon - -Cannot create files or directories without permissions: - $ touch d1/f - > touch: cannot touch `d1/f': Permission denied - $ mkdir d1/d - > mkdir: cannot create directory `d1/d': Permission denied - -Can create files with add_file (w) permission: - $ touch d2/f - $ mkdir d2/d - > mkdir: cannot create directory `d2/d': Permission denied - -Can create directories with add_subdirectory (p) permission: - $ touch d3/f - > touch: cannot touch `d3/f': Permission denied - $ mkdir d3/d - -Both permissions at the same time: - $ touch d4/f - $ mkdir d4/d -$ su -$ cd .. -$ rm -rf d
nfs4acl/ctime.test deleted +0 -36
@@ -1,36 +0,0 @@ -$ mkdir d -$ cd d - -$ whoami -> root - -$ touch a b -$ sleep 1 - -Without write access, the ctime cannot be changed. - $ su bin - $ touch a - > touch: cannot touch `a': Permission denied - -With write access, the ctime can be set to the current time, but not to -any other time: - $ su - $ nfs4acl --set 'bin:rw::allow' a - - $ su bin - $ touch a - $ [ b -ot a ] || echo 'b should be older than a' - $ touch -r b a - > touch: setting times of `a': Operation not permitted - -With set_attributes access, the ctime can be set to an arbitrary time: - $ su - $ nfs4acl --set 'bin:rwt::allow' a - - $ su bin - $ touch -r b a - $ [ b -ot a -o a -ot b ] && echo 'a should be as old as b' - -$ su -$ cd .. -$ rm -rf d
nfs4acl/delete.test deleted +0 -77
77 lines not on this page · raw message
nfs4acl/run deleted +0 -298
298 lines not on this page · raw message
nfs4acl/unrepresentable.test deleted +0 -20
@@ -1,20 +0,0 @@ -Test cases for (acl, masks) pairs that cannot be represented as -pure ACLs - -$ rm -rf d -$ mkdir d -$ cd d - -$ touch x - -$ nfs4acl --set 'group@:rw::allow' x -$ chmod 600 x -$ ls -l x | cut -d ' ' -f 1 -> -rw------- -$ nfs4acl --get x -> x: -> -$ rm -f x - -$ cd .. -$ rm -rf d
nfs4acl/write-vs-append.test deleted +0 -46
46 lines not on this page · raw message
tests/xfs/191 deleted +0 -75
75 lines not on this page · raw message
tests/xfs/191.out deleted +0 -324
324 lines not on this page · raw message
tests/xfs/group +0 -1
@@ -176,7 +176,6 @@ 188 ci dir auto 189 mount auto quick 190 rw auto quick -191 nfs4acl auto 194 rw auto 195 ioctl dump auto quick 196 quota auto quick
Signature · 6 lines
2.5.0 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs