generic/325: Fix test case to work on 64K page size.

The test case passes 32K as the offset value to msync. This fails on machines
with 64K page size. Fix this by creating a larger file and passing offset
values which are multiples of 64K.

Signed-off-by: Chandan Rajendra <chandan@linux.vnet.ibm.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
This commit is contained in:
Chandan Rajendra
2015-02-25 15:35:20 +11:00
committed by Dave Chinner
parent 788b13485b
commit 131058920a
2 changed files with 10 additions and 10 deletions
+5 -5
View File
@@ -64,7 +64,7 @@ _init_flakey
_mount_flakey
# Create the file first.
$XFS_IO_PROG -f -c "pwrite -S 0xff 0 64K" $SCRATCH_MNT/foo | _filter_xfs_io
$XFS_IO_PROG -f -c "pwrite -S 0xff 0 256K" $SCRATCH_MNT/foo | _filter_xfs_io
# Now sync the file data to disk using 'sync' and not an fsync. This is because
# in btrfs the first fsync clears the btrfs inode full fsync flag, which must
@@ -80,11 +80,11 @@ sync
# This second msync() used to be a no-op for that btrfs bug (and the first fsync
# didn't log the last 4Kb extent as expected too).
$XFS_IO_PROG \
-c "mmap -w 0 64K" \
-c "mmap -w 0 256K" \
-c "mwrite -S 0xaa 0 4K" \
-c "mwrite -S 0xbb 60K 4K" \
-c "msync -s 0K 16K" \
-c "msync -s 32K 32K" \
-c "mwrite -S 0xbb 252K 4K" \
-c "msync -s 0K 64K" \
-c "msync -s 192K 64K" \
-c "munmap" \
$SCRATCH_MNT/foo | _filter_xfs_io
+5 -5
View File
@@ -1,19 +1,19 @@
QA output created by 325
wrote 65536/65536 bytes at offset 0
wrote 262144/262144 bytes at offset 0
XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
File content before crash/reboot:
0000000 aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa
*
0010000 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
*
0170000 bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb
0770000 bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb
*
0200000
1000000
File content after crash/reboot and fs mount:
0000000 aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa
*
0010000 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
*
0170000 bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb
0770000 bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb
*
0200000
1000000