From: Jie Liu Date: Thu, 13 Mar 2014 04:20:18 +0000 (+1100) Subject: shared/051: add filter to match the golden output for large acls X-Git-Tag: v2022.05.01~3211 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=5f6be5c6d29784d6d0a5ef19f51e7a80c89c8a3a;p=users%2Fhch%2Fxfstests-dev.git shared/051: add filter to match the golden output for large acls 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. Signed-off-by: Jie Liu Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner --- diff --git a/tests/shared/051 b/tests/shared/051 index e957f86ce..39fdad413 100755 --- a/tests/shared/051 +++ b/tests/shared/051 @@ -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" diff --git a/tests/shared/051.out b/tests/shared/051.out index a87108207..354ec6ad0 100644 --- a/tests/shared/051.out +++ b/tests/shared/051.out @@ -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