Whamcloud - gitweb
tests: fix ACL-printing tests
authorAndreas Dilger <adilger@whamcloud.com>
Tue, 1 Mar 2022 04:17:06 +0000 (21:17 -0700)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 11 Aug 2022 14:30:46 +0000 (10:30 -0400)
commit13f1ce96046fba15d93a90733b791312284fbb62
treeb7dda3ccbeb1706e1ccbe476996744aaf70938ea
parent0ae0e93624a933a1c6ea4e4680ff5d609f267a43
tests: fix ACL-printing tests

Fix the ACL-printing tests to be more flexible for different systems.
If the MKFS_DIR is on tmpfs, it will not list "system.posix_acl*"
xattrs, so they will not be copied.  Create this on a real filesystem
or skip the test if that doesn't work.

Filter out the security.selinux xattr if it is printed, since this
depends on the selinux configuration of the host system.  However,
this also spills xattrs for "acl_dir/file" into an external xattr
block, and causes it to fail due to different block allocations.
Increase the filesystem inode size so that the allocation is the same
regardless of whether selinux is enabled or not.

Fixes: 67e6ae0a35 ("mke2fs: fix a importing a directory with an ACL")
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Artem Blagodarenko <artem.blagodarenko@hpe.com>
Reviewed-by: Li Dongyang <dongyangli@ddn.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
tests/filter.sed
tests/m_rootdir_acl/expect
tests/m_rootdir_acl/script