Add a very basic regression test for setfacl -R with NFSv4 ACLs.

MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Mark Johnston 2018-10-26 21:20:04 +00:00
parent b160a8765d
commit 36847545b5
2 changed files with 60 additions and 2 deletions

View File

@ -557,6 +557,29 @@ $ rmdir yyy
$ rm xxx
$ cd ..
$ rmdir ddd
$ rm xxx
# Test basic recursive setting of ACLs.
$ mkdir ddd
$ touch ddd/xxx
$ mkdir ddd/eee
$ touch ddd/eee/yyy
$ setfacl -R -m owner@:full_set:f:allow,group@:full_set::allow,everyone@:full_set::allow ddd
$ getfacl -q ddd
> owner@:rwxpDdaARWcCos:f------:allow
> group@:rwxpDdaARWcCos:-------:allow
> everyone@:rwxpDdaARWcCos:-------:allow
$ getfacl -q ddd/xxx
> owner@:rwxpDdaARWcCos:-------:allow
> group@:rwxpDdaARWcCos:-------:allow
> everyone@:rwxpDdaARWcCos:-------:allow
$ getfacl -q ddd/eee
> owner@:rwxpDdaARWcCos:f------:allow
> group@:rwxpDdaARWcCos:-------:allow
> everyone@:rwxpDdaARWcCos:-------:allow
$ getfacl -q ddd/eee/yyy
> owner@:rwxpDdaARWcCos:-------:allow
> group@:rwxpDdaARWcCos:-------:allow
> everyone@:rwxpDdaARWcCos:-------:allow
$ rm -r ddd

View File

@ -823,6 +823,41 @@ $ rmdir yyy
$ rm xxx
$ cd ..
$ rmdir ddd
$ rm xxx
# Test basic recursive setting of ACLs.
$ mkdir ddd
$ touch ddd/xxx
$ mkdir ddd/eee
$ touch ddd/eee/yyy
$ setfacl -R -m owner@:full_set:f:allow,group@:full_set::allow,everyone@:full_set::allow ddd
$ getfacl -q ddd
> owner@:--------------:-------:deny
> owner@:rwxpDdaARWcCos:f------:allow
> group@:-w-p----------:-------:deny
> group@:rwxpDdaARWcCos:-------:allow
> everyone@:-w-p---A-W-Co-:-------:deny
> everyone@:rwxpDdaARWcCos:-------:allow
$ getfacl -q ddd/xxx
> owner@:--x-----------:-------:deny
> owner@:rwxpDdaARWcCos:-------:allow
> group@:-wxp----------:-------:deny
> group@:rwxpDdaARWcCos:-------:allow
> everyone@:-wxp---A-W-Co-:-------:deny
> everyone@:rwxpDdaARWcCos:-------:allow
$ getfacl -q ddd/eee
> owner@:--------------:-------:deny
> owner@:rwxpDdaARWcCos:f------:allow
> group@:-w-p----------:-------:deny
> group@:rwxpDdaARWcCos:-------:allow
> everyone@:-w-p---A-W-Co-:-------:deny
> everyone@:rwxpDdaARWcCos:-------:allow
$ getfacl -q ddd/eee/yyy
> owner@:--x-----------:-------:deny
> owner@:rwxpDdaARWcCos:-------:allow
> group@:-wxp----------:-------:deny
> group@:rwxpDdaARWcCos:-------:allow
> everyone@:-wxp---A-W-Co-:-------:deny
> everyone@:rwxpDdaARWcCos:-------:allow
$ rm -r ddd