On Thu, 3 Nov 2011 15:39:35 -0400, Christoph Hellwig <hch@xxxxxxxxxxxxx> wrote:
> On Thu, Nov 03, 2011 at 09:55:51PM +0400, Dmitry Monakhov wrote:
> > - Same as 264 but with quota enabled.
> 269 is the new 270
> > - IO performed from $qa_user user
> > - fsstress granted with CAP_CHOWN capability.
> This fails in my test VM because it doesn't have setcap. If you
> want to use additional non-standard tools please do a _notrun if
> they aren't present.
> I don't quite understand why it would need CAP_CHOWN - chowns
> from owned files do not require it, and the test runs fine with
> the setcap line commented out.
Yes, but fsstress want chown to random uid/gid
/* Make sure a caller can chown. */
if ((ia_valid & ATTR_UID) &&
(current_fsuid() != inode->i_uid ||
attr->ia_uid != inode->i_uid) && !capable(CAP_CHOWN))
>From my experience fssstess with chown enabled is the most valuable
quota accounting test. W/o chown this is just an useless time consumer.
> I'll commit it as-is for now, but unless I get some feedback on
> why the setcap is require I'll add another commit to remove it ASAP.
>From f8611f3bbc5ea2ac3672ee6c88d2d43d69351d49 Mon Sep 17 00:00:00 2001
From: Dmitry Monakhov <dmonakhov@xxxxxxxxxx>
Date: Mon, 7 Nov 2011 08:07:57 +0300
Subject: [PATCH] xfstests: 270'th test want use setcap(8)
It wants to grant CAP_CHOWN to fsstress, without this capability
chown(2) will fail due to EPERM. Since chown(2) is one of the most
error prone places of quota accounting this makes 270'th
test almost useless, so it is better to simply skip it.
Signed-off-by: Dmitry Monakhov <dmonakhov@xxxxxxxxxx>
270 | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/270 b/270
index ed1e31e..90e24f5 100755
@@ -52,6 +52,9 @@ _workout()
echo "fsstress $args" >> $here/$seq.full
# Grant chown capability
cp $FSSTRESS_PROG $tmp.fsstress.bin
+ if [ "`whereis setcap`" == "setcap:" ]; then
+ _notrun "setcap not installed."
setcap cap_chown=epi $tmp.fsstress.bin
(su $qa_user -c "$tmp.fsstress.bin $args" &) > /dev/null 2>&1
> To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at http://vger.kernel.org/majordomo-info.html