[patch][xfstests-dev] 164: write a multiple of 4k instead of 512

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

 



Hi,

When running test 164 against a 4k sector device, the initial file write
of 50K fails with EINVAL, since it isn't a multiple of the device sector
size.  I fixed this by bumping the amount written to 52K.  Comments, as
always, are appreciated.

Signed-off-by: Jeff Moyer <jmoyer@xxxxxxxxxx>

diff --git a/164 b/164
index 03784c6..2aea353 100755
--- a/164
+++ b/164
@@ -78,7 +78,7 @@ _test_eof_hole()
 	# on a BB boundary
 	rm -f $testfile
 	$XFS_IO_PROG -f -d \
-		  -c 'pwrite -b 50k 0 50k' \
+		  -c 'pwrite -b 52k 0 52k' \
 		  -c 'truncate 100k' \
                   -c 'pread -b 200k 0 200k' \
 		  $testfile | _filter_io
@@ -90,7 +90,7 @@ _test_eof_hole()
 	boundary_minus1=`expr 100 \* 1024 - 1`
 	echo "boundary_minus1 = $boundary_minus1"
 	$XFS_IO_PROG -f -d \
-		  -c 'pwrite -b 50k 0 50k' \
+		  -c 'pwrite -b 52k 0 52k' \
 		  -c "truncate $boundary_minus1" \
                   -c 'pread -b 200k 0 200k' \
 		  $testfile | _filter_io
@@ -102,7 +102,7 @@ _test_eof_hole()
 	boundary_plus1=`expr 100 \* 1024 + 1`
 	echo "boundary_plus1 = $boundary_plus1"
 	$XFS_IO_PROG -f -d \
-		  -c 'pwrite -b 50k 0 50k' \
+		  -c 'pwrite -b 52k 0 52k' \
 		  -c "truncate $boundary_plus1" \
                   -c 'pread -b 200k 0 200k' \
 		  $testfile | _filter_io
@@ -117,7 +117,7 @@ _test_eof_unwritten_extent()
 	$XFS_IO_PROG -f -d \
 		  -c 'resvsp 0 100k' \
 		  -c 'truncate 100k' \
-		  -c 'pwrite -b 50k 0 50k' \
+		  -c 'pwrite -b 52k 0 52k' \
                   -c 'pread -b 200k 0 200k' \
 		  $testfile | _filter_io
 	$XFS_IO_PROG -c 'bmap -vp' $testfile | _filter_bmap
@@ -130,7 +130,7 @@ _test_eof_unwritten_extent()
 	$XFS_IO_PROG -f -d \
 		  -c "resvsp 0 $boundary_minus1" \
 		  -c "truncate $boundary_minus1" \
-		  -c 'pwrite -b 50k 0 50k' \
+		  -c 'pwrite -b 52k 0 52k' \
                   -c 'pread -b 200k 0 200k' \
 		$testfile | _filter_io
 	$XFS_IO_PROG -c 'bmap -vp' $testfile | _filter_bmap
@@ -143,7 +143,7 @@ _test_eof_unwritten_extent()
 	$XFS_IO_PROG -f -d \
 		  -c "resvsp 0 $boundary_plus1" \
 		  -c "truncate $boundary_plus1" \
-		  -c 'pwrite -b 50k 0 50k' \
+		  -c 'pwrite -b 52k 0 52k' \
                   -c 'pread -b 200k 0 200k' \
 		  $testfile | _filter_io
 	$XFS_IO_PROG -c 'bmap -vp' $testfile | _filter_bmap
diff --git a/164.out b/164.out
index df67f05..d55e7b5 100644
--- a/164.out
+++ b/164.out
@@ -1,35 +1,35 @@
 QA output created by 164
-wrote 51200/51200 bytes at offset 0
-50 KiB, 1 ops
+wrote 53248/53248 bytes at offset 0
+52 KiB, 1 ops
 read 102400/204800 bytes at offset 0
 100 KiB, 1 ops
 
 boundary_minus1 = 102399
-wrote 51200/51200 bytes at offset 0
-50 KiB, 1 ops
+wrote 53248/53248 bytes at offset 0
+52 KiB, 1 ops
 read 102399/204800 bytes at offset 0
 100 KiB, 1 ops
 
 boundary_plus1 = 102401
-wrote 51200/51200 bytes at offset 0
-50 KiB, 1 ops
+wrote 53248/53248 bytes at offset 0
+52 KiB, 1 ops
 read 102401/204800 bytes at offset 0
 100 KiB, 1 ops
 
-wrote 51200/51200 bytes at offset 0
-50 KiB, 1 ops
+wrote 53248/53248 bytes at offset 0
+52 KiB, 1 ops
 read 102400/204800 bytes at offset 0
 100 KiB, 1 ops
 
 boundary_minus1 = 102399
-wrote 51200/51200 bytes at offset 0
-50 KiB, 1 ops
+wrote 53248/53248 bytes at offset 0
+52 KiB, 1 ops
 read 102399/204800 bytes at offset 0
 100 KiB, 1 ops
 
 boundary_plus1 = 102401
-wrote 51200/51200 bytes at offset 0
-50 KiB, 1 ops
+wrote 53248/53248 bytes at offset 0
+52 KiB, 1 ops
 read 102401/204800 bytes at offset 0
 100 KiB, 1 ops
 

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


[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux