xfstests: shared/051: add filter to match the golden output for large acls
PATCH v3 1/1 xfstests: shared/051: add filter to match the golden output for large acls
From: Jie Liu <[email protected]>
On old kernel we return EINVAL if hit the limits of maximum number of ACLs but return E2BIG on new kernel, which cause the test failes on new kernel as the output is mismatch to the goldens. This patch fix it by updating the golden output with the new error message and replacing the old error message with it via a filter.
---
V3->V2: filter out the old error message to the new and update golden output to match it V2->V1: filter out the new error message to the old
tests/shared/051 | 10 +++++++++- tests/shared/051.out | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-)
tests/shared/051 +9 -1
@@ -318,6 +318,14 @@ chacl m:user1:rwx file1 chacl a::rwx file1 set +x +# we return E2BIG if hit the max acl limits on new kernel, but EINVAL +# on old kernel. So we need to filter out the error message in order +# to make the updated golden output works for both old and new kernels. +_filter_largeacl() +{ + sed -e "s/Invalid argument/Argument list too long/" +} + #------------------------------------------------------- echo ""
@@ -342,7 +350,7 @@ chacl $acl2 largeaclfile getfacl --numeric largeaclfile | _filter_aces echo "1 above xfs acl max" -chacl $acl3 largeaclfile +chacl $acl3 largeaclfile 2>&1 | _filter_largeacl getfacl --numeric largeaclfile | _filter_aces echo "use 16 aces"
tests/shared/051.out +1 -1
@@ -280,7 +280,7 @@ mask::rwx other::rwx 1 above xfs acl max -chacl: cannot set access acl on "largeaclfile": Invalid argument +chacl: cannot set access acl on "largeaclfile": Argument list too long # file: largeaclfile # owner: 0 # group: 0
Signature · 6 lines
1.8.3.2 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
Quoted 8 lines · Jeff Liu
From: Jie Liu <[email protected]>
On old kernel we return EINVAL if hit the limits of maximum number of ACLs but return E2BIG on new kernel, which cause the test failes on new kernel as the output is mismatch to the goldens. This patch fix it by updating the golden output with the new error message and replacing the old error message with it via a filter.
Quoted 5 lines
Signed-off-by Jie Liu <[email protected]>---
V3->V2: filter out the old error message to the new and update golden output to match itV2->V1: filter out the new error message to the old
Looks good
Signature · 7 lines
Dave Chinner [email protected] _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs