2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright 2014 (C) Red Hat, Inc., Lukas Czerner <lczerner@redhat.com>
7 # Test fallocate FALLOC_FL_ZERO_RANGE
11 seqres=$RESULT_DIR/$seq
12 echo "QA output created by $seq"
16 status=1 # failure is the default!
23 trap "_cleanup ; exit \$status" 0 1 2 3 15
25 # get standard environment, filters and checks
30 # real QA test starts here
32 _require_xfs_io_command "falloc"
33 _require_xfs_io_command "fzero"
36 # Select appropriate golden output based on mount options
39 testfile=$TEST_DIR/001.$$
41 # Standard zero range tests
42 _test_generic_punch falloc fzero fzero fiemap _filter_fiemap $testfile
44 # Delayed allocation zero range tests
45 _test_generic_punch -d falloc fzero fzero fiemap _filter_fiemap $testfile
47 # Multi zero range tests
48 _test_generic_punch -k falloc fzero fzero fiemap _filter_fiemap $testfile
50 # Delayed allocation multi zero range tests
51 _test_generic_punch -d -k falloc fzero fzero fiemap _filter_fiemap $testfile