[PATCH 18/40] xfs/176: fix broken setup code

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



From: Dave Chinner <dchinner@xxxxxxxxxx>

The test does not pass the mkfs output through the mkfs filter, so
the inode size is not set up correctly. Hence it calculates the
CHUNK_SIZE as 0, and it ends up getting stuck in an endless loop
throwing ENOSPC errors because the offset never changes.

While there, use 'echo -n' rather than 'touch' to create zero length
files much faster.

Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
---
 tests/xfs/176 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/xfs/176 b/tests/xfs/176
index e3fa87c43..8e5951ec1 100755
--- a/tests/xfs/176
+++ b/tests/xfs/176
@@ -21,7 +21,7 @@ _require_scratch_xfs_shrink
 _require_xfs_io_command "falloc"
 _require_xfs_io_command "fpunch"
 
-_scratch_mkfs "-d size=50m -m crc=1 -i sparse" |
+_scratch_mkfs "-d size=50m -m crc=1 -i sparse" | \
 	_filter_mkfs > /dev/null 2> $tmp.mkfs
 . $tmp.mkfs	# for isize
 cat $tmp.mkfs >> $seqres.full
@@ -69,7 +69,7 @@ _alloc_inodes()
 
 	i=0
 	while [ true ]; do
-		touch $dir/$i 2>> $seqres.full || break
+		echo -n > $dir/$i >> $seqres.full 2>&1 || break
 		i=$((i + 1))
 	done
 }
-- 
2.45.2





[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux