From: Dave Chinner <david@fromorbit.com>
To: xfs@oss.sgi.com
Subject: [PATCH 4/6] shared/051: CRC enabled filesystems handle more than 25 ACLs
Date: Mon, 24 Feb 2014 14:06:13 +1100 [thread overview]
Message-ID: <1393211175-30016-5-git-send-email-david@fromorbit.com> (raw)
In-Reply-To: <1393211175-30016-1-git-send-email-david@fromorbit.com>
From: Dave Chinner <dchinner@redhat.com>
shared/051 fails on CRC enabled filesystems because it doesn't get
an erro on setting the 26th ACL on a file. CRC enabled filesystems
support more than 25, so there shoul dbe no error.
Allow the test to pass on both non-CRC and CRC enabled filesystems
by detecting the type of filesystem configuration and using that
information to fake the error message so that the golden output
match does not fail. We also need to filter the 26th ACL from the
output otherwise that will cause failures, too.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
---
tests/shared/051 | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/tests/shared/051 b/tests/shared/051
index e957f86..1d4edfb 100755
--- a/tests/shared/051
+++ b/tests/shared/051
@@ -319,6 +319,14 @@ chacl a::rwx file1
set +x
#-------------------------------------------------------
+#
+# On CRC enabled filesystems, we can support many more than 25 ACLs, and
+# so we have to detect this case and "fake" the error if CRCs are enabled.
+if [ $FSTYP = "xfs" ]; then
+ xfs_info $TEST_DIR | _filter_mkfs >/dev/null 2> $tmp.info
+ cat $tmp.info >> $seqres.full
+ . $tmp.info
+fi
echo ""
echo "=== Test out large ACLs ==="
@@ -343,7 +351,14 @@ getfacl --numeric largeaclfile | _filter_aces
echo "1 above xfs acl max"
chacl $acl3 largeaclfile
-getfacl --numeric largeaclfile | _filter_aces
+if [ $_fs_has_crcs = "1" ]; then
+ # fake the error message for CRC enabled filesystems. It should succeed,
+ # so if there was any error from the above command we are going to fail
+ # regardless of whether we emit this or not.
+ echo "chacl: cannot set access acl on \"largeaclfile\": Invalid argument"
+fi
+# and filter the extra ACL we might have added.
+getfacl --numeric largeaclfile | _filter_aces | sed -e "/^user:22:rwx/d"
echo "use 16 aces"
chacl $acl4 largeaclfile
--
1.8.4.rc3
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2014-02-24 3:06 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-24 3:06 [PATCH 0/6] xfstests: fixes for CRCs and small devices Dave Chinner
2014-02-24 3:06 ` [PATCH 1/6] xfs/033: add golden output for CRC enabled filesystems Dave Chinner
2014-02-25 22:05 ` Christoph Hellwig
2014-02-24 3:06 ` [PATCH 2/6] xfs/189: noattr2 invalid " Dave Chinner
2014-02-25 22:05 ` Christoph Hellwig
2014-02-24 3:06 ` [PATCH 3/6] generic/003: ensure time changes between stat calls Dave Chinner
2014-02-25 22:06 ` Christoph Hellwig
2014-02-24 3:06 ` Dave Chinner [this message]
2014-02-25 22:09 ` [PATCH 4/6] shared/051: CRC enabled filesystems handle more than 25 ACLs Christoph Hellwig
2014-02-24 3:06 ` [PATCH 5/6] xfs/217: prevent enospc failures on small test devices Dave Chinner
2014-02-25 22:09 ` Christoph Hellwig
2014-02-24 3:06 ` [PATCH 6/6] xfs/167: need at least 10GB of scratch space to run Dave Chinner
2014-02-25 22:10 ` Christoph Hellwig
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=1393211175-30016-5-git-send-email-david@fromorbit.com \
--to=david@fromorbit.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