From: Christoph Hellwig <hch@infradead.org>
To: xfs@oss.sgi.com
Subject: [PATCH 1/4] xfstests: fix _require_acl
Date: Fri, 15 Oct 2010 18:28:52 -0400 [thread overview]
Message-ID: <20101015222852.GA3781@infradead.org> (raw)
In-Reply-To: <20101015222820.GA3655@infradead.org>
Skip ACL tests if we get EOPNOTUPP back from the acl calls. This is
the error code we get on a kernel that does support the xattr system
calls, but does not support the attributes used to handle Posix ACLs.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Index: xfstests-dev/105
===================================================================
--- xfstests-dev.orig/105 2010-10-14 17:41:18.000000000 +0000
+++ xfstests-dev/105 2010-10-14 17:41:48.000000000 +0000
@@ -54,9 +54,9 @@ _supported_os IRIX Linux
rm -f $seq.full
_require_scratch
+_require_acls
_acl_setup_ids
-_require_acls
umount $SCRATCH_DEV >/dev/null 2>&1
echo "*** MKFS ***" >>$seq.full
Index: xfstests-dev/common.attr
===================================================================
--- xfstests-dev.orig/common.attr 2010-10-14 17:35:06.000000000 +0000
+++ xfstests-dev/common.attr 2010-10-14 18:02:48.000000000 +0000
@@ -115,25 +115,30 @@ _filter_aces_notypes()
sed -e 's/u:/user:/' -e 's/g:/group:/' -e 's/o:/other:/' -e 's/m:/mask:/'
}
-# test if acl code will work
-#
_require_acls()
{
- xfsdir=$TEST_DIR
-
-
if [ ! -x /bin/chacl -a ! -x /usr/bin/chacl -a ! -x /sbin/chacl ]; then
_notrun "chacl command not found"
fi
- # test if acl_get syscall is operational
- # and hence the ACL config has been turned on
- touch $xfsdir/syscalltest
- if chacl -l $xfsdir/syscalltest 2>&1 | tee -a $here/$seq.full | grep 'Function not implemented' >/dev/null
- then
- cd $here
- _notrun "requires kernel ACL support"
+ #
+ # Test if chacl is able to list ACLs on the target filesystems. On really
+ # old kernels the system calls might not be implemented at all, but the
+ # more common case is that the tested filesystem simply doesn't support
+ # ACLs.
+ #
+ touch $TEST_DIR/syscalltest
+ chacl -l $TEST_DIR/syscalltest > $TEST_DIR/syscalltest.out 2>&1
+ cat $TEST_DIR/syscalltest.out >> $here/$seq.full
+
+ if grep -q 'Function not implemented' $TEST_DIR/syscalltest.out; then
+ _notrun "kernel does not support ACLs"
fi
+ if grep -q 'Operation not supported' $TEST_DIR/syscalltest.out; then
+ _notrun "ACLs not supported by this filesystem type: $FSTYP"
+ fi
+
+ rm -f $TEST_DIR/syscalltest.out
}
_list_acl()
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2010-10-15 22:27 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-15 22:28 [PATCH 0/4] xfstests fixes for hfsplus Christoph Hellwig
2010-10-15 22:28 ` Christoph Hellwig [this message]
2010-10-20 17:35 ` [PATCH 1/4] xfstests: fix _require_acl Alex Elder
2010-10-15 22:29 ` [PATCH 2/4] xfstests: add _require_attrs Christoph Hellwig
2010-10-20 18:03 ` Alex Elder
2010-10-21 5:02 ` Christoph Hellwig
2010-10-21 12:49 ` Alex Elder
2010-10-15 22:29 ` [PATCH 3/4] xfstests: fix quota detection Christoph Hellwig
2010-10-20 17:36 ` Alex Elder
2010-10-15 22:29 ` [PATCH 4/4] xfstests: handle filesystems without FIEMAP support Christoph Hellwig
2010-10-20 17:37 ` Alex Elder
2010-10-21 5:05 ` Christoph Hellwig
2010-10-21 5:35 ` Dave Chinner
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=20101015222852.GA3781@infradead.org \
--to=hch@infradead.org \
--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