mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
164: write a multiple of 4k instead of 512
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. Signed-off-by: Jeff Moyer <jmoyer@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
committed by
Christoph Hellwig
parent
3e4fb26f0c
commit
5483e761dc
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user