]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commit
xfstests: add specific test for default ACL inheritance
authorFilipe David Borba Manana <fdmanana@gmail.com>
Wed, 16 Oct 2013 16:25:18 +0000 (16:25 +0000)
committerRich Johnston <rjohnston@sgi.com>
Wed, 16 Oct 2013 21:19:25 +0000 (16:19 -0500)
commit8bab8b31bb288b9d1b077ff8d06b6491715e8da7
tree7582b0b978b39c511e844e956f4643f57fe0a70c
parenta49141302f71b9dbbd6033a5aaa93a984475dbb4
xfstests: add specific test for default ACL inheritance

This test is motivated by an issue found by a btrfs user, addressed
and described by the following Linux kernel patch:

https://patchwork.kernel.org/patch/3046931/

The steps to reproduce the issue on btrfs are the following:

$ mkfs.btrfs -f /dev/loop0
$ mount /dev/loop0 /mnt
$ mkdir /mnt/acl
$ setfacl -d --set u::rwx,g::rwx,o::- /mnt/acl
$ getfacl /mnt/acl
user::rwx
group::rwx
other::r-x
default:user::rwx
default:group::rwx
default:other::---

$ mkdir /mnt/acl/dir1
$ getfacl /mnt/acl/dir1
user::rwx
group::rwx
other::---

After unmounting and mounting again the filesystem, getfacl returned the
expected default ACL for the subdirectory:

$ umount /mnt/acl
$ mount /dev/loop0 /mnt
$ getfacl /mnt/acl/dir1
user::rwx
group::rwx
other::---
default:user::rwx
default:group::rwx
default:other::---

This means that the underlying ACL xattr was persisted correctly but
the in memory representation of the inode had (incorrectly) a NULL ACL.

[rjohnston: renumbered test to 319]

Signed-off-by: Filipe David Borba Manana <fdmanana@gmail.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
tests/generic/319 [new file with mode: 0755]
tests/generic/319.out [new file with mode: 0644]
tests/generic/group