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@xxxxxxxxxx> > - --- > > 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. -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html