From: Christoph Hellwig <hch@infradead.org>
To: Eric Sandeen <sandeen@redhat.com>
Cc: xfs-oss <xfs@oss.sgi.com>, ext4 development <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH] xfstests: make xattr test 020 generic
Date: Mon, 28 Nov 2011 06:01:58 -0500 [thread overview]
Message-ID: <20111128110158.GB13766@infradead.org> (raw)
In-Reply-To: <4ECD4579.4080706@redhat.com>
On Wed, Nov 23, 2011 at 01:11:53PM -0600, Eric Sandeen wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> 020 can be made generic by limiting the total attribute space
> used in the tests as appropriate. Unless we know we have a
> large-xattr-capable fs, limit total space to a bit under one
> fs block.
>
> Now passes for me on ext3, ext4, btrfs, as well as xfs.
>
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
> - ---
>
> incidentally the test used to send a 100k xattr value to
> the attr command on xfs; it wrote only 64k but did not complain.
> Feature or bug?
>
> diff --git a/020 b/020
> index 56b9c3c..d196318 100755
> - --- a/020
> +++ b/020
> @@ -80,7 +80,7 @@ _attr_list()
>
>
> # real QA test starts here
> - -_supported_fs xfs udf
> +_supported_fs generic
> _supported_os Linux
>
> _require_attrs
> @@ -119,9 +119,19 @@ _attr_list $testfile
>
> echo "*** add lots of attributes"
> v=0
> - -while [ $v -lt 1000 ]
> +
> +# set maximum total attr space based on fs type
> +if [ "$FSTYP" == "xfs" -o "$FSTYP" == "udf" ]; then
> + NUMATTRS=1000
> +else # Assume max ~1 block of attrs
> + BLOCK_SIZE=`stat -f $TEST_DEV | grep "Block size" | cut -d " " -f3`
> + # user.attribute_XXX="value.XXX" is about 32 bytes; leave some overhead
> + let NUMATTRS=$BLOCK_SIZE/40
> +fi
I'd prefer if we define the limits in common.rc - we shouldn't have to
spread too much fs knowledege over individual tests.
> +if [ "$FSTYP" == "xfs" -o "$FSTYP" == "udf" -o "$FSTYP" == "btrfs" ]; then
> + ATTRVAL_SIZE=64
> +else # Assume max ~1 block of attrs
> + BLOCK_SIZE=`stat -f $TEST_DEV | grep "Block size" | cut -d " " -f3`
> + # leave a little overhead
> + let ATTRVAL_SIZE=$BLOCK_SIZE-256
> +fi
same for this one.
Except for that these changes looks fine to me.
next prev parent reply other threads:[~2011-11-28 11:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-23 19:11 [PATCH] xfstests: make xattr test 020 generic Eric Sandeen
2011-11-28 11:01 ` Christoph Hellwig [this message]
2012-01-27 18:34 ` [PATCH V2] xfstests: 020: make this xattr test generic Eric Sandeen
2012-03-31 20:11 ` [PATCH V2] " 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=20111128110158.GB13766@infradead.org \
--to=hch@infradead.org \
--cc=linux-ext4@vger.kernel.org \
--cc=sandeen@redhat.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).