From: Eryu Guan Date: Fri, 27 Jan 2012 19:15:30 +0000 (-0600) Subject: 271: use xfs_io to truncate file instead of truncate(1) X-Git-Tag: v2022.05.01~3622 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=bc78389b3f98b25adb0e3de54c0cf7bea4c38def;p=xfstests-dev.git 271: use xfs_io to truncate file instead of truncate(1) 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 Reviewed-by: Christoph Hellwig Signed-off-by: Eric Sandeen --- diff --git a/271 b/271 index 58a7f916..b96d7025 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"