* [PATCH] xfstests shared/298: various fixes
@ 2013-04-26 20:18 Eric Sandeen
2013-04-30 7:43 ` Dave Chinner
2013-04-30 16:46 ` [PATCH V2] " Eric Sandeen
0 siblings, 2 replies; 7+ messages in thread
From: Eric Sandeen @ 2013-04-26 20:18 UTC (permalink / raw)
To: xfs-oss
fix shared/298:
* don't include common/config, not needed and breaks
stuff when $SCRATCH_DEV_POOL is defined:
Error: $SCRATCH_DEV should be unset when $SCRATCH_DEV_POOL is set
* make sure xfs_io has fiemap, we'll need it
* add -F to the xfs_io invocation, again
* ignore ENOSPC errors from "garbage" loop; the only goal
is to fill it, ENOSPC doesn't matter.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
Wondering if we should just add " -F" to $XFS_IO_PROG . . .
diff --git a/tests/shared/298 b/tests/shared/298
index f1a3432..e2eddda 100755
--- a/tests/shared/298
+++ b/tests/shared/298
@@ -28,12 +28,12 @@ echo "QA output created by $seq"
status=1 # failure is the default!
trap "_cleanup; exit \$status" 0 1 2 3 15
-. common/config
. common/rc
_supported_fs ext4 xfs
_supported_os Linux
_require_fstrim
+_require_xfs_io_fiemap
_require_fs_space $TEST_DIR 307200
[ "$FSTYP" = "ext4" ] && _require_dumpe2fs
@@ -49,7 +49,7 @@ _cleanup()
get_holes()
{
- $XFS_IO_PROG -c fiemap $1 | grep hole | $SED_PROG 's/.*\[\(.*\)\.\.\(.*\)\].*/\1 \2/'
+ $XFS_IO_PROG -F -c fiemap $1 | grep hole | $SED_PROG 's/.*\[\(.*\)\.\.\(.*\)\].*/\1 \2/'
}
get_free_sectors()
@@ -136,9 +136,10 @@ $MKFS_PROG -t $FSTYP $MKFS_OPTIONS $loop_dev &> /dev/null
$MOUNT_PROG $loop_dev $loop_mnt
echo -n "Generating garbage on loop..."
+# Goal is to fill it up, ignore any errors.
for i in `seq 1 10`; do
- mkdir $loop_mnt/$i
- cp -r $here/* $loop_mnt/$i
+ mkdir $loop_mnt/$i &> /dev/null
+ cp -r $here/* $loop_mnt/$i &> /dev/null
done
# Get reference fiemap, this can contain i.e. uninitialized inode table
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] xfstests shared/298: various fixes
2013-04-26 20:18 [PATCH] xfstests shared/298: various fixes Eric Sandeen
@ 2013-04-30 7:43 ` Dave Chinner
2013-04-30 14:17 ` Eric Sandeen
2013-04-30 16:46 ` [PATCH V2] " Eric Sandeen
1 sibling, 1 reply; 7+ messages in thread
From: Dave Chinner @ 2013-04-30 7:43 UTC (permalink / raw)
To: Eric Sandeen; +Cc: xfs-oss
On Fri, Apr 26, 2013 at 03:18:52PM -0500, Eric Sandeen wrote:
> fix shared/298:
>
> * don't include common/config, not needed and breaks
> stuff when $SCRATCH_DEV_POOL is defined:
> Error: $SCRATCH_DEV should be unset when $SCRATCH_DEV_POOL is set
> * make sure xfs_io has fiemap, we'll need it
> * add -F to the xfs_io invocation, again
What's it needed for this time?
> * ignore ENOSPC errors from "garbage" loop; the only goal
> is to fill it, ENOSPC doesn't matter.
>
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
> ---
>
> Wondering if we should just add " -F" to $XFS_IO_PROG . . .
>
> diff --git a/tests/shared/298 b/tests/shared/298
> index f1a3432..e2eddda 100755
> --- a/tests/shared/298
> +++ b/tests/shared/298
> @@ -28,12 +28,12 @@ echo "QA output created by $seq"
> status=1 # failure is the default!
> trap "_cleanup; exit \$status" 0 1 2 3 15
>
> -. common/config
> . common/rc
>
> _supported_fs ext4 xfs
> _supported_os Linux
> _require_fstrim
> +_require_xfs_io_fiemap
> _require_fs_space $TEST_DIR 307200
> [ "$FSTYP" = "ext4" ] && _require_dumpe2fs
>
> @@ -49,7 +49,7 @@ _cleanup()
>
> get_holes()
> {
> - $XFS_IO_PROG -c fiemap $1 | grep hole | $SED_PROG 's/.*\[\(.*\)\.\.\(.*\)\].*/\1 \2/'
> + $XFS_IO_PROG -F -c fiemap $1 | grep hole | $SED_PROG 's/.*\[\(.*\)\.\.\(.*\)\].*/\1 \2/'
> }
>
> get_free_sectors()
> @@ -136,9 +136,10 @@ $MKFS_PROG -t $FSTYP $MKFS_OPTIONS $loop_dev &> /dev/null
> $MOUNT_PROG $loop_dev $loop_mnt
>
> echo -n "Generating garbage on loop..."
> +# Goal is to fill it up, ignore any errors.
> for i in `seq 1 10`; do
> - mkdir $loop_mnt/$i
> - cp -r $here/* $loop_mnt/$i
> + mkdir $loop_mnt/$i &> /dev/null
> + cp -r $here/* $loop_mnt/$i &> /dev/null
Can you break out of the loop once cp fails with an error? There's
no point hammering the filesystem for several loops after the first
ENOSPC occurs....
-Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] xfstests shared/298: various fixes
2013-04-30 7:43 ` Dave Chinner
@ 2013-04-30 14:17 ` Eric Sandeen
0 siblings, 0 replies; 7+ messages in thread
From: Eric Sandeen @ 2013-04-30 14:17 UTC (permalink / raw)
To: Dave Chinner; +Cc: Eric Sandeen, xfs-oss
On 4/30/13 2:43 AM, Dave Chinner wrote:
> On Fri, Apr 26, 2013 at 03:18:52PM -0500, Eric Sandeen wrote:
>> fix shared/298:
>>
>> * don't include common/config, not needed and breaks
>> stuff when $SCRATCH_DEV_POOL is defined:
>> Error: $SCRATCH_DEV should be unset when $SCRATCH_DEV_POOL is set
>> * make sure xfs_io has fiemap, we'll need it
>> * add -F to the xfs_io invocation, again
>
> What's it needed for this time?
the same as last time. :) using old xfs_io on a non-xfs fs.
>> * ignore ENOSPC errors from "garbage" loop; the only goal
>> is to fill it, ENOSPC doesn't matter.
>>
>> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
>> ---
>>
>> Wondering if we should just add " -F" to $XFS_IO_PROG . . .
>>
>> diff --git a/tests/shared/298 b/tests/shared/298
>> index f1a3432..e2eddda 100755
>> --- a/tests/shared/298
>> +++ b/tests/shared/298
>> @@ -28,12 +28,12 @@ echo "QA output created by $seq"
>> status=1 # failure is the default!
>> trap "_cleanup; exit \$status" 0 1 2 3 15
>>
>> -. common/config
>> . common/rc
>>
>> _supported_fs ext4 xfs
>> _supported_os Linux
>> _require_fstrim
>> +_require_xfs_io_fiemap
>> _require_fs_space $TEST_DIR 307200
>> [ "$FSTYP" = "ext4" ] && _require_dumpe2fs
>>
>> @@ -49,7 +49,7 @@ _cleanup()
>>
>> get_holes()
>> {
>> - $XFS_IO_PROG -c fiemap $1 | grep hole | $SED_PROG 's/.*\[\(.*\)\.\.\(.*\)\].*/\1 \2/'
>> + $XFS_IO_PROG -F -c fiemap $1 | grep hole | $SED_PROG 's/.*\[\(.*\)\.\.\(.*\)\].*/\1 \2/'
>> }
>>
>> get_free_sectors()
>> @@ -136,9 +136,10 @@ $MKFS_PROG -t $FSTYP $MKFS_OPTIONS $loop_dev &> /dev/null
>> $MOUNT_PROG $loop_dev $loop_mnt
>>
>> echo -n "Generating garbage on loop..."
>> +# Goal is to fill it up, ignore any errors.
>> for i in `seq 1 10`; do
>> - mkdir $loop_mnt/$i
>> - cp -r $here/* $loop_mnt/$i
>> + mkdir $loop_mnt/$i &> /dev/null
>> + cp -r $here/* $loop_mnt/$i &> /dev/null
>
> Can you break out of the loop once cp fails with an error? There's
> no point hammering the filesystem for several loops after the first
> ENOSPC occurs....
yeah, ok.
Thanks,
-Eric
> -Dave.
>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH V2] xfstests shared/298: various fixes
2013-04-26 20:18 [PATCH] xfstests shared/298: various fixes Eric Sandeen
2013-04-30 7:43 ` Dave Chinner
@ 2013-04-30 16:46 ` Eric Sandeen
2013-05-03 13:00 ` Rich Johnston
` (2 more replies)
1 sibling, 3 replies; 7+ messages in thread
From: Eric Sandeen @ 2013-04-30 16:46 UTC (permalink / raw)
To: Eric Sandeen; +Cc: xfs-oss
fix shared/298:
* don't include common/config, not needed and breaks
stuff when $SCRATCH_DEV_POOL is defined:
Error: $SCRATCH_DEV should be unset when $SCRATCH_DEV_POOL is set
* make sure xfs_io has fiemap, we'll need it
* add -F to the xfs_io invocation, again, for use on
old xfsprogs on non-xfs filesystems
* ignore ENOSPC errors from "garbage" loop; the only goal
is to fill it, ENOSPC doesn't matter.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
V2: break out of copy loop when full
diff --git a/tests/shared/298 b/tests/shared/298
index f1a3432..4541798 100755
--- a/tests/shared/298
+++ b/tests/shared/298
@@ -28,12 +28,12 @@ echo "QA output created by $seq"
status=1 # failure is the default!
trap "_cleanup; exit \$status" 0 1 2 3 15
-. common/config
-. common/rc
+. ./common/rc
_supported_fs ext4 xfs
_supported_os Linux
_require_fstrim
+_require_xfs_io_fiemap
_require_fs_space $TEST_DIR 307200
[ "$FSTYP" = "ext4" ] && _require_dumpe2fs
@@ -49,7 +49,7 @@ _cleanup()
get_holes()
{
- $XFS_IO_PROG -c fiemap $1 | grep hole | $SED_PROG 's/.*\[\(.*\)\.\.\(.*\)\].*/\1 \2/'
+ $XFS_IO_PROG -F -c fiemap $1 | grep hole | $SED_PROG 's/.*\[\(.*\)\.\.\(.*\)\].*/\1 \2/'
}
get_free_sectors()
@@ -136,9 +136,10 @@ $MKFS_PROG -t $FSTYP $MKFS_OPTIONS $loop_dev &> /dev/null
$MOUNT_PROG $loop_dev $loop_mnt
echo -n "Generating garbage on loop..."
+# Goal is to fill it up, ignore any errors.
for i in `seq 1 10`; do
- mkdir $loop_mnt/$i
- cp -r $here/* $loop_mnt/$i
+ mkdir $loop_mnt/$i &> /dev/null
+ cp -r $here/* $loop_mnt/$i &> /dev/null || break
done
# Get reference fiemap, this can contain i.e. uninitialized inode table
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH V2] xfstests shared/298: various fixes
2013-04-30 16:46 ` [PATCH V2] " Eric Sandeen
@ 2013-05-03 13:00 ` Rich Johnston
2013-05-14 18:15 ` Rich Johnston
2013-05-14 18:18 ` Rich Johnston
2 siblings, 0 replies; 7+ messages in thread
From: Rich Johnston @ 2013-05-03 13:00 UTC (permalink / raw)
To: Eric Sandeen; +Cc: Eric Sandeen, xfs-oss
On 04/30/2013 11:46 AM, Eric Sandeen wrote:
> fix shared/298:
>
> * don't include common/config, not needed and breaks
> stuff when $SCRATCH_DEV_POOL is defined:
> Error: $SCRATCH_DEV should be unset when $SCRATCH_DEV_POOL is set
> * make sure xfs_io has fiemap, we'll need it
> * add -F to the xfs_io invocation, again, for use on
> old xfsprogs on non-xfs filesystems
> * ignore ENOSPC errors from "garbage" loop; the only goal
> is to fill it, ENOSPC doesn't matter.
>
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
> ---
>
> V2: break out of copy loop when full
Dave, looks like Eric applied your suggestions, may I put your
Reviewed-by on this one?
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH V2] xfstests shared/298: various fixes
2013-04-30 16:46 ` [PATCH V2] " Eric Sandeen
2013-05-03 13:00 ` Rich Johnston
@ 2013-05-14 18:15 ` Rich Johnston
2013-05-14 18:18 ` Rich Johnston
2 siblings, 0 replies; 7+ messages in thread
From: Rich Johnston @ 2013-05-14 18:15 UTC (permalink / raw)
To: Eric Sandeen; +Cc: Eric Sandeen, xfs-oss
On 04/30/2013 11:46 AM, Eric Sandeen wrote:
> fix shared/298:
>
Looks good.
Reviewed-by: Rich Johnston <rjohnston@sgi.com>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH V2] xfstests shared/298: various fixes
2013-04-30 16:46 ` [PATCH V2] " Eric Sandeen
2013-05-03 13:00 ` Rich Johnston
2013-05-14 18:15 ` Rich Johnston
@ 2013-05-14 18:18 ` Rich Johnston
2 siblings, 0 replies; 7+ messages in thread
From: Rich Johnston @ 2013-05-14 18:18 UTC (permalink / raw)
To: Eric Sandeen; +Cc: Eric Sandeen, xfs-oss
On 04/30/2013 11:46 AM, Eric Sandeen wrote:
> fix shared/298:
>
> * don't include common/config, not needed and breaks
> stuff when $SCRATCH_DEV_POOL is defined:
> Error: $SCRATCH_DEV should be unset when $SCRATCH_DEV_POOL is set
> * make sure xfs_io has fiemap, we'll need it
> * add -F to the xfs_io invocation, again, for use on
> old xfsprogs on non-xfs filesystems
> * ignore ENOSPC errors from "garbage" loop; the only goal
> is to fill it, ENOSPC doesn't matter.
>
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
This has been committed:
commit ecd7386cc9ddb9c4661bae563dc9cbb5835a9e45
Author: Eric Sandeen <sandeen@sandeen.net>
Date: Tue May 14 13:08:45 2013 -0500
xfstests shared/298: various fixes
Thanks
--Rich
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-05-14 18:17 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-26 20:18 [PATCH] xfstests shared/298: various fixes Eric Sandeen
2013-04-30 7:43 ` Dave Chinner
2013-04-30 14:17 ` Eric Sandeen
2013-04-30 16:46 ` [PATCH V2] " Eric Sandeen
2013-05-03 13:00 ` Rich Johnston
2013-05-14 18:15 ` Rich Johnston
2013-05-14 18:18 ` Rich Johnston
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.