Skip to contentSkip to conversation

xfstests: shared/051: update golden output to match the XFS max acl return errno

PATCH In review Jeff Liu 3 participants 5 messages Mar 10, 2014 – Mar 11, 2014

lore
Share & tools
lore

Jeff Liu

author
#0 lore raw

PATCH 1/1 xfstests: shared/051: update golden output to match the XFS max acl return errno

From: Jie Liu <[email protected]>

Update the golden output to match the recently XFS return errno changes if hit the limits of maximum number of ACLs.

---
 tests/shared/051.out | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/shared/051.out +1 -1
index a871082..354ec6a 100644
@@ -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
#2 lore raw
In reply to Jeff Liu
Quoted 15 lines · Jeff Liu

From: Jie Liu <[email protected]>

Update the golden output to match the recently XFS return errno changes if hit the limits of maximum number of ACLs.

---
 tests/shared/051.out | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/shared/051.out +0 -0
index a871082..354ec6a 100644

tests/shared/051.out mask::rwx · line 283

Quoted 5 lines
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

That breaks the test on older kernels. Can you add a filter that kills the "Invalid argument"/"Argument list too long" part of the error message so the same golden output works for old and new kernels?

Cheers,

Dave.

Signature · 7 lines
Dave Chinner
[email protected]

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
author
#3 lore raw
Quoted 18 lines · Dave Chinner
Quoted 17 lines · Jeff Liu

From: Jie Liu <[email protected]>

Update the golden output to match the recently XFS return errno changes if hit the limits of maximum number of ACLs.

---
 tests/shared/051.out | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/shared/051.out +0 -0
index a871082..354ec6a 100644
@@ -280,7 +280,7 @@ mask::rwx
 other::rwx
 
Quoted 8 lines

tests/shared/051.out mask::rwx · line 283

Quoted 3 lines
tests/shared/051.out +1 -1
 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

That breaks the test on older kernels. Can you add a filter that kills the "Invalid argument"/"Argument list too long" part of the error message so the same golden output works for old and new kernels?

How about the following revised version? maybe I missed you comments of "kills the...".

Thanks,
-Jeff

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 current test fails on new kernel as the output is mismatch to the goldens. In order to make the current golden output works for both old and new kernels, this patch filter the new error message out to match the olds.

---
 tests/shared/051 | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
tests/shared/051 +4 -1
index e957f86..157eb9c 100755
@@ -342,7 +342,10 @@ chacl $acl2 largeaclfile
 getfacl --numeric largeaclfile | _filter_aces
 
 echo "1 above xfs acl max"
-chacl $acl3 largeaclfile
+# we return E2BIG if hit the max acl limits on new kernel, but EINVAL
+# on old kernel. So we need to filter the error message out in order
+# to make the current golden output works for both old and new kernels.
+chacl $acl3 largeaclfile 2>&1 | sed -e "s/Argument list too long/Invalid argument/"
 getfacl --numeric largeaclfile | _filter_aces
 
 echo "use 16 aces"
Signature · 6 lines
1.8.3.2

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
#4 lore raw
Quoted 53 lines · Jeff Liu
Quoted 18 lines · Dave Chinner
Quoted 17 lines · Jeff Liu

From: Jie Liu <[email protected]>

Update the golden output to match the recently XFS return errno changes if hit the limits of maximum number of ACLs.

---
 tests/shared/051.out | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/shared/051.out +0 -0
index a871082..354ec6a 100644
@@ -280,7 +280,7 @@ mask::rwx
 other::rwx
 
Quoted 8 lines

tests/shared/051.out mask::rwx · line 283

Quoted 3 lines
tests/shared/051.out +1 -1
 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

That breaks the test on older kernels. Can you add a filter that kills the "Invalid argument"/"Argument list too long" part of the error message so the same golden output works for old and new kernels?

How about the following revised version? maybe I missed you comments of "kills the...".

Thanks,
-Jeff

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 current test fails on new kernel as the output is mismatch to the goldens. In order to make the current golden output works for both old and new kernels, this patch filter the new error message out to match the olds.

---
 tests/shared/051 | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
tests/shared/051 +0 -0
index e957f86..157eb9c 100755

tests/shared/051 chacl $acl2 largeaclfile · line 349

Quoted 9 lines
tests/shared/051 +4 -1
@@ -342,7 +342,10 @@ chacl $acl2 largeaclfile
 getfacl --numeric largeaclfile | _filter_aces
 
 echo "1 above xfs acl max"
-chacl $acl3 largeaclfile
+# we return E2BIG if hit the max acl limits on new kernel, but EINVAL
+# on old kernel. So we need to filter the error message out in order
+# to make the current golden output works for both old and new kernels.
+chacl $acl3 largeaclfile 2>&1 | sed -e "s/Argument list too long/Invalid argument/"
 getfacl --numeric largeaclfile | _filter_aces

Good, but normally that's done like:

# we return E2BIG if hit the max acl limits on new kernel, but EINVAL
# on old kernel. So we need to filter the error message out in order
# to make the current golden output works for both old and new kernels.
_filter_largeacl()
{
	sed -e "s/Argument list too long/Invalid argument/"
}

....

chacl $acl3 largeaclfile 2>&1 | _filter_largeacl

Cheers,

Dave.

Signature · 7 lines
Dave Chinner
[email protected]

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs