* [PATCH] xfstests: more careful size grep in 256
@ 2012-02-14 18:26 Eric Sandeen
2012-02-17 17:21 ` Christoph Hellwig
0 siblings, 1 reply; 2+ messages in thread
From: Eric Sandeen @ 2012-02-14 18:26 UTC (permalink / raw)
To: xfs-oss; +Cc: Christoph Hellwig
Removing the "-F" flag in xfs_io changed stat output.
Before the change when -F was used, whether or not the file
was on xfs, it skipped the extra FSGEOM call. Now that -F is
removed, it calls FSGEOM if the file is on an xfs fs. The "size"
grep in test 256 was a bit too loose and matched 2 lines if the
FSGEOM output was present, breaking the test.
A more specific grep for stat.size fixes this.
Reported-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
diff --git a/256 b/256
index 283c7f2..ffe172a 100755
--- a/256
+++ b/256
@@ -98,7 +98,7 @@ _fill_fs() {
if [ -f $dir/$file_count.bin ]
then
- bytes_written=`$XFS_IO_PROG -F -c "stat" $dir/$file_count.bin | grep size | cut -d ' ' -f3`
+ bytes_written=`$XFS_IO_PROG -F -c "stat" $dir/$file_count.bin | grep stat.size | cut -d ' ' -f3`
fi
# If there was no room to make the file,
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] xfstests: more careful size grep in 256
2012-02-14 18:26 [PATCH] xfstests: more careful size grep in 256 Eric Sandeen
@ 2012-02-17 17:21 ` Christoph Hellwig
0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2012-02-17 17:21 UTC (permalink / raw)
To: Eric Sandeen; +Cc: Christoph Hellwig, xfs-oss
On Tue, Feb 14, 2012 at 10:26:01AM -0800, Eric Sandeen wrote:
> Removing the "-F" flag in xfs_io changed stat output.
>
> Before the change when -F was used, whether or not the file
> was on xfs, it skipped the extra FSGEOM call. Now that -F is
> removed, it calls FSGEOM if the file is on an xfs fs. The "size"
> grep in test 256 was a bit too loose and matched 2 lines if the
> FSGEOM output was present, breaking the test.
>
> A more specific grep for stat.size fixes this.
Looks good,
Reviewed-by: Christoph Hellwig <hch@lst.de>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-02-17 17:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-14 18:26 [PATCH] xfstests: more careful size grep in 256 Eric Sandeen
2012-02-17 17:21 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox