Skip to contentSkip to conversation

xfstests: more careful size grep in 256

PATCH In review Eric Sandeen 2 participants 2 messages Feb 14, 2012 – Feb 17, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xfstests: more careful size grep in 256

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.

---

256 +1 -1
index 283c7f2..ffe172a 100755
@@ -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
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Eric Sandeen

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,

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs