public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 0/3] Richacl tests
@ 2016-03-16 11:26 Andreas Gruenbacher
  2016-03-16 11:26 ` [PATCH v5 1/3] Rename output file templates to match TEST.out* Andreas Gruenbacher
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Andreas Gruenbacher @ 2016-03-16 11:26 UTC (permalink / raw)
  To: fstests; +Cc: Andreas Gruenbacher

Here we go with the richacl tests converted into "golden output matching"
tests.  The tests no longer consistently check the exit statuses of commands
and it is more difficult to figure out which piece of output belongs to which
command and to trace back from a failure to the command that has failed.  Still
better than nothing, though.

Andreas Gruenbacher (3):
  Rename output file templates to match TEST.out*
  xfs/191: Remove obsolete nfs4acl tests
  generic/338-346: Add richacl tests

 .gitignore                   |  19 +++
 common/rc                    |  39 ++++++
 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/generic/338            | 117 ++++++++++++++++
 tests/generic/338.out        |  94 +++++++++++++
 tests/generic/339            | 109 +++++++++++++++
 tests/generic/339.out        | 140 +++++++++++++++++++
 tests/generic/340            |  90 ++++++++++++
 tests/generic/340.out        |  39 ++++++
 tests/generic/341            |  77 ++++++++++
 tests/generic/341.out        |   9 ++
 tests/generic/342            |  76 ++++++++++
 tests/generic/342.out        |  11 ++
 tests/generic/343            |  75 ++++++++++
 tests/generic/343.out        |  11 ++
 tests/generic/344            |  75 ++++++++++
 tests/generic/344.out        |   7 +
 tests/generic/345            | 116 ++++++++++++++++
 tests/generic/345.out        |  24 ++++
 tests/generic/346            |  80 +++++++++++
 tests/generic/346.out        |  19 +++
 tests/generic/group          |   9 ++
 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, 1339 insertions(+), 1413 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 100755 tests/generic/338
 create mode 100644 tests/generic/338.out
 create mode 100755 tests/generic/339
 create mode 100644 tests/generic/339.out
 create mode 100755 tests/generic/340
 create mode 100644 tests/generic/340.out
 create mode 100755 tests/generic/341
 create mode 100644 tests/generic/341.out
 create mode 100755 tests/generic/342
 create mode 100644 tests/generic/342.out
 create mode 100755 tests/generic/343
 create mode 100644 tests/generic/343.out
 create mode 100755 tests/generic/344
 create mode 100644 tests/generic/344.out
 create mode 100755 tests/generic/345
 create mode 100644 tests/generic/345.out
 create mode 100755 tests/generic/346
 create mode 100644 tests/generic/346.out
 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

-- 
2.5.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v5 1/3] Rename output file templates to match TEST.out*
  2016-03-16 11:26 [PATCH v5 0/3] Richacl tests Andreas Gruenbacher
@ 2016-03-16 11:26 ` Andreas Gruenbacher
  2016-03-16 11:26 ` [PATCH v5 2/3] xfs/191: Remove obsolete nfs4acl tests Andreas Gruenbacher
  2016-03-16 11:26 ` [PATCH v5 3/3] generic/338-346: Add richacl tests Andreas Gruenbacher
  2 siblings, 0 replies; 5+ messages in thread
From: Andreas Gruenbacher @ 2016-03-16 11:26 UTC (permalink / raw)
  To: fstests; +Cc: Andreas Gruenbacher

Rename the expected output files so that they match "$TEST_NAME.out*";
this makes the file names a bit more consistent.

Add $TEST_NAME.out and similar symlinks to .gitignore.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
---
 .gitignore                 | 19 +++++++++++++++++
 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 ++++++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 122 insertions(+), 103 deletions(-)
 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

diff --git a/.gitignore b/.gitignore
index 28fa205..f9ea1fa 100644
--- a/.gitignore
+++ b/.gitignore
@@ -199,3 +199,22 @@
 /dmapi/src/suite2/src/test_invis
 /dmapi/src/suite2/src/test_region
 /dmapi/src/suite2/src/test_rights
+
+# Symlinked files
+/tests/generic/088.out
+/tests/generic/097.out
+/tests/xfs/018.op
+/tests/xfs/022.out
+/tests/xfs/023.out
+/tests/xfs/030.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/082.op
+/tests/xfs/096.out
+/tests/xfs/146.out
diff --git a/tests/xfs/096 b/tests/xfs/096
index c289c10..f949e83 100755
--- a/tests/xfs/096
+++ b/tests/xfs/096
@@ -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
diff --git a/tests/xfs/096.external b/tests/xfs/096.external
deleted file mode 100644
index 3122330..0000000
--- a/tests/xfs/096.external
+++ /dev/null
@@ -1,50 +0,0 @@
-QA output created by 096
-
-# su too big but must be a multiple of fs block size too
---- mkfs=-l version=2,su=262656 ---
-log stripe unit (262656) must be a multiple of the block size (4096)
-
-
-# test log stripe greater than LR size
---- mkfs=-l version=2,su=266240 ---
-meta-data=DEV isize=N      agcount=N, agsize=N blks
-data     =                       bsize=4096   blocks=N, imaxpct=N
-         =                       sunit=0      swidth=0 blks, unwritten=1
-naming   =version 2              bsize=4096
-log      =LOG                    bsize=4096   blocks=N, version=N
-realtime =REALTIME               extsz=N, blocks=N, rtextents=N
-
-
-# same test but get log stripe from data stripe
---- mkfs=-l version=2 -d su=266240,sw=1 ---
-meta-data=DEV isize=N      agcount=N, agsize=N blks
-data     =                       bsize=4096   blocks=N, imaxpct=N
-         =                       sunit=65     swidth=65 blks, unwritten=1
-naming   =version 2              bsize=4096
-log      =LOG                    bsize=4096   blocks=N, version=N
-         =                       sunit=N blks
-realtime =REALTIME               extsz=N, blocks=N, rtextents=N
-
-
-# test out data stripe
---- mkfs=-m crc=0 -l version=1 -d su=266240,sw=1 ---
-meta-data=DEV isize=N      agcount=N, agsize=N blks
-data     =                       bsize=4096   blocks=N, imaxpct=N
-         =                       sunit=65     swidth=65 blks, unwritten=1
-naming   =version 2              bsize=4096
-log      =LOG                    bsize=4096   blocks=N, version=N
-         =                       sunit=N blks
-realtime =REALTIME               extsz=N, blocks=N, rtextents=N
-
-
-# test out data stripe the same but using sunit & swidth
---- mkfs=-m crc=0 -l version=1 -d sunit=520,swidth=520 ---
-meta-data=DEV isize=N      agcount=N, agsize=N blks
-data     =                       bsize=4096   blocks=N, imaxpct=N
-         =                       sunit=65     swidth=65 blks, unwritten=1
-naming   =version 2              bsize=4096
-log      =LOG                    bsize=4096   blocks=N, version=N
-         =                       sunit=N blks
-realtime =REALTIME               extsz=N, blocks=N, rtextents=N
-
-
diff --git a/tests/xfs/096.internal b/tests/xfs/096.internal
deleted file mode 100644
index 80201d2..0000000
--- a/tests/xfs/096.internal
+++ /dev/null
@@ -1,51 +0,0 @@
-QA output created by 096
-
-# su too big but must be a multiple of fs block size too
---- mkfs=-l version=2,su=262656 ---
-log stripe unit (262656) must be a multiple of the block size (4096)
-
-
-# test log stripe greater than LR size
---- mkfs=-l version=2,su=266240 ---
-meta-data=DEV isize=N    agcount=N, agsize=N blks
-data     =                       bsize=4096   blocks=N, imaxpct=N
-         =                       sunit=0      swidth=0 blks, unwritten=1
-naming   =version 2              bsize=4096
-log      =LOG                    bsize=4096   blocks=N, version=N
-         =                       sunit=N blks
-realtime =REALTIME               extsz=N, blocks=N, rtextents=N
-
-
-# same test but get log stripe from data stripe
---- mkfs=-l version=2 -d su=266240,sw=1 ---
-meta-data=DEV isize=N    agcount=N, agsize=N blks
-data     =                       bsize=4096   blocks=N, imaxpct=N
-         =                       sunit=65     swidth=65 blks, unwritten=1
-naming   =version 2              bsize=4096
-log      =LOG                    bsize=4096   blocks=N, version=N
-         =                       sunit=N blks
-realtime =REALTIME               extsz=N, blocks=N, rtextents=N
-
-
-# test out data stripe
---- mkfs=-m crc=0 -l version=1 -d su=266240,sw=1 ---
-meta-data=DEV isize=N    agcount=N, agsize=N blks
-data     =                       bsize=4096   blocks=N, imaxpct=N
-         =                       sunit=65     swidth=65 blks, unwritten=1
-naming   =version 2              bsize=4096
-log      =LOG                    bsize=4096   blocks=N, version=N
-         =                       sunit=N blks
-realtime =REALTIME               extsz=N, blocks=N, rtextents=N
-
-
-# test out data stripe the same but using sunit & swidth
---- mkfs=-m crc=0 -l version=1 -d sunit=520,swidth=520 ---
-meta-data=DEV isize=N    agcount=N, agsize=N blks
-data     =                       bsize=4096   blocks=N, imaxpct=N
-         =                       sunit=65     swidth=65 blks, unwritten=1
-naming   =version 2              bsize=4096
-log      =LOG                    bsize=4096   blocks=N, version=N
-         =                       sunit=N blks
-realtime =REALTIME               extsz=N, blocks=N, rtextents=N
-
-
diff --git a/tests/xfs/096.out.external b/tests/xfs/096.out.external
new file mode 100644
index 0000000..3122330
--- /dev/null
+++ b/tests/xfs/096.out.external
@@ -0,0 +1,50 @@
+QA output created by 096
+
+# su too big but must be a multiple of fs block size too
+--- mkfs=-l version=2,su=262656 ---
+log stripe unit (262656) must be a multiple of the block size (4096)
+
+
+# test log stripe greater than LR size
+--- mkfs=-l version=2,su=266240 ---
+meta-data=DEV isize=N      agcount=N, agsize=N blks
+data     =                       bsize=4096   blocks=N, imaxpct=N
+         =                       sunit=0      swidth=0 blks, unwritten=1
+naming   =version 2              bsize=4096
+log      =LOG                    bsize=4096   blocks=N, version=N
+realtime =REALTIME               extsz=N, blocks=N, rtextents=N
+
+
+# same test but get log stripe from data stripe
+--- mkfs=-l version=2 -d su=266240,sw=1 ---
+meta-data=DEV isize=N      agcount=N, agsize=N blks
+data     =                       bsize=4096   blocks=N, imaxpct=N
+         =                       sunit=65     swidth=65 blks, unwritten=1
+naming   =version 2              bsize=4096
+log      =LOG                    bsize=4096   blocks=N, version=N
+         =                       sunit=N blks
+realtime =REALTIME               extsz=N, blocks=N, rtextents=N
+
+
+# test out data stripe
+--- mkfs=-m crc=0 -l version=1 -d su=266240,sw=1 ---
+meta-data=DEV isize=N      agcount=N, agsize=N blks
+data     =                       bsize=4096   blocks=N, imaxpct=N
+         =                       sunit=65     swidth=65 blks, unwritten=1
+naming   =version 2              bsize=4096
+log      =LOG                    bsize=4096   blocks=N, version=N
+         =                       sunit=N blks
+realtime =REALTIME               extsz=N, blocks=N, rtextents=N
+
+
+# test out data stripe the same but using sunit & swidth
+--- mkfs=-m crc=0 -l version=1 -d sunit=520,swidth=520 ---
+meta-data=DEV isize=N      agcount=N, agsize=N blks
+data     =                       bsize=4096   blocks=N, imaxpct=N
+         =                       sunit=65     swidth=65 blks, unwritten=1
+naming   =version 2              bsize=4096
+log      =LOG                    bsize=4096   blocks=N, version=N
+         =                       sunit=N blks
+realtime =REALTIME               extsz=N, blocks=N, rtextents=N
+
+
diff --git a/tests/xfs/096.out.internal b/tests/xfs/096.out.internal
new file mode 100644
index 0000000..80201d2
--- /dev/null
+++ b/tests/xfs/096.out.internal
@@ -0,0 +1,51 @@
+QA output created by 096
+
+# su too big but must be a multiple of fs block size too
+--- mkfs=-l version=2,su=262656 ---
+log stripe unit (262656) must be a multiple of the block size (4096)
+
+
+# test log stripe greater than LR size
+--- mkfs=-l version=2,su=266240 ---
+meta-data=DEV isize=N    agcount=N, agsize=N blks
+data     =                       bsize=4096   blocks=N, imaxpct=N
+         =                       sunit=0      swidth=0 blks, unwritten=1
+naming   =version 2              bsize=4096
+log      =LOG                    bsize=4096   blocks=N, version=N
+         =                       sunit=N blks
+realtime =REALTIME               extsz=N, blocks=N, rtextents=N
+
+
+# same test but get log stripe from data stripe
+--- mkfs=-l version=2 -d su=266240,sw=1 ---
+meta-data=DEV isize=N    agcount=N, agsize=N blks
+data     =                       bsize=4096   blocks=N, imaxpct=N
+         =                       sunit=65     swidth=65 blks, unwritten=1
+naming   =version 2              bsize=4096
+log      =LOG                    bsize=4096   blocks=N, version=N
+         =                       sunit=N blks
+realtime =REALTIME               extsz=N, blocks=N, rtextents=N
+
+
+# test out data stripe
+--- mkfs=-m crc=0 -l version=1 -d su=266240,sw=1 ---
+meta-data=DEV isize=N    agcount=N, agsize=N blks
+data     =                       bsize=4096   blocks=N, imaxpct=N
+         =                       sunit=65     swidth=65 blks, unwritten=1
+naming   =version 2              bsize=4096
+log      =LOG                    bsize=4096   blocks=N, version=N
+         =                       sunit=N blks
+realtime =REALTIME               extsz=N, blocks=N, rtextents=N
+
+
+# test out data stripe the same but using sunit & swidth
+--- mkfs=-m crc=0 -l version=1 -d sunit=520,swidth=520 ---
+meta-data=DEV isize=N    agcount=N, agsize=N blks
+data     =                       bsize=4096   blocks=N, imaxpct=N
+         =                       sunit=65     swidth=65 blks, unwritten=1
+naming   =version 2              bsize=4096
+log      =LOG                    bsize=4096   blocks=N, version=N
+         =                       sunit=N blks
+realtime =REALTIME               extsz=N, blocks=N, rtextents=N
+
+
-- 
2.5.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v5 2/3] xfs/191: Remove obsolete nfs4acl tests
  2016-03-16 11:26 [PATCH v5 0/3] Richacl tests Andreas Gruenbacher
  2016-03-16 11:26 ` [PATCH v5 1/3] Rename output file templates to match TEST.out* Andreas Gruenbacher
@ 2016-03-16 11:26 ` Andreas Gruenbacher
  2016-03-16 11:26 ` [PATCH v5 3/3] generic/338-346: Add richacl tests Andreas Gruenbacher
  2 siblings, 0 replies; 5+ messages in thread
From: Andreas Gruenbacher @ 2016-03-16 11:26 UTC (permalink / raw)
  To: fstests; +Cc: Andreas Gruenbacher

The nfs4acl tests don't make sense anymore as they have been obsoleted
by richacls.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
---
 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

diff --git a/nfs4acl/Makefile b/nfs4acl/Makefile
deleted file mode 100644
index 42313f3..0000000
--- a/nfs4acl/Makefile
+++ /dev/null
@@ -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:
diff --git a/nfs4acl/apply-mask.test b/nfs4acl/apply-mask.test
deleted file mode 100644
index 9b9483a..0000000
--- a/nfs4acl/apply-mask.test
+++ /dev/null
@@ -1,143 +0,0 @@
-$ rm -rf d
-$ mkdir d
-$ cd d
-
-$ touch x
-
-$ nfs4acl --set 'owner@:rw::allow group@:rw::allow everyone@:r::allow' x
-$ nfs4acl --get x
-> x:
-> owner@:rw::allow
-> group@:rw::allow
-> everyone@:r::allow
->
-
-$ nfs4acl --set 'everyone@:w::allow owner@:r::allow group@:r::allow' x
-$ chmod 664 x
-$ nfs4acl --get x
-> x:
-> owner@:rw::allow
-> group@:rw::allow
->
-
-$ nfs4acl --set 'everyone@:w::deny owner@:rw::allow group@:rw::allow' x
-$ chmod 664 x
-$ nfs4acl --get x
-> x:
-> owner@:r::allow
-> group@:r::allow
->
-
-$ nfs4acl --set 'owner@:rwmo::allow' x
-$ nfs4acl --get x
-> x:
-> owner@:rwmo::allow
->
-
-$ chmod 644 x
-$ nfs4acl --get x
-> x:
-> owner@:rw::allow
->
-
-$ nfs4acl --set 'root:rw::allow' x
-$ chmod 664 x
-$ nfs4acl --get x
-> x:
-> root:rw::allow
->
-
-$ chmod 644 x
-$ nfs4acl --get x
-> x:
-> root:r::allow
->
-
-$ chmod 664 x
-$ nfs4acl --get x
-> x:
-> root:rw::allow
->
-
-$ nfs4acl --set 'root:rw::allow everyone@:r::allow' x
-$ chmod 664 x
-$ nfs4acl --get x
-> x:
-> root:rw::allow
-> everyone@:r::allow
->
-
-$ nfs4acl --set 'root:r::allow everyone@:rw::allow' x
-$ chmod 664 x
-$ nfs4acl --get x
-> x:
-> root:rw::allow
-> owner@:rw::allow
-> group@:rw::allow
-> everyone@:r::allow
->
-
-$ nfs4acl --set 'root:w::deny everyone@:rw::allow' x
-$ chmod 664 x
-$ nfs4acl --get x
-> x:
-> root:w::deny
-> owner@:rw::allow
-> group@:rw::allow
-> root:r::allow
-> everyone@:r::allow
->
-
-$ nfs4acl --set 'root:rw::allow root:w::deny everyone@:rw::allow' x
-$ chmod 664 x
-$ nfs4acl --get x
-> x:
-> root:rw::allow
-> root:w::deny
-> owner@:rw::allow
-> group@:rw::allow
-> everyone@:r::allow
->
-
-$ nfs4acl --set 'everyone@:rw::allow' x
-$ chmod 066 x
-$ nfs4acl --get x
-> x:
-> owner@:rw::deny
-> everyone@:rw::allow
-> 
-
-$ chmod 006 x
-$ nfs4acl --get x
-> x:
-> owner@:rw::deny
-> group@:rw::deny
-> everyone@:rw::allow
-> 
-
-$ chmod 606 x
-$ nfs4acl --get x
-> x:
-> group@:rw::deny
-> everyone@:rw::allow
-> 
-
-$ nfs4acl --set 'root:rw::allow everyone@:rw::allow' x
-$ chmod 606 x
-$ nfs4acl --get x
-> x:
-> group@:rw::deny
-> everyone@:rw::allow
-> 
-
-$ chmod 646 x
-$ nfs4acl --get x
-> x:
-> root:r::allow
-> group@:w::deny
-> root:w::deny
-> everyone@:rw::allow
-> 
-
-$ cd ..
-$ rm -rf d
diff --git a/nfs4acl/basic.test b/nfs4acl/basic.test
deleted file mode 100644
index 1ae2896..0000000
--- a/nfs4acl/basic.test
+++ /dev/null
@@ -1,70 +0,0 @@
-$ rm -rf d
-$ mkdir d
-$ cd d
-
-$ chown bin .
-$ su bin
-
-$ touch x
-$ nfs4acl --set 'everyone@:rw::allow' x
-$ ls -l x | cut -d ' ' -f 1
-> -rw-rw-rw-
-
-$ nfs4acl --get x
-> x:
-> everyone@:rw::allow
->
-
-$ chmod 664 x
-$ ls -l x | cut -d ' ' -f 1
-> -rw-rw-r--
-
-$ nfs4acl --get x
-> x:
-> owner@:rw::allow
-> group@:rw::allow
-> everyone@:r::allow
->
-
-$ mkdir sub 
-$ nfs4acl --set 'everyone@:rwax:fd:allow' sub
-$ ls -dl sub | cut -d ' ' -f 1
-> drwxrwxrwx
-
-$ nfs4acl --get sub
-> sub:
-> everyone@:rwax:fd:allow
->
-
-$ chmod 775 sub
-$ ls -dl sub | cut -d ' ' -f 1
-> drwxrwxr-x
-$ nfs4acl --get sub
-> sub:
-> owner@:rwax::allow
-> group@:rwax::allow
-> everyone@:rwax:fdi:allow
-> everyone@:rx::allow
->
-
-$ touch sub/f
-$ ls -l sub/f | cut -d ' ' -f 1
-> -rw-rw-rw-
-
-$ nfs4acl --get sub/f
-> sub/f:
-> everyone@:rwa::allow
->
-
-$ mkdir sub/sub2
-$ ls -dl sub/sub2 | cut -d ' ' -f 1
-> drwxrwxrwx
-
-$ nfs4acl --get sub/sub2
-> sub/sub2:
-> everyone@:rwax:fd:allow
->
-
-$ su
-$ cd ..
-$ rm -rf d
diff --git a/nfs4acl/chmod.test b/nfs4acl/chmod.test
deleted file mode 100644
index f4238b0..0000000
--- a/nfs4acl/chmod.test
+++ /dev/null
@@ -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
diff --git a/nfs4acl/chown.test b/nfs4acl/chown.test
deleted file mode 100644
index df29bf4..0000000
--- a/nfs4acl/chown.test
+++ /dev/null
@@ -1,63 +0,0 @@
-$ mkdir d
-$ cd d
-
-$ whoami
-> root
-
-$ id -Gn daemon
-> daemon bin
-
-$ touch a
-
-Chown and chgrp with no take ownership permission fails:
-	$ su daemon
-	$ chown daemon a
-	> chown: changing ownership of `a': Operation not permitted
-	$ chgrp daemon a
-	> chgrp: changing group of `a': Operation not permitted
-	$ nfs4acl --set 'daemon:rwo::allow' a
-	> a: Operation not permitted
-
-Add the take_ownership permission. This is reflected in the file masks; the
-file mode cannot show this though:
-	$ su
-	$ nfs4acl --set 'daemon:rwo::allow' a
-
-Chown and chgrp to an arbitrary other user or group fails:
-	$ su daemon
-	$ chown root a
-	> chown: changing ownership of `a': Operation not permitted
-	$ chgrp root a
-	> chgrp: changing group of `a': Operation not permitted
-
-Changing the mode makes that an upper bound of the permissions granted, even
-when the file mode stays the same:
-	$ su
-	$ ls -l a | cut -d ' ' -f1
-	> -rw-rw----
-	$ chmod 660 a
-
-Chown and chgrp to the same user or a group the process is in now fails
-because the masks now do not grant change_ownership access:
-	$ su daemon
-	$ chown daemon a
-	> chown: changing ownership of `a': Operation not permitted
-	$ chgrp daemon a
-	> chgrp: changing group of `a': Operation not permitted
-	$ chgrp bin a
-	> chgrp: changing group of `a': Operation not permitted
-
-Add back change_ownership:
-	$ su
-	$ nfs4acl --set 'daemon:rwo::allow' a
-
-Now, chgrp to one of the groups the process is in and chown to the same user
-succeeds:
-	$ su daemon
-	$ chgrp daemon a
-	$ chgrp bin a
-	$ chown daemon a
-
-$ su
-$ cd ..
-$ rm -rf d
diff --git a/nfs4acl/computed-mode.test b/nfs4acl/computed-mode.test
deleted file mode 100644
index baa68d6..0000000
--- a/nfs4acl/computed-mode.test
+++ /dev/null
@@ -1,62 +0,0 @@
-$ rm -rf d
-$ mkdir d
-$ cd d
-
-$ mkdir e
-
-$ nfs4acl --set 'owner@:rwx:f:allow' e
-$ touch e/f
-$ ls -l e/f | cut -d ' ' -f 1
-> -rw-------
-$ rm e/f
-
-$ nfs4acl --set 'group@:rwx:f:allow' e
-$ touch e/f
-$ ls -l e/f | cut -d ' ' -f 1
-> -rw-rw----
-$ rm e/f
-
-$ nfs4acl --set 'everyone@:rwx:f:allow' e
-$ touch e/f
-$ ls -l e/f | cut -d ' ' -f 1
-> -rw-rw-rw-
-$ rm e/f
-
-$ nfs4acl --set 'owner@:rwx:f:allow root:rx:f:deny root:rx:f:allow' e
-$ touch e/f
-$ ls -l e/f | cut -d ' ' -f 1
-> -rw-------
-$ rm e/f
-
-$ nfs4acl --set 'owner@:rwx::allow everyone@:w:fi:deny everyone@:rwx:fi:allow' e
-$ touch e/f
-$ ls -l e/f | cut -d ' ' -f 1
-> -r--r--r--
-$ rm e/f
-
-$ nfs4acl --set 'owner@:rwx::allow root:rx:fi:deny root:rx:fi:allow' e
-$ touch e/f
-$ ls -l e/f | cut -d ' ' -f 1
-> ----------
-$ rm e/f
-
-$ nfs4acl --set 'owner@:rx:fi:allow group@:rwx:fi:deny everyone@:rwx:f:allow' e
-$ touch e/f
-$ ls -l e/f | cut -d ' ' -f 1
-> -rw----rw-
-$ rm e/f
-
-$ nfs4acl --set 'owner@:rx:fi:allow root:rwx:fi:deny everyone@:rwx:f:allow' e
-$ touch e/f
-$ ls -l e/f | cut -d ' ' -f 1
-> -rw-rw-rw-
-$ rm e/f
-
-$ nfs4acl --set 'everyone@:w:fi:deny root:rx:fi:allow everyone@:rwx:f:allow' e
-$ touch e/f
-$ ls -l e/f | cut -d ' ' -f 1
-> -r--r--r--
-$ rm e/f
-
-$ cd ..
-$ rm -rf d
diff --git a/nfs4acl/create.test b/nfs4acl/create.test
deleted file mode 100644
index e140f4b..0000000
--- a/nfs4acl/create.test
+++ /dev/null
@@ -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
diff --git a/nfs4acl/ctime.test b/nfs4acl/ctime.test
deleted file mode 100644
index 614d79b..0000000
--- a/nfs4acl/ctime.test
+++ /dev/null
@@ -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
diff --git a/nfs4acl/delete.test b/nfs4acl/delete.test
deleted file mode 100644
index 9c5f24f..0000000
--- a/nfs4acl/delete.test
+++ /dev/null
@@ -1,77 +0,0 @@
-$ mkdir d
-$ cd d
-
-$ whoami
-> root
-
-$ id -Gn daemon
-> daemon bin
-
-$ mkdir n1
-$ touch n1/f
-
-$ mkdir d2 d3 d4 d5 d6 d7
-$ touch d2/f d3/f d4/f d5/f d6/f d7/f d7/g
-$ chown daemon d2
-$ chgrp bin d3
-$ chmod g+w d3
-$ nfs4acl --set 'daemon:wx::allow' d4
-$ nfs4acl --set 'daemon:d::allow' d5
-$ nfs4acl --set 'daemon:xd::allow' d6
-$ nfs4acl --set 'daemon:D::allow' d7/f d7/g
-$ chmod 664 d7/g
-
-$ mkdir s2 s3 s4 s5 s6 s7
-$ chmod +t s2 s3 s4 s5 s6 s7
-$ touch s2/f s3/f s4/f s5/f s6/f s7/f s7/g
-$ chown daemon s2
-$ chgrp bin s3
-$ chmod g+w s3
-$ nfs4acl --set 'daemon:wx::allow' s4
-$ nfs4acl --set 'daemon:d::allow' s5
-$ nfs4acl --set 'daemon:xd::allow' s6
-$ nfs4acl --set 'daemon:D::allow' s7/f
-$ nfs4acl --set 'daemon:D::allow' s7/g s7/g
-$ chmod 664 s7/g
-
-$ su daemon
-
-Cannot delete files without permissions:
-	$ rm n1/f
-	> rm: cannot remove `n1/f': Permission denied
-
-Can delete files we own:
-	$ rm d2/f s2/f
-
-Cannot delete files where we are in the owning group in a non-sticky directory,
-but not in a sticky one:
-	$ rm d3/f s3/f
-	> rm: cannot remove `s3/f': Operation not permitted
-
-"Write_data/execute" access does not include delete_child access, and so this
-is not enough for deleting:
-	$ rm d4/f s4/f
-	> rm: cannot remove `d4/f': Permission denied
-	> rm: cannot remove `s4/f': Permission denied
-
-"Delete_child" access alone also is not sufficient:
-	$ rm d5/f s5/f
-	> rm: cannot remove `d5/f': Permission denied
-	> rm: cannot remove `s5/f': Permission denied
-
-"Execute/delete_child" on the directory does allow that, though, but only in
-a non-sticky directory:
-	$ rm d6/f s6/f
-	> rm: cannot remove `s6/f': Operation not permitted
-
-"Delete" on the child itself overrides the sticky check as well:
-	$ rm d7/f s7/f
-
-But Delete is not a subset of POSIX read/write, so chmod turns it off:
-	$ rm d7/g s7/g
-	> rm: cannot remove `d7/g': Permission denied
-	> rm: cannot remove `s7/g': Permission denied
-
-$ su
-$ cd ..
-$ rm -rf d
diff --git a/nfs4acl/run b/nfs4acl/run
deleted file mode 100755
index 360739e..0000000
--- a/nfs4acl/run
+++ /dev/null
@@ -1,298 +0,0 @@
-#!/usr/bin/perl -w -U
-
-#
-# Possible improvements:
-#
-# - distinguish stdout and stderr output
-# - add environment variable like assignments
-# - run up to a specific line
-# - resume at a specific line
-#
-
-use strict;
-use FileHandle;
-use Getopt::Std;
-use POSIX qw(isatty setuid getcwd);
-use vars qw($opt_l $opt_v);
-
-no warnings qw(taint);
-
-$opt_l = ~0;  # a really huge number
-getopts('l:v');
-
-my ($OK, $FAILED) = ("ok", "failed");
-if (isatty(fileno(STDOUT))) {
-	$OK = "\033[32m" . $OK . "\033[m";
-	$FAILED = "\033[31m\033[1m" . $FAILED . "\033[m";
-}
-
-sub exec_test($$);
-sub process_test($$$$);
-
-my ($prog, $in, $out) = ([], [], []);
-my $prog_line = 0;
-my ($tests, $failed) = (0,0);
-my $lineno;
-my $width = ($ENV{COLUMNS} || 80) >> 1;
-
-for (;;) {
-  my $line = <>; $lineno++;
-  if (defined $line) {
-    # Substitute %VAR and %{VAR} with environment variables.
-    $line =~ s[%(\w+)][$ENV{$1}]eg;
-    $line =~ s[%{(\w+)}][$ENV{$1}]eg;
-  }
-  if (defined $line) {
-    if ($line =~ s/^\s*< ?//) {
-      push @$in, $line;
-    } elsif ($line =~ s/^\s*> ?//) {
-      push @$out, $line;
-    } else {
-      process_test($prog, $prog_line, $in, $out);
-      last if $prog_line >= $opt_l;
-
-      $prog = [];
-      $prog_line = 0;
-    }
-    if ($line =~ s/^\s*\$ ?//) {
-      $line =~ s/\s+#.*//;  # remove comments here...
-      $prog = [ map { s/\\(.)/$1/g; $_ } split /(?<!\\)\s+/, $line ];
-      $prog_line = $lineno;
-      $in = [];
-      $out = [];
-    }
-  } else {
-    process_test($prog, $prog_line, $in, $out);
-    last;
-  }
-}
-
-my $status = sprintf("%d commands (%d passed, %d failed)",
-	$tests, $tests-$failed, $failed);
-if (isatty(fileno(STDOUT))) {
-	if ($failed) {
-		$status = "\033[31m\033[1m" . $status . "\033[m";
-	} else {
-		$status = "\033[32m" . $status . "\033[m";
-	}
-}
-print $status, "\n";
-exit $failed ? 1 : 0;
-
-
-sub process_test($$$$) {
-  my ($prog, $prog_line, $in, $out) = @_;
-
-  return unless @$prog;
-
-       my $p = [ @$prog ];
-       print "[$prog_line] \$ ", join(' ',
-             map { s/\s/\\$&/g; $_ } @$p), " -- ";
-       my $result = exec_test($prog, $in);
-       my @good = ();
-       my $nmax = (@$out > @$result) ? @$out : @$result;
-       for (my $n=0; $n < $nmax; $n++) {
-	   my $use_re;
-	   if (defined $out->[$n] && $out->[$n] =~ /^~ /) {
-		$use_re = 1;
-		$out->[$n] =~ s/^~ //g;
-	   }
-
-           if (!defined($out->[$n]) || !defined($result->[$n]) ||
-               (!$use_re && $result->[$n] ne $out->[$n]) ||
-               ( $use_re && $result->[$n] !~ /^$out->[$n]/)) {
-               push @good, ($use_re ? '!~' : '!=');
-	   }
-	   else {
-               push @good, ($use_re ? '=~' : '==');
-           }
-       }
-       my $good = !(grep /!/, @good);
-       $tests++;
-       $failed++ unless $good;
-       print $good ? $OK : $FAILED, "\n";
-       if (!$good || $opt_v) {
-         for (my $n=0; $n < $nmax; $n++) {
-	   my $l = defined($out->[$n]) ? $out->[$n] : "~";
-	   chomp $l;
-	   my $r = defined($result->[$n]) ? $result->[$n] : "~";
-	   chomp $r;
-	   print sprintf("%-" . ($width-3) . "s %s %s\n",
-			 $r, $good[$n], $l);
-         }
-       }
-}
-
-
-sub su($) {
-  my ($user) = @_;
-
-  $user ||= "root";
-
-  my ($login, $pass, $uid, $gid) = getpwnam($user)
-    or return [ "su: user $user does not exist\n" ];
-  my @groups = ();
-  my $fh = new FileHandle("/etc/group")
-    or return [ "opening /etc/group: $!\n" ];
-  while (<$fh>) {
-    chomp;
-    my ($group, $passwd, $gid, $users) = split /:/;
-    foreach my $u (split /,/, $users) {
-      push @groups, $gid
-	if ($user eq $u);
-    }
-  }
-  $fh->close;
-
-  my $groups = join(" ", ($gid, $gid, @groups));
-  #print STDERR "[[$groups]]\n";
-  $! = 0;  # reset errno
-  $> = 0;
-  $( = $gid;
-  $) = $groups;
-  if ($!) {
-    return [ "su: $!\n" ];
-  }
-  if ($uid != 0) {
-    $> = $uid;
-    #$< = $uid;
-    if ($!) {
-      return [ "su: $prog->[1]: $!\n" ];
-    }
-  }
-  #print STDERR "[($>,$<)($(,$))]";
-  return [];
-}
-
-
-sub sg($) {
-  my ($group) = @_;
-
-  my $gid = getgrnam($group)
-    or return [ "sg: group $group does not exist\n" ];
-  my %groups = map { $_ eq $gid ? () : ($_ => 1) } (split /\s/, $));
-  
-  #print STDERR "<<", join("/", keys %groups), ">>\n";
-  my $groups = join(" ", ($gid, $gid, keys %groups));
-  #print STDERR "[[$groups]]\n";
-  $! = 0;  # reset errno
-  if ($> != 0) {
-	  my $uid = $>;
-	  $> = 0;
-	  $( = $gid;
-	  $) = $groups;
-	  $> = $uid;
-  } else {
-	  $( = $gid;
-	  $) = $groups;
-  }
-  if ($!) {
-    return [ "sg: $!\n" ];
-  }
-  print STDERR "[($>,$<)($(,$))]";
-  return [];
-}
-
-
-sub exec_test($$) {
-  my ($prog, $in) = @_;
-  local (*IN, *IN_DUP, *IN2, *OUT_DUP, *OUT, *OUT2);
-  my $needs_shell = (join('', @$prog) =~ /[][|<>"'`\$\*\?]/);
-
-  if ($prog->[0] eq "umask") {
-    umask oct $prog->[1];
-    return [];
-  } elsif ($prog->[0] eq "cd") {
-    if (!chdir $prog->[1]) {
-      return [ "chdir: $prog->[1]: $!\n" ];
-    }
-    $ENV{PWD} = getcwd;
-    return [];
-  } elsif ($prog->[0] eq "su") {
-    return su($prog->[1]);
-  } elsif ($prog->[0] eq "sg") {
-    return sg($prog->[1]);
-  } elsif ($prog->[0] eq "export") {
-    my ($name, $value) = split /=/, $prog->[1];
-    # FIXME: need to evaluate $value, so that things like this will work:
-    # export dir=$PWD/dir
-    $ENV{$name} = $value;
-    return [];
-  } elsif ($prog->[0] eq "unset") {
-    delete $ENV{$prog->[1]};
-    return [];
-  }
-
-  pipe *IN2, *OUT
-    or die "Can't create pipe for reading: $!";
-  open *IN_DUP, "<&STDIN"
-    or *IN_DUP = undef;
-  open *STDIN, "<&IN2"
-    or die "Can't duplicate pipe for reading: $!";
-  close *IN2;
-
-  open *OUT_DUP, ">&STDOUT"
-    or die "Can't duplicate STDOUT: $!";
-  pipe *IN, *OUT2
-    or die "Can't create pipe for writing: $!";
-  open *STDOUT, ">&OUT2"
-    or die "Can't duplicate pipe for writing: $!";
-  close *OUT2;
-
-  *STDOUT->autoflush();
-  *OUT->autoflush();
-
-  if (fork()) {
-    # Server
-    if (*IN_DUP) {
-      open *STDIN, "<&IN_DUP"
-        or die "Can't duplicate STDIN: $!";
-      close *IN_DUP
-        or die "Can't close STDIN duplicate: $!";
-    }
-    open *STDOUT, ">&OUT_DUP"
-      or die "Can't duplicate STDOUT: $!";
-    close *OUT_DUP
-      or die "Can't close STDOUT duplicate: $!";
-
-    foreach my $line (@$in) {
-      #print "> $line";
-      print OUT $line;
-    }
-    close *OUT
-      or die "Can't close pipe for writing: $!";
-
-    my $result = [];
-    while (<IN>) {
-      #print "< $_";
-      if ($needs_shell) {
-	s#^/bin/sh: line \d+: ##;
-      }
-      push @$result, $_;
-    }
-    return $result;
-  } else {
-    # Client
-    $< = $>;
-    close IN
-      or die "Can't close read end for input pipe: $!";
-    close OUT
-      or die "Can't close write end for output pipe: $!";
-    close OUT_DUP
-      or die "Can't close STDOUT duplicate: $!";
-    local *ERR_DUP;
-    open ERR_DUP, ">&STDERR"
-      or die "Can't duplicate STDERR: $!";
-    open STDERR, ">&STDOUT"
-      or die "Can't join STDOUT and STDERR: $!";
-
-    if ($needs_shell) {
-      exec ('/bin/sh', '-c', join(" ", @$prog));
-    } else {
-      exec @$prog;
-    }
-    print STDERR $prog->[0], ": $!\n";
-    exit;
-  }
-}
-
diff --git a/nfs4acl/unrepresentable.test b/nfs4acl/unrepresentable.test
deleted file mode 100644
index 17fe5d4..0000000
--- a/nfs4acl/unrepresentable.test
+++ /dev/null
@@ -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
diff --git a/nfs4acl/write-vs-append.test b/nfs4acl/write-vs-append.test
deleted file mode 100644
index f1f940a..0000000
--- a/nfs4acl/write-vs-append.test
+++ /dev/null
@@ -1,46 +0,0 @@
-$ mkdir d
-$ cd d
-
-$ whoami
-> root
-
-$ touch a b c d e f
-$ nfs4acl --set 'owner@:*::allow' a
-$ nfs4acl --set 'owner@:*::allow bin:w::allow' b
-$ nfs4acl --set 'owner@:*::allow bin:a::allow' c
-$ nfs4acl --set 'owner@:*::allow bin:wa::allow' d
-$ nfs4acl --set 'bin:a::deny owner@:*::allow bin:w::allow' e
-$ nfs4acl --set 'bin:w::deny owner@:*::allow bin:a::allow' f
-
-$ su bin
-$ echo a > a
-> /bin/sh: a: Permission denied
-$ echo b > b
-$ echo c > c
-> /bin/sh: c: Permission denied
-$ echo d > d
-$ echo e > e
-$ echo f > f
-> /bin/sh: f: Permission denied
-
-$ echo A >> a
-> /bin/sh: a: Permission denied
-$ echo B >> b
-> /bin/sh: b: Permission denied
-$ echo C >> c
-$ echo D >> d
-$ echo E >> e
-> /bin/sh: e: Permission denied
-$ echo F >> f
-
-$ su
-$ cat a b c d e f
-> b
-> C
-> d
-> D
-> e
-> F
-
-$ cd ..
-$ rm -rf d
diff --git a/tests/xfs/191 b/tests/xfs/191
deleted file mode 100755
index e9aef20..0000000
--- a/tests/xfs/191
+++ /dev/null
@@ -1,75 +0,0 @@
-#!/bin/bash
-# FS QA Test No. 191
-#
-# To call into the nfs4acl qa suite of Andreas Gruenbacher.
-#
-#-----------------------------------------------------------------------
-# 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
-#
-#-----------------------------------------------------------------------
-#
-
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1	# failure is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
-. ./common/filter
-
-# real QA test starts here
-
-# Modify as appropriate.
-_supported_fs xfs
-_supported_os Linux
-
-_require_scratch
-_scratch_mkfs_xfs -i nfs4acl 1>$tmp.mkfs 2>$seqres.full
-if [ $? -ne 0 ]
-then
-	_notrun "no mkfs support for NFS v4 ACLs"
-fi
-
-_scratch_mount 2>/dev/null
-if [ $? -ne 0 ]
-then
-	_notrun "no kernel mount support for NFS v4 ACLs"
-fi
-
-set_prog_path nfs4acl >>$seqres.full
-if [ $? -ne 0 ]
-then
-	_notrun "no nfs4acl utility found"
-fi
-
-cd $SCRATCH_MNT
-for file in $here/nfs4acl/*.test
-do
-	print_file=`echo $file | sed 's/.*nfs4acl/nfs4acl/'`
-	echo ""
-	echo "*** $print_file ***"
-	echo ""
-	$here/nfs4acl/run $file
-done
-
-# success, all done
-status=0
-exit
diff --git a/tests/xfs/191.out b/tests/xfs/191.out
deleted file mode 100644
index 7a37ec8..0000000
--- a/tests/xfs/191.out
+++ /dev/null
@@ -1,324 +0,0 @@
-QA output created by 191
-
-*** nfs4acl/apply-mask.test ***
-
-[1] $ rm -rf d -- ok
-[2] $ mkdir d -- ok
-[3] $ cd d -- ok
-[5] $ touch x -- ok
-[7] $ nfs4acl --set 'owner@:rw::allow group@:rw::allow everyone@:r::allow' x -- ok
-[8] $ nfs4acl --get x -- ok
-[15] $ nfs4acl --set 'everyone@:w::allow owner@:r::allow group@:r::allow' x -- ok
-[16] $ chmod 664 x -- ok
-[17] $ nfs4acl --get x -- ok
-[23] $ nfs4acl --set 'everyone@:w::deny owner@:rw::allow group@:rw::allow' x -- ok
-[24] $ chmod 664 x -- ok
-[25] $ nfs4acl --get x -- ok
-[31] $ nfs4acl --set 'owner@:rwmo::allow' x -- ok
-[32] $ nfs4acl --get x -- ok
-[37] $ chmod 644 x -- ok
-[38] $ nfs4acl --get x -- ok
-[43] $ nfs4acl --set 'root:rw::allow' x -- ok
-[44] $ chmod 664 x -- ok
-[45] $ nfs4acl --get x -- ok
-[50] $ chmod 644 x -- ok
-[51] $ nfs4acl --get x -- ok
-[56] $ chmod 664 x -- ok
-[57] $ nfs4acl --get x -- ok
-[62] $ nfs4acl --set 'root:rw::allow everyone@:r::allow' x -- ok
-[63] $ chmod 664 x -- ok
-[64] $ nfs4acl --get x -- ok
-[70] $ nfs4acl --set 'root:r::allow everyone@:rw::allow' x -- ok
-[71] $ chmod 664 x -- ok
-[72] $ nfs4acl --get x -- ok
-[80] $ nfs4acl --set 'root:w::deny everyone@:rw::allow' x -- ok
-[81] $ chmod 664 x -- ok
-[82] $ nfs4acl --get x -- ok
-[91] $ nfs4acl --set 'root:rw::allow root:w::deny everyone@:rw::allow' x -- ok
-[92] $ chmod 664 x -- ok
-[93] $ nfs4acl --get x -- ok
-[102] $ nfs4acl --set 'everyone@:rw::allow' x -- ok
-[103] $ chmod 066 x -- ok
-[104] $ nfs4acl --get x -- ok
-[110] $ chmod 006 x -- ok
-[111] $ nfs4acl --get x -- ok
-[118] $ chmod 606 x -- ok
-[119] $ nfs4acl --get x -- ok
-[125] $ nfs4acl --set 'root:rw::allow everyone@:rw::allow' x -- ok
-[126] $ chmod 606 x -- ok
-[127] $ nfs4acl --get x -- ok
-[133] $ chmod 646 x -- ok
-[134] $ nfs4acl --get x -- ok
-[142] $ cd .. -- ok
-[143] $ rm -rf d -- ok
-49 commands (49 passed, 0 failed)
-
-*** nfs4acl/basic.test ***
-
-[1] $ rm -rf d -- ok
-[2] $ mkdir d -- ok
-[3] $ cd d -- ok
-[5] $ chown bin . -- ok
-[6] $ su bin -- ok
-[8] $ touch x -- ok
-[9] $ nfs4acl --set 'everyone@:rw::allow' x -- ok
-[10] $ ls -l x | cut -d ' ' -f 1 -- ok
-[13] $ nfs4acl --get x -- ok
-[18] $ chmod 664 x -- ok
-[19] $ ls -l x | cut -d ' ' -f 1 -- ok
-[22] $ nfs4acl --get x -- ok
-[29] $ mkdir sub -- ok
-[30] $ nfs4acl --set 'everyone@:rwax:fd:allow' sub -- ok
-[31] $ ls -dl sub | cut -d ' ' -f 1 -- ok
-[34] $ nfs4acl --get sub -- ok
-[39] $ chmod 775 sub -- ok
-[40] $ ls -dl sub | cut -d ' ' -f 1 -- ok
-[42] $ nfs4acl --get sub -- ok
-[50] $ touch sub/f -- ok
-[51] $ ls -l sub/f | cut -d ' ' -f 1 -- ok
-[54] $ nfs4acl --get sub/f -- ok
-[59] $ mkdir sub/sub2 -- ok
-[60] $ ls -dl sub/sub2 | cut -d ' ' -f 1 -- ok
-[63] $ nfs4acl --get sub/sub2 -- ok
-[68] $ su -- ok
-[69] $ cd .. -- ok
-[70] $ rm -rf d -- ok
-28 commands (28 passed, 0 failed)
-
-*** nfs4acl/chmod.test ***
-
-[1] $ mkdir d -- ok
-[2] $ cd d -- ok
-[4] $ whoami -- ok
-[7] $ touch a -- ok
-[10] $ su bin -- ok
-[11] $ chmod 666 a -- ok
-[13] $ nfs4acl --set 'bin:rwM::allow' a -- ok
-[16] $ su -- ok
-[17] $ nfs4acl --set 'bin:rwm::allow' a -- ok
-[20] $ su bin -- ok
-[21] $ nfs4acl --set 'bin:rwm::allow' a -- ok
-[25] $ chmod 666 a -- ok
-[26] $ nfs4acl --set 'bin:rwm::allow' a -- ok
-[29] $ su -- ok
-[30] $ cd .. -- ok
-[31] $ rm -rf d -- ok
-16 commands (16 passed, 0 failed)
-
-*** nfs4acl/chown.test ***
-
-[1] $ mkdir d -- ok
-[2] $ cd d -- ok
-[4] $ whoami -- ok
-[7] $ id -Gn daemon -- ok
-[10] $ touch a -- ok
-[13] $ su daemon -- ok
-[14] $ chown daemon a -- ok
-[16] $ chgrp daemon a -- ok
-[18] $ nfs4acl --set 'daemon:rwo::allow' a -- ok
-[23] $ su -- ok
-[24] $ nfs4acl --set 'daemon:rwo::allow' a -- ok
-[27] $ su daemon -- ok
-[28] $ chown root a -- ok
-[30] $ chgrp root a -- ok
-[35] $ su -- ok
-[36] $ ls -l a | cut -d ' ' -f1 -- ok
-[38] $ chmod 660 a -- ok
-[42] $ su daemon -- ok
-[43] $ chown daemon a -- ok
-[45] $ chgrp daemon a -- ok
-[47] $ chgrp bin a -- ok
-[51] $ su -- ok
-[52] $ nfs4acl --set 'daemon:rwo::allow' a -- ok
-[56] $ su daemon -- ok
-[57] $ chgrp daemon a -- ok
-[58] $ chgrp bin a -- ok
-[59] $ chown daemon a -- ok
-[61] $ su -- ok
-[62] $ cd .. -- ok
-[63] $ rm -rf d -- ok
-30 commands (30 passed, 0 failed)
-
-*** nfs4acl/computed-mode.test ***
-
-[1] $ rm -rf d -- ok
-[2] $ mkdir d -- ok
-[3] $ cd d -- ok
-[5] $ mkdir e -- ok
-[7] $ nfs4acl --set 'owner@:rwx:f:allow' e -- ok
-[8] $ touch e/f -- ok
-[9] $ ls -l e/f | cut -d ' ' -f 1 -- ok
-[11] $ rm e/f -- ok
-[13] $ nfs4acl --set 'group@:rwx:f:allow' e -- ok
-[14] $ touch e/f -- ok
-[15] $ ls -l e/f | cut -d ' ' -f 1 -- ok
-[17] $ rm e/f -- ok
-[19] $ nfs4acl --set 'everyone@:rwx:f:allow' e -- ok
-[20] $ touch e/f -- ok
-[21] $ ls -l e/f | cut -d ' ' -f 1 -- ok
-[23] $ rm e/f -- ok
-[25] $ nfs4acl --set 'owner@:rwx:f:allow root:rx:f:deny root:rx:f:allow' e -- ok
-[26] $ touch e/f -- ok
-[27] $ ls -l e/f | cut -d ' ' -f 1 -- ok
-[29] $ rm e/f -- ok
-[31] $ nfs4acl --set 'owner@:rwx::allow everyone@:w:fi:deny everyone@:rwx:fi:allow' e -- ok
-[32] $ touch e/f -- ok
-[33] $ ls -l e/f | cut -d ' ' -f 1 -- ok
-[35] $ rm e/f -- ok
-[37] $ nfs4acl --set 'owner@:rwx::allow root:rx:fi:deny root:rx:fi:allow' e -- ok
-[38] $ touch e/f -- ok
-[39] $ ls -l e/f | cut -d ' ' -f 1 -- ok
-[41] $ rm e/f -- ok
-[43] $ nfs4acl --set 'owner@:rx:fi:allow group@:rwx:fi:deny everyone@:rwx:f:allow' e -- ok
-[44] $ touch e/f -- ok
-[45] $ ls -l e/f | cut -d ' ' -f 1 -- ok
-[47] $ rm e/f -- ok
-[49] $ nfs4acl --set 'owner@:rx:fi:allow root:rwx:fi:deny everyone@:rwx:f:allow' e -- ok
-[50] $ touch e/f -- ok
-[51] $ ls -l e/f | cut -d ' ' -f 1 -- ok
-[53] $ rm e/f -- ok
-[55] $ nfs4acl --set 'everyone@:w:fi:deny root:rx:fi:allow everyone@:rwx:f:allow' e -- ok
-[56] $ touch e/f -- ok
-[57] $ ls -l e/f | cut -d ' ' -f 1 -- ok
-[59] $ rm e/f -- ok
-[61] $ cd .. -- ok
-[62] $ rm -rf d -- ok
-42 commands (42 passed, 0 failed)
-
-*** nfs4acl/create.test ***
-
-[1] $ mkdir d -- ok
-[2] $ cd d -- ok
-[4] $ whoami -- ok
-[7] $ mkdir d1 d2 d3 d4 -- ok
-[8] $ nfs4acl --set 'daemon:wx::allow' d2 -- ok
-[9] $ nfs4acl --set 'daemon:ax::allow' d3 -- ok
-[10] $ nfs4acl --set 'daemon:wax::allow' d4 -- ok
-[12] $ su daemon -- ok
-[15] $ touch d1/f -- ok
-[17] $ mkdir d1/d -- ok
-[21] $ touch d2/f -- ok
-[22] $ mkdir d2/d -- ok
-[26] $ touch d3/f -- ok
-[28] $ mkdir d3/d -- ok
-[31] $ touch d4/f -- ok
-[32] $ mkdir d4/d -- ok
-[33] $ su -- ok
-[34] $ cd .. -- ok
-[35] $ rm -rf d -- ok
-19 commands (19 passed, 0 failed)
-
-*** nfs4acl/ctime.test ***
-
-[1] $ mkdir d -- ok
-[2] $ cd d -- ok
-[4] $ whoami -- ok
-[7] $ touch a b -- ok
-[8] $ sleep 1 -- ok
-[11] $ su bin -- ok
-[12] $ touch a -- ok
-[17] $ su -- ok
-[18] $ nfs4acl --set 'bin:rw::allow' a -- ok
-[20] $ su bin -- ok
-[21] $ touch a -- ok
-[22] $ [ b -ot a ] || echo 'b should be older than a' -- ok
-[23] $ touch -r b a -- ok
-[27] $ su -- ok
-[28] $ nfs4acl --set 'bin:rwt::allow' a -- ok
-[30] $ su bin -- ok
-[31] $ touch -r b a -- ok
-[32] $ [ b -ot a -o a -ot b ] && echo 'a should be as old as b' -- ok
-[34] $ su -- ok
-[35] $ cd .. -- ok
-[36] $ rm -rf d -- ok
-21 commands (21 passed, 0 failed)
-
-*** nfs4acl/delete.test ***
-
-[1] $ mkdir d -- ok
-[2] $ cd d -- ok
-[4] $ whoami -- ok
-[7] $ id -Gn daemon -- ok
-[10] $ mkdir n1 -- ok
-[11] $ touch n1/f -- ok
-[13] $ mkdir d2 d3 d4 d5 d6 d7 -- ok
-[14] $ touch d2/f d3/f d4/f d5/f d6/f d7/f d7/g -- ok
-[15] $ chown daemon d2 -- ok
-[16] $ chgrp bin d3 -- ok
-[17] $ chmod g+w d3 -- ok
-[18] $ nfs4acl --set 'daemon:wx::allow' d4 -- ok
-[19] $ nfs4acl --set 'daemon:d::allow' d5 -- ok
-[20] $ nfs4acl --set 'daemon:xd::allow' d6 -- ok
-[21] $ nfs4acl --set 'daemon:D::allow' d7/f d7/g -- ok
-[22] $ chmod 664 d7/g -- ok
-[24] $ mkdir s2 s3 s4 s5 s6 s7 -- ok
-[25] $ chmod +t s2 s3 s4 s5 s6 s7 -- ok
-[26] $ touch s2/f s3/f s4/f s5/f s6/f s7/f s7/g -- ok
-[27] $ chown daemon s2 -- ok
-[28] $ chgrp bin s3 -- ok
-[29] $ chmod g+w s3 -- ok
-[30] $ nfs4acl --set 'daemon:wx::allow' s4 -- ok
-[31] $ nfs4acl --set 'daemon:d::allow' s5 -- ok
-[32] $ nfs4acl --set 'daemon:xd::allow' s6 -- ok
-[33] $ nfs4acl --set 'daemon:D::allow' s7/f -- ok
-[34] $ nfs4acl --set 'daemon:D::allow' s7/g s7/g -- ok
-[35] $ chmod 664 s7/g -- ok
-[37] $ su daemon -- ok
-[40] $ rm n1/f -- ok
-[44] $ rm d2/f s2/f -- ok
-[48] $ rm d3/f s3/f -- ok
-[53] $ rm d4/f s4/f -- ok
-[58] $ rm d5/f s5/f -- ok
-[64] $ rm d6/f s6/f -- ok
-[68] $ rm d7/f s7/f -- ok
-[71] $ rm d7/g s7/g -- ok
-[75] $ su -- ok
-[76] $ cd .. -- ok
-[77] $ rm -rf d -- ok
-40 commands (40 passed, 0 failed)
-
-*** nfs4acl/unrepresentable.test ***
-
-[4] $ rm -rf d -- ok
-[5] $ mkdir d -- ok
-[6] $ cd d -- ok
-[8] $ touch x -- ok
-[10] $ nfs4acl --set 'group@:rw::allow' x -- ok
-[11] $ chmod 600 x -- ok
-[12] $ ls -l x | cut -d ' ' -f 1 -- ok
-[14] $ nfs4acl --get x -- ok
-[17] $ rm -f x -- ok
-[19] $ cd .. -- ok
-[20] $ rm -rf d -- ok
-11 commands (11 passed, 0 failed)
-
-*** nfs4acl/write-vs-append.test ***
-
-[1] $ mkdir d -- ok
-[2] $ cd d -- ok
-[4] $ whoami -- ok
-[7] $ touch a b c d e f -- ok
-[8] $ nfs4acl --set 'owner@:*::allow' a -- ok
-[9] $ nfs4acl --set 'owner@:*::allow bin:w::allow' b -- ok
-[10] $ nfs4acl --set 'owner@:*::allow bin:a::allow' c -- ok
-[11] $ nfs4acl --set 'owner@:*::allow bin:wa::allow' d -- ok
-[12] $ nfs4acl --set 'bin:a::deny owner@:*::allow bin:w::allow' e -- ok
-[13] $ nfs4acl --set 'bin:w::deny owner@:*::allow bin:a::allow' f -- ok
-[15] $ su bin -- ok
-[16] $ echo a > a -- ok
-[18] $ echo b > b -- ok
-[19] $ echo c > c -- ok
-[21] $ echo d > d -- ok
-[22] $ echo e > e -- ok
-[23] $ echo f > f -- ok
-[26] $ echo A >> a -- ok
-[28] $ echo B >> b -- ok
-[30] $ echo C >> c -- ok
-[31] $ echo D >> d -- ok
-[32] $ echo E >> e -- ok
-[34] $ echo F >> f -- ok
-[36] $ su -- ok
-[37] $ cat a b c d e f -- ok
-[45] $ cd .. -- ok
-[46] $ rm -rf d -- ok
-27 commands (27 passed, 0 failed)
diff --git a/tests/xfs/group b/tests/xfs/group
index e0c4553..2bc2db4 100644
--- a/tests/xfs/group
+++ b/tests/xfs/group
@@ -188,7 +188,6 @@
 188 ci dir auto
 189 mount auto quick
 190 rw auto quick
-191 nfs4acl auto
 192 auto quick clone
 193 auto quick clone
 194 rw auto
-- 
2.5.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v5 3/3] generic/338-346: Add richacl tests
  2016-03-16 11:26 [PATCH v5 0/3] Richacl tests Andreas Gruenbacher
  2016-03-16 11:26 ` [PATCH v5 1/3] Rename output file templates to match TEST.out* Andreas Gruenbacher
  2016-03-16 11:26 ` [PATCH v5 2/3] xfs/191: Remove obsolete nfs4acl tests Andreas Gruenbacher
@ 2016-03-16 11:26 ` Andreas Gruenbacher
  2016-03-22 23:34   ` Dave Chinner
  2 siblings, 1 reply; 5+ messages in thread
From: Andreas Gruenbacher @ 2016-03-16 11:26 UTC (permalink / raw)
  To: fstests; +Cc: Andreas Gruenbacher

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
---
 common/rc             |  39 ++++++++++++++
 tests/generic/338     | 117 +++++++++++++++++++++++++++++++++++++++++
 tests/generic/338.out |  94 +++++++++++++++++++++++++++++++++
 tests/generic/339     | 109 +++++++++++++++++++++++++++++++++++++++
 tests/generic/339.out | 140 ++++++++++++++++++++++++++++++++++++++++++++++++++
 tests/generic/340     |  90 ++++++++++++++++++++++++++++++++
 tests/generic/340.out |  39 ++++++++++++++
 tests/generic/341     |  77 +++++++++++++++++++++++++++
 tests/generic/341.out |   9 ++++
 tests/generic/342     |  76 +++++++++++++++++++++++++++
 tests/generic/342.out |  11 ++++
 tests/generic/343     |  75 +++++++++++++++++++++++++++
 tests/generic/343.out |  11 ++++
 tests/generic/344     |  75 +++++++++++++++++++++++++++
 tests/generic/344.out |   7 +++
 tests/generic/345     | 116 +++++++++++++++++++++++++++++++++++++++++
 tests/generic/345.out |  24 +++++++++
 tests/generic/346     |  80 +++++++++++++++++++++++++++++
 tests/generic/346.out |  19 +++++++
 tests/generic/group   |   9 ++++
 20 files changed, 1217 insertions(+)
 create mode 100755 tests/generic/338
 create mode 100644 tests/generic/338.out
 create mode 100755 tests/generic/339
 create mode 100644 tests/generic/339.out
 create mode 100755 tests/generic/340
 create mode 100644 tests/generic/340.out
 create mode 100755 tests/generic/341
 create mode 100644 tests/generic/341.out
 create mode 100755 tests/generic/342
 create mode 100644 tests/generic/342.out
 create mode 100755 tests/generic/343
 create mode 100644 tests/generic/343.out
 create mode 100755 tests/generic/344
 create mode 100644 tests/generic/344.out
 create mode 100755 tests/generic/345
 create mode 100644 tests/generic/345.out
 create mode 100755 tests/generic/346
 create mode 100644 tests/generic/346.out

diff --git a/common/rc b/common/rc
index 16f5a43..d7472fc 100644
--- a/common/rc
+++ b/common/rc
@@ -1973,6 +1973,45 @@ _require_seek_data_hole()
         _notrun "File system does not support llseek(2) SEEK_DATA/HOLE"
 }
 
+_require_richacl()
+{
+	GETRICHACL_PROG=`set_prog_path getrichacl`
+	_require_command "$GETRICHACL_PROG" getrichacl
+	SETRICHACL_PROG=`set_prog_path setrichacl`
+	_require_command "$SETRICHACL_PROG" setrichacl
+}
+
+_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 on $FSTYP"
+}
+
+__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()
+{
+	_require_scratch
+	case "$FSTYP" in
+	xfs)    _setup_scratch_richacl_xfs
+		;;
+	ext4)   __setup_scratch_richacl
+		;;
+	*)      _notrun "this test requires richacl support on \$SCRATCH_DEV"
+		;;
+	esac
+}
+
 # check that a FS on a device is mounted
 # if so, return mount point
 #
diff --git a/tests/generic/338 b/tests/generic/338
new file mode 100755
index 0000000..8f82bce
--- /dev/null
+++ b/tests/generic/338
@@ -0,0 +1,117 @@
+#! /bin/bash
+# FS QA Test 338
+#
+# RichACL apply-masks test
+#
+#-----------------------------------------------------------------------
+# Copyright (c) 2016 Red Hat, 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
+#-----------------------------------------------------------------------
+#
+
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1	# failure is the default!
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+	cd /
+	rm -f $tmp.*
+}
+
+# get standard environment, filters and checks
+. ./common/rc
+
+# real QA test starts here
+
+_supported_fs generic
+_supported_os Linux
+_require_richacl
+_setup_scratch_richacl
+
+cd $SCRATCH_MNT
+
+touch x
+setrichacl --set 'owner@:rwp::allow group@:rwp::allow everyone@:r::allow' x
+getrichacl x
+
+setrichacl --set 'everyone@:wp::allow owner@:r::allow group@:r::allow' x
+chmod 664 x
+getrichacl x
+
+setrichacl --set 'everyone@:wp::deny owner@:rwp::allow group@:rwp::allow' x
+chmod 664 x
+getrichacl x
+
+setrichacl --set 'owner@:rwCo::allow' x
+getrichacl x
+
+setrichacl --set 'owner@:rwpCo::allow' x
+getrichacl x
+
+chmod 644 x
+getrichacl x
+
+setrichacl --set 'u:77:rwp::allow' x
+chmod 664 x
+getrichacl x
+
+chmod 644 x
+getrichacl --numeric-ids x
+
+chmod 664 x
+getrichacl x
+
+setrichacl --set 'u:77:rwp::allow everyone@:r::allow' x
+chmod 664 x
+getrichacl x
+
+setrichacl --set 'u:77:r::allow everyone@:rwp::allow' x
+chmod 664 x
+getrichacl x
+
+setrichacl --set 'u:77:wp::deny everyone@:rwp::allow' x
+chmod 664 x
+getrichacl x
+
+setrichacl --set 'u:77:rwp::allow u:77:wp::deny everyone@:rwp::allow' x
+chmod 664 x
+getrichacl x
+
+setrichacl --set 'everyone@:rwp::allow' x
+chmod 066 x
+getrichacl x
+
+chmod 006 x
+getrichacl x
+
+chmod 606 x
+getrichacl x
+
+setrichacl --set 'u:77:rwp::allow everyone@:rwp::allow' x
+chmod 606 x
+getrichacl x
+
+chmod 646 x
+getrichacl x
+
+# success, all done
+status=0
+exit
diff --git a/tests/generic/338.out b/tests/generic/338.out
new file mode 100644
index 0000000..be0df64
--- /dev/null
+++ b/tests/generic/338.out
@@ -0,0 +1,94 @@
+QA output created by 338
+x:
+    owner@:rwp----------::allow
+    group@:rwp----------::allow
+ everyone@:r------------::allow
+
+x:
+    owner@:rwp----------::allow
+    group@:rwp----------::allow
+ everyone@:r------------::allow
+
+x:
+    owner@:rwp----------::allow
+    group@:rwp----------::allow
+ everyone@:r------------::allow
+
+x:
+ owner@:rw-------Co--::allow
+
+x:
+ owner@:rwp----------::allow
+
+x:
+    owner@:rwp----------::allow
+ everyone@:r------------::allow
+
+x:
+    owner@:rwp----------::allow
+   user:77:rwp----------::allow
+    group@:r------------::deny
+ everyone@:r------------::allow
+
+x:
+    owner@:rwp----------::allow
+   user:77:r------------::allow
+    group@:r------------::deny
+ everyone@:r------------::allow
+
+x:
+    owner@:rwp----------::allow
+   user:77:rwp----------::allow
+    group@:r------------::deny
+ everyone@:r------------::allow
+
+x:
+    owner@:rwp----------::allow
+   user:77:rwp----------::allow
+ everyone@:r------------::allow
+
+x:
+   user:77:rwp----------::allow
+    owner@:rwp----------::allow
+    group@:rwp----------::allow
+ everyone@:r------------::allow
+
+x:
+    owner@:rwp----------::allow
+   user:77:-wp----------::deny
+    group@:rwp----------::allow
+ everyone@:r------------::allow
+
+x:
+    owner@:rwp----------::allow
+   user:77:rwp----------::allow
+   user:77:-wp----------::deny
+    group@:rwp----------::allow
+ everyone@:r------------::allow
+
+x:
+    owner@:rwp----------::deny
+ everyone@:rwp----------::allow
+
+x:
+    owner@:rwp----------::deny
+    group@:rwp----------::deny
+ everyone@:rwp----------::allow
+
+x:
+    owner@:rwp----------::allow
+    group@:rwp----------::deny
+ everyone@:rwp----------::allow
+
+x:
+    owner@:rwp----------::allow
+    group@:rwp----------::deny
+ everyone@:rwp----------::allow
+
+x:
+   user:77:r------------::allow
+    owner@:rwp----------::allow
+    group@:-wp----------::deny
+   user:77:-wp----------::deny
+ everyone@:rwp----------::allow
+
diff --git a/tests/generic/339 b/tests/generic/339
new file mode 100755
index 0000000..d8b3427
--- /dev/null
+++ b/tests/generic/339
@@ -0,0 +1,109 @@
+#! /bin/bash
+# FS QA Test 339
+#
+# RichACL auto-inheritance test
+#
+#-----------------------------------------------------------------------
+# Copyright (c) 2016 Red Hat, 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
+#-----------------------------------------------------------------------
+#
+
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1	# failure is the default!
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+	cd /
+	rm -f $tmp.*
+}
+
+# get standard environment, filters and checks
+. ./common/rc
+
+# real QA test starts here
+
+_supported_fs generic
+_supported_os Linux
+_require_richacl
+_setup_scratch_richacl
+
+cd $SCRATCH_MNT
+
+umask 022
+
+mkdir d1
+setrichacl --modify owner@:rwpxd:fd:allow,u:101:rw:fd:deny d1
+setrichacl --modify u:102:rw:f:deny d1
+setrichacl --modify u:103:rw:d:deny d1
+setrichacl --modify g:101:rw:fdi:deny d1
+
+setrichacl --modify flags:a d1
+
+getrichacl --numeric --raw d1
+
+mkdir d1/d2
+touch d1/d3
+
+# Mode bits derived from inherited ACEs
+getrichacl --numeric --raw d1/d2
+
+getrichacl --numeric --raw d1/d3
+
+mkdir d1/d2/d4
+touch d1/d2/d4/d5
+
+# Protected files
+mkdir d1/d6
+touch d1/d7
+
+getrichacl --numeric --raw d1/d2/d4
+
+getrichacl --numeric --raw d1/d2/d4/d5
+
+# Clear protected flag from all the ACLs
+setrichacl --modify flags:a d1/d2
+setrichacl --modify flags:a d1/d3
+setrichacl --modify flags:a d1/d2/d4
+setrichacl --modify flags:a d1/d2/d4/d5
+
+getrichacl --numeric d1 | sed -e 's/:fd:deny/:fd:allow/'
+
+setrichacl --set-file acl.txt d1
+
+getrichacl --numeric --raw d1
+
+getrichacl --numeric --raw d1/d2
+
+getrichacl --numeric --raw d1/d3
+
+getrichacl --numeric --raw d1/d2/d4
+
+getrichacl --numeric --raw d1/d2/d4/d5
+
+# No automatic inheritance for protected files
+getrichacl --numeric --raw d1/d6
+
+getrichacl --numeric --raw d1/d7
+
+# success, all done
+status=0
+exit
diff --git a/tests/generic/339.out b/tests/generic/339.out
new file mode 100644
index 0000000..7d7f0b1
--- /dev/null
+++ b/tests/generic/339.out
@@ -0,0 +1,140 @@
+QA output created by 339
+d1:
+     flags:a
+     owner:rwpxd-----------::mask
+     group:r--x------------::mask
+     other:r--x------------::mask
+  user:101:rw--------------:fd:deny
+  user:102:rw--------------:f:deny
+  user:103:rw--------------:d:deny
+ group:101:rw--------------:fdi:deny
+    owner@:rwpxd-----------:fd:allow
+ everyone@:r--x------------::allow
+
+d1/d2:
+     flags:map
+     owner:rwpxd-----------::mask
+     group:----------------::mask
+     other:----------------::mask
+  user:101:rw--------------:fda:deny
+  user:102:rw--------------:fia:deny
+  user:103:rw--------------:da:deny
+ group:101:rw--------------:fda:deny
+    owner@:rwpxd-----------:fda:allow
+
+d1/d3:
+     flags:map
+     owner:rwp-------------::mask
+     group:----------------::mask
+     other:----------------::mask
+  user:101:rw--------------:a:deny
+  user:102:rw--------------:a:deny
+ group:101:rw--------------:a:deny
+    owner@:rwpx------------:a:allow
+
+d1/d2/d4:
+     flags:map
+     owner:rwpxd-----------::mask
+     group:----------------::mask
+     other:----------------::mask
+  user:101:rw--------------:fda:deny
+  user:102:rw--------------:fia:deny
+  user:103:rw--------------:da:deny
+ group:101:rw--------------:fda:deny
+    owner@:rwpxd-----------:fda:allow
+
+d1/d2/d4/d5:
+     flags:map
+     owner:rwp-------------::mask
+     group:----------------::mask
+     other:----------------::mask
+  user:101:rw--------------:a:deny
+  user:102:rw--------------:a:deny
+ group:101:rw--------------:a:deny
+    owner@:rwpx------------:a:allow
+
+d1:
+     flags:a
+  user:101:rw-----------:fd:allow
+  user:102:rw-----------:f:deny
+  user:103:rw-----------:d:deny
+ group:101:rw-----------:fdi:deny
+    owner@:rwpxd--------:fd:allow
+ everyone@:r--x---------::allow
+
+acl.txt: No such file or directory
+d1:
+     flags:a
+     owner:rwpxd-----------::mask
+     group:r--x------------::mask
+     other:r--x------------::mask
+  user:101:rw--------------:fd:deny
+  user:102:rw--------------:f:deny
+  user:103:rw--------------:d:deny
+ group:101:rw--------------:fdi:deny
+    owner@:rwpxd-----------:fd:allow
+ everyone@:r--x------------::allow
+
+d1/d2:
+     flags:a
+     owner:rwpxd-----------::mask
+     group:----------------::mask
+     other:----------------::mask
+  user:101:rw--------------:fda:deny
+  user:102:rw--------------:fia:deny
+  user:103:rw--------------:da:deny
+ group:101:rw--------------:fda:deny
+    owner@:rwpxd-----------:fda:allow
+
+d1/d3:
+     flags:a
+     owner:rwp-------------::mask
+     group:----------------::mask
+     other:----------------::mask
+  user:101:rw--------------:a:deny
+  user:102:rw--------------:a:deny
+ group:101:rw--------------:a:deny
+    owner@:rwp-------------:a:allow
+
+d1/d2/d4:
+     flags:a
+     owner:rwpxd-----------::mask
+     group:----------------::mask
+     other:----------------::mask
+  user:101:rw--------------:fda:deny
+  user:102:rw--------------:fia:deny
+  user:103:rw--------------:da:deny
+ group:101:rw--------------:fda:deny
+    owner@:rwpxd-----------:fda:allow
+
+d1/d2/d4/d5:
+     flags:a
+     owner:rwp-------------::mask
+     group:----------------::mask
+     other:----------------::mask
+  user:101:rw--------------:a:deny
+  user:102:rw--------------:a:deny
+ group:101:rw--------------:a:deny
+    owner@:rwp-------------:a:allow
+
+d1/d6:
+     flags:map
+     owner:rwpxd-----------::mask
+     group:----------------::mask
+     other:----------------::mask
+  user:101:rw--------------:fda:deny
+  user:102:rw--------------:fia:deny
+  user:103:rw--------------:da:deny
+ group:101:rw--------------:fda:deny
+    owner@:rwpxd-----------:fda:allow
+
+d1/d7:
+     flags:map
+     owner:rwp-------------::mask
+     group:----------------::mask
+     other:----------------::mask
+  user:101:rw--------------:a:deny
+  user:102:rw--------------:a:deny
+ group:101:rw--------------:a:deny
+    owner@:rwpx------------:a:allow
+
diff --git a/tests/generic/340 b/tests/generic/340
new file mode 100755
index 0000000..da75b30
--- /dev/null
+++ b/tests/generic/340
@@ -0,0 +1,90 @@
+#! /bin/bash
+# FS QA Test 340
+#
+# RichACL basic test
+#
+#-----------------------------------------------------------------------
+# Copyright (c) 2016 Red Hat, 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
+#-----------------------------------------------------------------------
+#
+
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1	# failure is the default!
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+	cd /
+	rm -f $tmp.*
+}
+
+# get standard environment, filters and checks
+. ./common/rc
+
+# real QA test starts here
+
+_supported_fs generic
+_supported_os Linux
+_require_richacl
+_setup_scratch_richacl
+
+cd $SCRATCH_MNT
+
+umask 022
+
+touch x
+
+setrichacl --set 'everyone@:rwp::allow' x
+ls -l x | sed -e 's/[. ].*//'
+getrichacl x
+
+chmod 664 x
+ls -l x | sed -e 's/[. ].*//'
+getrichacl x
+
+# Note that unlike how the test cases look at first sight, we do *not* require
+# a richacl-enabled version of ls here ...
+
+mkdir sub
+setrichacl --set 'everyone@:rwpxd:fd:allow' sub
+ls -dl sub | sed -e 's/[.+ ].*/+/'
+getfattr -m system\.richacl sub
+
+chmod 775 sub
+ls -dl sub | sed -e 's/[.+ ].*/+/'
+getfattr -m system\.richacl sub
+getrichacl sub
+
+touch sub/f
+ls -l sub/f | sed -e 's/[. ].*//'
+getrichacl sub/f
+
+mkdir sub/sub2
+ls -dl sub/sub2 | sed -e 's/[.+ ].*/+/'
+getrichacl sub/sub2
+
+mkdir -m 750 sub/sub3
+ls -dl sub/sub3 | sed -e 's/[.+ ].*/+/'
+getrichacl sub/sub3
+
+# success, all done
+status=0
+exit
diff --git a/tests/generic/340.out b/tests/generic/340.out
new file mode 100644
index 0000000..f0874b0
--- /dev/null
+++ b/tests/generic/340.out
@@ -0,0 +1,39 @@
+QA output created by 340
+-rw-rw-rw-
+x:
+ everyone@:rwp----------::allow
+
+-rw-rw-r--
+x:
+    owner@:rwp----------::allow
+    group@:rwp----------::allow
+ everyone@:r------------::allow
+
+drwxrwxrwx+
+# file: sub
+system.richacl
+
+drwxrwxr-x+
+# file: sub
+system.richacl
+
+sub:
+    owner@:rwpxd--------::allow
+    group@:rwpxd--------::allow
+ everyone@:rwpxd--------:fdi:allow
+ everyone@:r--x---------::allow
+
+-rw-rw-rw-
+sub/f:
+ everyone@:rwp----------::allow
+
+drwxrwxrwx+
+sub/sub2:
+ everyone@:rwpxd--------:fd:allow
+
+drwxr-x---+
+sub/sub3:
+    owner@:rwpxd--------::allow
+    group@:r--x---------::allow
+ everyone@:rwpxd--------:fdi:allow
+
diff --git a/tests/generic/341 b/tests/generic/341
new file mode 100755
index 0000000..e94d357
--- /dev/null
+++ b/tests/generic/341
@@ -0,0 +1,77 @@
+#! /bin/bash
+# FS QA Test 341
+#
+# RichACL chmod test
+#
+#-----------------------------------------------------------------------
+# Copyright (c) 2016 Red Hat, 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
+#-----------------------------------------------------------------------
+#
+
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1	# failure is the default!
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+	cd /
+	rm -f $tmp.*
+}
+
+# get standard environment, filters and checks
+. ./common/rc
+
+# real QA test starts here
+
+_supported_fs generic
+_supported_os Linux
+_require_richacl
+_setup_scratch_richacl
+
+cd $SCRATCH_MNT
+
+r() {
+	echo "--- runas -u 99 -g 99 $*"
+	$here/src/runas -u 99 -g 99 -- "$@"
+}
+
+# Create file as root
+touch a
+
+# We cannot set the acl as another user
+r setrichacl --set 'u:99:rwc::allow' a
+
+# We cannot chmod as another user
+r chmod 666 a
+
+# Give user 99 the write_acl permission
+setrichacl --set 'u:99:rwpC::allow' a
+
+# Now user 99 can setrichacl and chmod ...
+r setrichacl --set 'u:99:rwpC::allow' a
+r chmod 666 a
+
+# ... but chmod disables the write_acl permission
+r setrichacl --set 'u:99:rwpC::allow' a
+
+# success, all done
+status=0
+exit
diff --git a/tests/generic/341.out b/tests/generic/341.out
new file mode 100644
index 0000000..6c5855c
--- /dev/null
+++ b/tests/generic/341.out
@@ -0,0 +1,9 @@
+QA output created by 341
+--- runas -u 99 -g 99 setrichacl --set u:99:rwc::allow a
+a: Operation not permitted
+--- runas -u 99 -g 99 chmod 666 a
+chmod: changing permissions of 'a': Operation not permitted
+--- runas -u 99 -g 99 setrichacl --set u:99:rwpC::allow a
+--- runas -u 99 -g 99 chmod 666 a
+--- runas -u 99 -g 99 setrichacl --set u:99:rwpC::allow a
+a: Operation not permitted
diff --git a/tests/generic/342 b/tests/generic/342
new file mode 100755
index 0000000..f9c77ea
--- /dev/null
+++ b/tests/generic/342
@@ -0,0 +1,76 @@
+#! /bin/bash
+# FS QA Test 342
+#
+# RichACL chown test
+#
+#-----------------------------------------------------------------------
+# Copyright (c) 2016 Red Hat, 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
+#-----------------------------------------------------------------------
+#
+
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1	# failure is the default!
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+	cd /
+	rm -f $tmp.*
+}
+
+# get standard environment, filters and checks
+. ./common/rc
+
+# real QA test starts here
+
+_supported_fs generic
+_supported_os Linux
+_require_richacl
+_setup_scratch_richacl
+
+cd $SCRATCH_MNT
+
+r() {
+	echo "--- runas -u 99 -g 99 $*"
+	$here/src/runas -u 99 -g 99 -- "$@"
+}
+
+# Create file as root
+touch a
+
+# Chown and chgrp with no take ownership permission fails
+r chown 99 a
+r chgrp 99 a
+
+# Add the take_ownership permission
+setrichacl --set 'u:99:rwpo::allow' a
+
+# Chown and chgrp to a user or group the process is not in fails
+r chown 100 a
+r chgrp 100 a
+
+# Chown and chgrp to a user and group the process is in succeeds
+r chown 99 a
+r chgrp 99 a
+
+# success, all done
+status=0
+exit
diff --git a/tests/generic/342.out b/tests/generic/342.out
new file mode 100644
index 0000000..db1eceb
--- /dev/null
+++ b/tests/generic/342.out
@@ -0,0 +1,11 @@
+QA output created by 342
+--- runas -u 99 -g 99 chown 99 a
+chown: changing ownership of 'a': Operation not permitted
+--- runas -u 99 -g 99 chgrp 99 a
+chgrp: changing group of 'a': Operation not permitted
+--- runas -u 99 -g 99 chown 100 a
+chown: changing ownership of 'a': Operation not permitted
+--- runas -u 99 -g 99 chgrp 100 a
+chgrp: changing group of 'a': Operation not permitted
+--- runas -u 99 -g 99 chown 99 a
+--- runas -u 99 -g 99 chgrp 99 a
diff --git a/tests/generic/343 b/tests/generic/343
new file mode 100755
index 0000000..88e4141
--- /dev/null
+++ b/tests/generic/343
@@ -0,0 +1,75 @@
+#! /bin/bash
+# FS QA Test 343
+#
+# RichACL create test
+#
+#-----------------------------------------------------------------------
+# Copyright (c) 2016 Red Hat, 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
+#-----------------------------------------------------------------------
+#
+
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1	# failure is the default!
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+	cd /
+	rm -f $tmp.*
+}
+
+# get standard environment, filters and checks
+. ./common/rc
+
+# real QA test starts here
+
+_supported_fs generic
+_supported_os Linux
+_require_richacl
+_setup_scratch_richacl
+
+cd $SCRATCH_MNT
+
+r() {
+	echo "--- runas -u 99 -g 99 $*"
+	$here/src/runas -u 99 -g 99 -- "$@"
+}
+
+# Create directories as root with different permissions
+mkdir d1 d2 d3
+setrichacl --set 'u:99:wx::allow' d2
+setrichacl --set 'u:99:px::allow' d3
+
+# Cannot create files or directories without permissions
+r touch d1/f
+r mkdir d1/d
+
+# Can create files with add_file (w) permission
+r touch d2/f
+r mkdir d2/d
+
+# Can create directories with add_subdirectory (p) permission
+r touch d3/f
+r mkdir d3/d
+
+# success, all done
+status=0
+exit
diff --git a/tests/generic/343.out b/tests/generic/343.out
new file mode 100644
index 0000000..bb028f5
--- /dev/null
+++ b/tests/generic/343.out
@@ -0,0 +1,11 @@
+QA output created by 343
+--- runas -u 99 -g 99 touch d1/f
+touch: cannot touch 'd1/f': Permission denied
+--- runas -u 99 -g 99 mkdir d1/d
+mkdir: cannot create directory 'd1/d': Permission denied
+--- runas -u 99 -g 99 touch d2/f
+--- runas -u 99 -g 99 mkdir d2/d
+mkdir: cannot create directory 'd2/d': Permission denied
+--- runas -u 99 -g 99 touch d3/f
+touch: cannot touch 'd3/f': Permission denied
+--- runas -u 99 -g 99 mkdir d3/d
diff --git a/tests/generic/344 b/tests/generic/344
new file mode 100755
index 0000000..ea97a77
--- /dev/null
+++ b/tests/generic/344
@@ -0,0 +1,75 @@
+#! /bin/bash
+# FS QA Test 344
+#
+# RichACL ctime test
+#
+#-----------------------------------------------------------------------
+# Copyright (c) 2016 Red Hat, 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
+#-----------------------------------------------------------------------
+#
+
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1	# failure is the default!
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+	cd /
+	rm -f $tmp.*
+}
+
+# get standard environment, filters and checks
+. ./common/rc
+
+# real QA test starts here
+
+_supported_fs generic
+_supported_os Linux
+_require_richacl
+_setup_scratch_richacl
+
+cd $SCRATCH_MNT
+
+r() {
+	echo "--- runas -u 99 -g 99 $*"
+	$here/src/runas -u 99 -g 99 -- "$@"
+}
+
+touch a
+
+# Without write access, the ctime cannot be changed
+r touch a
+
+setrichacl --set 'u:99:rw::allow' a
+
+# With write access, the ctime can be set to the current time, but not to
+# any other time
+r touch a
+r touch -d '1 hour ago' a
+
+setrichacl --set 'u:99:rwA::allow' a
+
+# With set_attributes access, the ctime can be set to an arbitrary time
+r touch -d '1 hour ago' a
+
+# success, all done
+status=0
+exit
diff --git a/tests/generic/344.out b/tests/generic/344.out
new file mode 100644
index 0000000..029c5ec
--- /dev/null
+++ b/tests/generic/344.out
@@ -0,0 +1,7 @@
+QA output created by 344
+--- runas -u 99 -g 99 touch a
+touch: cannot touch 'a': Permission denied
+--- runas -u 99 -g 99 touch a
+--- runas -u 99 -g 99 touch -d 1 hour ago a
+touch: setting times of 'a': Operation not permitted
+--- runas -u 99 -g 99 touch -d 1 hour ago a
diff --git a/tests/generic/345 b/tests/generic/345
new file mode 100755
index 0000000..faf6a64
--- /dev/null
+++ b/tests/generic/345
@@ -0,0 +1,116 @@
+#! /bin/bash
+# FS QA Test 345
+#
+# RichACL delete test
+#
+#-----------------------------------------------------------------------
+# Copyright (c) 2016 Red Hat, 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
+#-----------------------------------------------------------------------
+#
+
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1	# failure is the default!
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+	cd /
+	rm -f $tmp.*
+}
+
+# get standard environment, filters and checks
+. ./common/rc
+
+# real QA test starts here
+
+_supported_fs generic
+_supported_os Linux
+_require_richacl
+_setup_scratch_richacl
+
+cd $SCRATCH_MNT
+
+r() {
+	echo "--- runas -u 99 -g 99 $*"
+	$here/src/runas -u 99 -g 99 -- "$@"
+}
+
+umask 022
+
+chmod go+w .
+mkdir d1 d2 d3 d4 d5 d6 d7
+touch d1/f d1/g d2/f d3/f d4/f d5/f d6/f d7/f d7/g d7/h
+chmod o+w d1/g
+chown 99 d2
+chgrp 99 d3
+chmod g+w d3
+setrichacl --set 'u:99:wx::allow' d4
+setrichacl --set 'u:99:d::allow' d5
+setrichacl --set 'u:99:xd::allow' d6
+setrichacl --set 'u:99:D::allow' d7/f d7/g d7/h
+chmod 664 d7/g
+
+mkdir s2 s3 s4 s5 s6 s7
+chmod +t s2 s3 s4 s5 s6 s7
+touch s2/f s3/f s4/f s5/f s6/f s7/f s7/g s7/h
+chown 99 s2
+chgrp 99 s3
+chmod g+w s3
+setrichacl --set 'u:99:wx::allow' s4
+setrichacl --set 'u:99:d::allow' s5
+setrichacl --set 'u:99:xd::allow' s6
+setrichacl --set 'u:99:D::allow' s7/f s7/g s7/h
+chmod 664 s7/g
+
+# Cannot delete files with no or only with write permissions on the directory
+r rm -f d1/f d1/g
+
+# Can delete files in directories we own
+r rm -f d2/f s2/f
+
+# Can delete files in non-sticky directories we have write access to
+r rm -f d3/f s3/f
+
+# "Write_data/execute" access does not include delete_child access, so deleting
+# is not allowed:
+r rm -f d4/f s4/f
+
+# "Delete_child" access alone also is not sufficient
+r rm -f d5/f s5/f
+
+# "Execute/delete_child" access is sufficient for non-sticky directories
+r rm -f d6/f s6/f
+
+# "Delete" access on the child is sufficient, even in sticky directories.
+r rm -f d7/f s7/f
+
+# Regression: Delete access must not override add_file / add_subdirectory
+# access.
+r touch h
+r mv -f h d7/
+r mv -f h s7/
+
+# A chmod turns off the "delete" permission
+r rm -f d7/g s7/g
+
+# success, all done
+status=0
+exit
diff --git a/tests/generic/345.out b/tests/generic/345.out
new file mode 100644
index 0000000..8701dcf
--- /dev/null
+++ b/tests/generic/345.out
@@ -0,0 +1,24 @@
+QA output created by 345
+--- runas -u 99 -g 99 rm -f d1/f d1/g
+rm: cannot remove 'd1/f': Permission denied
+rm: cannot remove 'd1/g': Permission denied
+--- runas -u 99 -g 99 rm -f d2/f s2/f
+--- runas -u 99 -g 99 rm -f d3/f s3/f
+rm: cannot remove 's3/f': Operation not permitted
+--- runas -u 99 -g 99 rm -f d4/f s4/f
+rm: cannot remove 'd4/f': Permission denied
+rm: cannot remove 's4/f': Permission denied
+--- runas -u 99 -g 99 rm -f d5/f s5/f
+rm: cannot remove 'd5/f': Permission denied
+rm: cannot remove 's5/f': Permission denied
+--- runas -u 99 -g 99 rm -f d6/f s6/f
+rm: cannot remove 's6/f': Operation not permitted
+--- runas -u 99 -g 99 rm -f d7/f s7/f
+--- runas -u 99 -g 99 touch h
+--- runas -u 99 -g 99 mv -f h d7/
+mv: cannot move 'h' to 'd7/h': Permission denied
+--- runas -u 99 -g 99 mv -f h s7/
+mv: cannot move 'h' to 's7/h': Permission denied
+--- runas -u 99 -g 99 rm -f d7/g s7/g
+rm: cannot remove 'd7/g': Permission denied
+rm: cannot remove 's7/g': Permission denied
diff --git a/tests/generic/346 b/tests/generic/346
new file mode 100755
index 0000000..da1fa00
--- /dev/null
+++ b/tests/generic/346
@@ -0,0 +1,80 @@
+#! /bin/bash
+# FS QA Test 346
+#
+# RichACL write-vs-append test
+#
+#-----------------------------------------------------------------------
+# Copyright (c) 2016 Red Hat, 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
+#-----------------------------------------------------------------------
+#
+
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1	# failure is the default!
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+	cd /
+	rm -f $tmp.*
+}
+
+# get standard environment, filters and checks
+. ./common/rc
+
+# real QA test starts here
+
+_supported_fs generic
+_supported_os Linux
+_require_richacl
+_setup_scratch_richacl
+
+cd $SCRATCH_MNT
+
+r() {
+	echo "--- runas -u 99 -g 99 $*"
+	$here/src/runas -u 99 -g 99 -- "$@"
+}
+
+touch a b c d e f
+setrichacl --set 'owner@:rwp::allow' a
+setrichacl --set 'owner@:rwp::allow u:99:w::allow' b
+setrichacl --set 'owner@:rwp::allow u:99:p::allow' c
+setrichacl --set 'owner@:rwp::allow u:99:wp::allow' d
+setrichacl --set 'u:99:a::deny owner@:rwp::allow u:99:w::allow' e
+setrichacl --set 'u:99:w::deny owner@:rwp::allow u:99:p::allow' f
+
+r sh -c 'echo a > a'
+r sh -c 'echo b > b'
+r sh -c 'echo c > c'
+r sh -c 'echo d > d'
+r sh -c 'echo e > e'
+r sh -c 'echo f > f'
+
+r sh -c 'echo A >> a'
+r sh -c 'echo B >> b'
+r sh -c 'echo C >> c'
+r sh -c 'echo D >> d'
+r sh -c 'echo E >> e'
+r sh -c 'echo F >> f'
+
+# success, all done
+status=0
+exit
diff --git a/tests/generic/346.out b/tests/generic/346.out
new file mode 100644
index 0000000..3dfc445
--- /dev/null
+++ b/tests/generic/346.out
@@ -0,0 +1,19 @@
+QA output created by 346
+--- runas -u 99 -g 99 sh -c echo a > a
+sh: a: Permission denied
+--- runas -u 99 -g 99 sh -c echo b > b
+--- runas -u 99 -g 99 sh -c echo c > c
+sh: c: Permission denied
+--- runas -u 99 -g 99 sh -c echo d > d
+--- runas -u 99 -g 99 sh -c echo e > e
+--- runas -u 99 -g 99 sh -c echo f > f
+sh: f: Permission denied
+--- runas -u 99 -g 99 sh -c echo A >> a
+sh: a: Permission denied
+--- runas -u 99 -g 99 sh -c echo B >> b
+sh: b: Permission denied
+--- runas -u 99 -g 99 sh -c echo C >> c
+--- runas -u 99 -g 99 sh -c echo D >> d
+--- runas -u 99 -g 99 sh -c echo E >> e
+sh: e: Permission denied
+--- runas -u 99 -g 99 sh -c echo F >> f
diff --git a/tests/generic/group b/tests/generic/group
index 727648c..e892ae9 100644
--- a/tests/generic/group
+++ b/tests/generic/group
@@ -340,3 +340,12 @@
 335 auto quick metadata
 336 auto quick metadata
 337 auto quick metadata
+338 auto richacl
+339 auto richacl
+340 auto richacl
+341 auto richacl
+342 auto richacl
+343 auto richacl
+344 auto richacl
+345 auto richacl
+346 auto richacl
-- 
2.5.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v5 3/3] generic/338-346: Add richacl tests
  2016-03-16 11:26 ` [PATCH v5 3/3] generic/338-346: Add richacl tests Andreas Gruenbacher
@ 2016-03-22 23:34   ` Dave Chinner
  0 siblings, 0 replies; 5+ messages in thread
From: Dave Chinner @ 2016-03-22 23:34 UTC (permalink / raw)
  To: Andreas Gruenbacher; +Cc: fstests

On Wed, Mar 16, 2016 at 12:26:05PM +0100, Andreas Gruenbacher wrote:
>  
> +_require_richacl()
> +{
> +	GETRICHACL_PROG=`set_prog_path getrichacl`
> +	_require_command "$GETRICHACL_PROG" getrichacl
> +	SETRICHACL_PROG=`set_prog_path setrichacl`
> +	_require_command "$SETRICHACL_PROG" setrichacl
> +}
> +
> +_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 on $FSTYP"
> +}
> +
> +__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()
> +{
> +	_require_scratch
> +	case "$FSTYP" in
> +	xfs)    _setup_scratch_richacl_xfs
> +		;;
> +	ext4)   __setup_scratch_richacl
> +		;;
> +	*)      _notrun "this test requires richacl support on \$SCRATCH_DEV"
> +		;;
> +	esac
> +}

These are all _require functions. Please don't combine test
requirements with initial test condition setup, nor hide
requirements inside other requirements. If a test runs some
other _require_scratch_foo() after these richacl checks, then the
scratch device wil be in an undefined state. IOws, these
functions are:

_require_richacl_prog()
_require_scratch_richacl_xfs()
_require_scratch_richacl_ext4()
_require_scratch_richacl()
_scratch_mkfs_richacl()

And the test needs to do this as setup:

_require_scratch
_require_scratch_richacl
_require_richacl_prog

_scratch_mkfs_richacl
_scratch_mount



> new file mode 100755
> index 0000000..88e4141
> --- /dev/null
> +++ b/tests/generic/343
.....
> +
> +# get standard environment, filters and checks
> +. ./common/rc
> +
> +# real QA test starts here
> +
> +_supported_fs generic
> +_supported_os Linux
> +_require_richacl
> +_setup_scratch_richacl
> +
> +cd $SCRATCH_MNT
> +
> +r() {
> +	echo "--- runas -u 99 -g 99 $*"
> +	$here/src/runas -u 99 -g 99 -- "$@"
> +}

Need to add _require_runas here, and generic/026, generic/093,
generic/237 and shared/051 also need their open coded checks for the
executable changed to _require_runas. (multiple tests in this
patch need this).

> diff --git a/tests/generic/group b/tests/generic/group
> index 727648c..e892ae9 100644
> --- a/tests/generic/group
> +++ b/tests/generic/group
> @@ -340,3 +340,12 @@
>  335 auto quick metadata
>  336 auto quick metadata
>  337 auto quick metadata
> +338 auto richacl
> +339 auto richacl
> +340 auto richacl
> +341 auto richacl
> +342 auto richacl
> +343 auto richacl
> +344 auto richacl
> +345 auto richacl
> +346 auto richacl

MOst of thse tests take only a couple of seconds to run, right? If
so, then they should probably also be in the quick group.

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-03-22 23:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-16 11:26 [PATCH v5 0/3] Richacl tests Andreas Gruenbacher
2016-03-16 11:26 ` [PATCH v5 1/3] Rename output file templates to match TEST.out* Andreas Gruenbacher
2016-03-16 11:26 ` [PATCH v5 2/3] xfs/191: Remove obsolete nfs4acl tests Andreas Gruenbacher
2016-03-16 11:26 ` [PATCH v5 3/3] generic/338-346: Add richacl tests Andreas Gruenbacher
2016-03-22 23:34   ` Dave Chinner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox