lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20111128110158.GB13766@infradead.org>
Date:	Mon, 28 Nov 2011 06:01:58 -0500
From:	Christoph Hellwig <hch@...radead.org>
To:	Eric Sandeen <sandeen@...hat.com>
Cc:	xfs-oss <xfs@....sgi.com>,
	ext4 development <linux-ext4@...r.kernel.org>
Subject: Re: [PATCH] xfstests: make xattr test 020 generic

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ