public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfstests 271: use xfs_io to truncate file instead of truncate(1)
@ 2012-01-10 16:37 Eryu Guan
  2012-01-10 16:37 ` [PATCH] xfstests 273: Create lost+found to pass _check_scratch_fs Eryu Guan
  2012-01-11 11:46 ` [PATCH] xfstests 271: use xfs_io to truncate file instead of truncate(1) Christoph Hellwig
  0 siblings, 2 replies; 5+ messages in thread
From: Eryu Guan @ 2012-01-10 16:37 UTC (permalink / raw)
  To: xfs; +Cc: Eryu Guan

Distros(eg. RHEL5) with older version of coreutils have no truncate(1)
command. Use xfs_io instead to avoid "command not found" failures.

Signed-off-by: Eryu Guan <guaneryu@gmail.com>
---
 271 |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/271 b/271
index 58a7f91..b96d702 100755
--- a/271
+++ b/271
@@ -55,7 +55,7 @@ do
     dd if=/dev/zero of=$SCRATCH_MNT/file bs=4k count=1 seek=$((i*10))
 done
 # truncate last extent
-truncate $SCRATCH_MNT/file --size $((4096* 200))
+$XFS_IO_PROG -F -f -c "truncate $((4096*200))" $SCRATCH_MNT/file
 
 if ! _scratch_unmount; then
 	echo "failed to umount"
-- 
1.7.8.2

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

end of thread, other threads:[~2012-01-12 17:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-10 16:37 [PATCH] xfstests 271: use xfs_io to truncate file instead of truncate(1) Eryu Guan
2012-01-10 16:37 ` [PATCH] xfstests 273: Create lost+found to pass _check_scratch_fs Eryu Guan
2012-01-10 22:02   ` Dave Chinner
2012-01-12 17:24     ` Eryu Guan
2012-01-11 11:46 ` [PATCH] xfstests 271: use xfs_io to truncate file instead of truncate(1) Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox