From: Darrick J. Wong <djwong@xxxxxxxxxx> Skip the generic fpunch tests on a file when the file's allocation unit size is not congruent with the system page size. This is needed for testing swapfiles and mmap collisions wiht fallocate. Assuming this edgecase configuration of an edgecase feature is vanishingly rare, let's just _notrun the tests instead of rewriting a ton of tests to do their integrity checking by hand. Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx> --- tests/generic/495 | 4 ++++ tests/generic/503 | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/tests/generic/495 b/tests/generic/495 index 608f1715..5e03dfee 100755 --- a/tests/generic/495 +++ b/tests/generic/495 @@ -21,6 +21,10 @@ _require_sparse_files _scratch_mkfs >> $seqres.full 2>&1 _scratch_mount +blksize=$(_get_file_block_size $SCRATCH_MNT) +test $blksize -eq $(getconf PAGE_SIZE) || \ + _notrun "swap file allocation unit size must match page size" + # We can't use _format_swapfile because we're using our custom mkswap and # swapon. touch "$SCRATCH_MNT/swap" diff --git a/tests/generic/503 b/tests/generic/503 index a6971e63..ff3390bf 100755 --- a/tests/generic/503 +++ b/tests/generic/503 @@ -38,6 +38,10 @@ _scratch_mkfs >> $seqres.full 2>&1 export MOUNT_OPTIONS="" _scratch_mount >> $seqres.full 2>&1 +blksize=$(_get_file_block_size $SCRATCH_MNT) +test $blksize -eq $(getconf PAGE_SIZE) || \ + _notrun "file block size must match page size" + # real QA test starts here $here/src/t_mmap_collision $TEST_DIR/testfile $SCRATCH_MNT/testfile