From: Jeff Liu <jeff.liu@oracle.com>
To: "xfs@oss.sgi.com" <xfs@oss.sgi.com>
Subject: [PATCH v2] xfstests: shared/051: add filter to match the golden output for large acls
Date: Wed, 12 Mar 2014 10:03:03 +0800 [thread overview]
Message-ID: <531FC057.70804@oracle.com> (raw)
From: Jie Liu <jeff.liu@oracle.com>
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.
Signed-off-by: Jie Liu <jeff.liu@oracle.com>
---
V2: make the filter as a local function as per Dave's comments
tests/shared/051 | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/tests/shared/051 b/tests/shared/051
index e957f86..adbe427 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 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/"
+}
+
#-------------------------------------------------------
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"
--
1.8.3.2
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next reply other threads:[~2014-03-12 2:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-12 2:03 Jeff Liu [this message]
2014-03-12 10:32 ` [PATCH v2] xfstests: shared/051: add filter to match the golden output for large acls Christoph Hellwig
2014-03-12 23:13 ` Jeff Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=531FC057.70804@oracle.com \
--to=jeff.liu@oracle.com \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).