Files
apfstests/tests/generic/436
T
Amir Goldstein 87a53d2e7c generic/{436,445}: check falloc support
The sanity test case in those tests (i.e. 13..17)
are all skipped in fs with no falloc support, but the tests
are reported to pass.

For example, from 445.full:

 File system supports the default behavior.
 File system does not support fallocate.
 Allocation size: 4096
 17. Test file with unwritten extents, data-hole-data inside page
 Test skipped as fs doesn't support unwritten extents.

Explicitly check for falloc support before running those tests
so they would be properly reported as skipped.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
2019-03-02 22:37:23 +08:00

46 lines
890 B
Bash
Executable File

#! /bin/bash
# SPDX-License-Identifier: GPL-2.0
# Copyright (c) 2017 SUSE. All Rights Reserved.
#
# FS QA Test No. 436
#
# More SEEK_DATA/SEEK_HOLE sanity tests.
#
seq=`basename $0`
seqres=$RESULT_DIR/$seq
echo "QA output created by $seq"
here=`pwd`
tmp=$$
status=1 # failure is the default!
trap "_cleanup; exit \$status" 0 1 2 3 15
# get standard environment, filters and checks
. ./common/rc
. ./common/filter
_supported_fs generic
_supported_os Linux
_require_test
_require_seek_data_hole
# All the seek sanity test cases here do falloc
_require_xfs_io_command "falloc"
BASE_TEST_FILE=$TEST_DIR/seek_sanity_testfile
_require_test_program "seek_sanity_test"
_cleanup()
{
rm -f $tmp.* $BASE_TEST_FILE.*
}
$here/src/seek_sanity_test -s 13 -e 16 $BASE_TEST_FILE > $seqres.full 2>&1 ||
_fail "seek sanity check failed!"
# success, all done
echo "Silence is golden"
status=0
exit