All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [patch] xfsqa - 166 - fix filter for stripe aligned filesystems
@ 2008-04-11  3:36 David Chinner
  2008-04-14  3:09 ` Niv Sardi
  0 siblings, 1 reply; 3+ messages in thread
From: David Chinner @ 2008-04-11  3:36 UTC (permalink / raw
  To: xfs-dev; +Cc: xfs-oss

Flags has extra bits set in it xfs_bmap output when
the filesyste is using stripe alignment. Fix the test
to only look at the unwritten flag. Capture the xfs_bmap
output as well so failures can be debugged easily.

Signed-off-by: Dave Chinner <dgc@sgi.com>
---
 xfstests/166 |   17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

Index: xfs-cmds/xfstests/166
===================================================================
--- xfs-cmds.orig/xfstests/166	2008-03-25 15:29:35.000000000 +1100
+++ xfs-cmds/xfstests/166	2008-04-11 13:33:31.220068950 +1000
@@ -17,6 +17,7 @@ here=`pwd`
 tmp=/tmp/$$
 status=1    # failure is the default!
 trap "_cleanup; exit \$status" 0 1 2 3 15
+rm $seq.full
 
 _cleanup()
 {
@@ -39,9 +40,14 @@ _filter_blocks()
 		unwritten2 = ((1048576/512) / 2) - 2 * written_size
 	}
 
-	if ($7) {
-		size = "RIGHT"
-		flags = "GOOD"
+	/* is the extent unwritten? */
+	unwritten_ext = 0;
+	if ($7 >= 10000)
+		unwritten_ext = 1;
+
+	size = "RIGHT"
+	flags = "GOOD"
+	if (unwritten_ext) {
 		if (unwritten1) {
 			if ($6 != unwritten1)
 				size = "WRONG"
@@ -49,11 +55,7 @@ _filter_blocks()
 		} else if ($6 != unwritten2) {
 			size = "WRONG"
 		}
-		if ($7 < 10000)
-			flags = "BAD"
 	} else {
-		size = "RIGHT"
-		flags = "GOOD"
 		if ($6 != written_size)
 			size = "WRONG"
 	}
@@ -77,6 +79,7 @@ FILE_SIZE=1048576
 rm -f $TEST_FILE
 $TEST_PROG $FILE_SIZE $TEST_FILE
 
+xfs_bmap -vp $TEST_FILE >> $seq.full
 xfs_bmap -vp $TEST_FILE | _filter_blocks
 
 status=0

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch] xfsqa - 166 - fix filter for stripe aligned filesystems
  2008-04-11  3:36 [patch] xfsqa - 166 - fix filter for stripe aligned filesystems David Chinner
@ 2008-04-14  3:09 ` Niv Sardi
  2008-04-14  3:20   ` Eric Sandeen
  0 siblings, 1 reply; 3+ messages in thread
From: Niv Sardi @ 2008-04-14  3:09 UTC (permalink / raw
  To: David Chinner; +Cc: xfs-dev, xfs-oss


Looks good, one minor comment.

David Chinner <dgc@sgi.com> writes:

> Flags has extra bits set in it xfs_bmap output when
> the filesyste is using stripe alignment. Fix the test
> to only look at the unwritten flag. Capture the xfs_bmap
> output as well so failures can be debugged easily.
>
> Signed-off-by: Dave Chinner <dgc@sgi.com>
> ---
>  xfstests/166 |   17 ++++++++++-------
>  1 file changed, 10 insertions(+), 7 deletions(-)
>
> Index: xfs-cmds/xfstests/166
> ===================================================================
> --- xfs-cmds.orig/xfstests/166	2008-03-25 15:29:35.000000000 +1100
> +++ xfs-cmds/xfstests/166	2008-04-11 13:33:31.220068950 +1000
> @@ -17,6 +17,7 @@ here=`pwd`
>  tmp=/tmp/$$
>  status=1    # failure is the default!
>  trap "_cleanup; exit \$status" 0 1 2 3 15
> +rm $seq.full

rm -f ? so that it doesn't complain when file is not there ?
  
>  _cleanup()
>  {
> @@ -39,9 +40,14 @@ _filter_blocks()
>  		unwritten2 = ((1048576/512) / 2) - 2 * written_size
>  	}
>  
> -	if ($7) {
> -		size = "RIGHT"
> -		flags = "GOOD"
> +	/* is the extent unwritten? */
> +	unwritten_ext = 0;
> +	if ($7 >= 10000)
> +		unwritten_ext = 1;
> +
> +	size = "RIGHT"
> +	flags = "GOOD"
> +	if (unwritten_ext) {
>  		if (unwritten1) {
>  			if ($6 != unwritten1)
>  				size = "WRONG"
> @@ -49,11 +55,7 @@ _filter_blocks()
>  		} else if ($6 != unwritten2) {
>  			size = "WRONG"
>  		}
> -		if ($7 < 10000)
> -			flags = "BAD"
>  	} else {
> -		size = "RIGHT"
> -		flags = "GOOD"
>  		if ($6 != written_size)
>  			size = "WRONG"
>  	}
> @@ -77,6 +79,7 @@ FILE_SIZE=1048576
>  rm -f $TEST_FILE
>  $TEST_PROG $FILE_SIZE $TEST_FILE
>  
> +xfs_bmap -vp $TEST_FILE >> $seq.full
>  xfs_bmap -vp $TEST_FILE | _filter_blocks
>  
>  status=0

-- 
Niv Sardi

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch] xfsqa - 166 - fix filter for stripe aligned filesystems
  2008-04-14  3:09 ` Niv Sardi
@ 2008-04-14  3:20   ` Eric Sandeen
  0 siblings, 0 replies; 3+ messages in thread
From: Eric Sandeen @ 2008-04-14  3:20 UTC (permalink / raw
  To: Niv Sardi; +Cc: David Chinner, xfs-dev, xfs-oss

Niv Sardi wrote:
> Looks good, one minor comment.
> 
> David Chinner <dgc@sgi.com> writes:
> 
>> Flags has extra bits set in it xfs_bmap output when
>> the filesyste is using stripe alignment. Fix the test
>> to only look at the unwritten flag. Capture the xfs_bmap
>> output as well so failures can be debugged easily.
>>
>> Signed-off-by: Dave Chinner <dgc@sgi.com>
>> ---
>>  xfstests/166 |   17 ++++++++++-------
>>  1 file changed, 10 insertions(+), 7 deletions(-)
>>
>> Index: xfs-cmds/xfstests/166
>> ===================================================================
>> --- xfs-cmds.orig/xfstests/166	2008-03-25 15:29:35.000000000 +1100
>> +++ xfs-cmds/xfstests/166	2008-04-11 13:33:31.220068950 +1000
>> @@ -17,6 +17,7 @@ here=`pwd`
>>  tmp=/tmp/$$
>>  status=1    # failure is the default!
>>  trap "_cleanup; exit \$status" 0 1 2 3 15
>> +rm $seq.full
> 
> rm -f ? so that it doesn't complain when file is not there ?

All other tests do use rm -f here, it seems.

-Eric

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-04-14  3:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-11  3:36 [patch] xfsqa - 166 - fix filter for stripe aligned filesystems David Chinner
2008-04-14  3:09 ` Niv Sardi
2008-04-14  3:20   ` Eric Sandeen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.