Whamcloud - gitweb
LU-11604 tests: fix ACL-printing tests 24/46024/3
authorAndreas Dilger <adilger@whamcloud.com>
Sat, 8 Jan 2022 01:21:40 +0000 (18:21 -0700)
committerLi Dongyang <dongyangli@ddn.com>
Mon, 24 Jan 2022 22:36:55 +0000 (22:36 +0000)
commitd31671c781a9c6c0e9459911e4ff05892dc24b5e
tree6b2c472c005e42af6740598eb1054cdb640f655a
parentb7742e844edf00cd8a20af2791d9d0ecb9e96a24
LU-11604 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 the test 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.

Print out the contents of failed test files in case of errors.

Fix warning in print_acl() from printing "void *" instead of "char *".

Fixes: 8631879536 ("LU-11604 debugfs: add support for printing ACL")
Fixes: 67e6ae0a35 ("mke2fs: fix a importing a directory with an ACL and inline data")
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I62512c457bb3f1d2a59038c7f02e5c27e6916a54
Reviewed-on: https://review.whamcloud.com/46024
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Artem Blagodarenko <artem.blagodarenko@hpe.com>
Reviewed-by: Li Dongyang <dongyangli@ddn.com>
debugfs/xattrs.c
tests/d_print_acl/script
tests/filter.sed
tests/m_rootdir_acl/expect
tests/m_rootdir_acl/script
tests/test_post