From: Eric Sandeen Date: Fri, 17 Feb 2012 20:43:12 +0000 (-0600) Subject: 256: use more specific grep for file size X-Git-Tag: v2022.05.01~3619 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=28c0fadd20543ee272811db3165566a92fb34dc3;p=xfstests-dev.git 256: use more specific grep for file size 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 Signed-off-by: Eric Sandeen Reviewed-by: Christoph Hellwig --- diff --git a/256 b/256 index 283c7f29..ffe172a3 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,