From: Dmitry Monakhov <dmonakhov@openvz.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-fsdevel@vger.kernel.org, xfs@oss.sgi.com, tytso@mit.edu,
hch@lst.de, aelder@sgi.com
Subject: Re: [PATCH 7/9] xfstests: add a new quota test that runs fsstress under ENOSPC conditions
Date: Mon, 07 Nov 2011 10:15:33 +0400 [thread overview]
Message-ID: <871utkmpa2.fsf@dmbot.sw.ru> (raw)
In-Reply-To: <20111103193935.GA23014@infradead.org>
[-- Attachment #1: Type: text/plain, Size: 1215 bytes --]
On Thu, 3 Nov 2011 15:39:35 -0400, Christoph Hellwig <hch@infradead.org> 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
int inode_change_ok(..)
...
/* 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))
return -EPERM;
>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.
[-- Attachment #2: 0001-xfstests-270-th-test-want-use-setcap-8.patch --]
[-- Type: text/plain, Size: 1012 bytes --]
>From f8611f3bbc5ea2ac3672ee6c88d2d43d69351d49 Mon Sep 17 00:00:00 2001
From: Dmitry Monakhov <dmonakhov@openvz.org>
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@openvz.org>
---
270 | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/270 b/270
index ed1e31e..90e24f5 100755
--- a/270
+++ b/270
@@ -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."
+ fi
setcap cap_chown=epi $tmp.fsstress.bin
(su $qa_user -c "$tmp.fsstress.bin $args" &) > /dev/null 2>&1
--
1.7.1
[-- Attachment #3: Type: text/plain, Size: 208 bytes --]
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
[-- Attachment #4: Type: text/plain, Size: 121 bytes --]
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2011-11-07 6:15 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-03 17:55 [PATCH 1/9] xfstests: fsstress add command line style output for show_opts Dmitry Monakhov
2011-11-03 17:55 ` [PATCH 2/9] xfstests: freeze fsstress options for 117'th Dmitry Monakhov
2011-11-03 17:55 ` [PATCH 3/9] xfstests: add fallocate support to fsstress Dmitry Monakhov
2011-11-03 17:55 ` [PATCH 4/9] xfstests: fsstress add FS_IOC_{SET, GET}FLAGS operations v2 Dmitry Monakhov
2011-11-03 17:55 ` [PATCH 5/9] xfstests: add fiemap operation to fsstress Dmitry Monakhov
2011-11-03 17:55 ` [PATCH 6/9] xfstests: add a new test that runs fsstress under ENOSPC conditions Dmitry Monakhov
2011-11-07 13:25 ` David Sterba
2011-11-07 13:31 ` Dmitry Monakhov
2011-11-08 17:01 ` David Sterba
2011-11-08 17:04 ` Christoph Hellwig
2011-11-03 17:55 ` [PATCH 7/9] xfstests: add a new quota " Dmitry Monakhov
2011-11-03 19:39 ` Christoph Hellwig
2011-11-07 6:15 ` Dmitry Monakhov [this message]
2011-11-03 17:55 ` [PATCH 8/9] xfstress: add regression testcase for d583fb87a3ff0 Dmitry Monakhov
2011-11-03 17:55 ` [PATCH 9/9] xfstress: Test data journaling flag switch for a single file Dmitry Monakhov
2011-11-07 20:52 ` [PATCH 1/9] xfstests: fsstress add command line style output for show_opts 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=871utkmpa2.fsf@dmbot.sw.ru \
--to=dmonakhov@openvz.org \
--cc=aelder@sgi.com \
--cc=hch@infradead.org \
--cc=hch@lst.de \
--cc=linux-fsdevel@vger.kernel.org \
--cc=tytso@mit.edu \
--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