Whamcloud - gitweb
LU-17736 tests: Fix sanityn/73 for test machines with auditd 09/54809/3
authorEllis Wilson <elliswilson@microsoft.com>
Fri, 8 Oct 2021 14:27:39 +0000 (10:27 -0400)
committerOleg Drokin <green@whamcloud.com>
Tue, 30 Apr 2024 06:58:13 +0000 (06:58 +0000)
commit37fa5a5c0cb154630f4e244c8b2919bd908470f1
tree9b13b8cc0aea85a8bdfff5a21a81b35e1bb10a7c
parent01103eba35e88638d8860457fbdf89b101d4ab67
LU-17736 tests: Fix sanityn/73 for test machines with auditd

getfattr performs one stat followed by two getxattr syscalls against
the provided file.  Normally, the stat results in no getxattr calls
internally (as it's not something stat is required to return).

However, if auditd is enabled AND one of the rules includes a
filesystem-specific rule such as watch directory X and record if it's
modified, then for every lookup (each of the three syscalls includes
one) an additional getxattr will be performed, resulting in 5 total
getxattrs.

Because there is significant fuzz here, revise the check to be
at minimum the two "expected" getxattrs but allow for more.
Comments have been added explaining this.

Signed-off-by: Ellis Wilson <elliswilson@microsoft.com>
Test-Parameters: trivial testlist=sanityn env=ONLY=73,ONLY_REPEAT=10
Change-Id: I0da5c2a5331f7dba4e65051a073e2bec05327a25
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54809
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/tests/sanityn.sh