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 "fzero"
35 # Select appropriate golden output based on mount options
38 testfile=$TEST_DIR/001.$$
40 # Standard zero range tests
41 _test_generic_punch falloc fzero fzero fiemap _filter_fiemap $testfile
43 # Delayed allocation zero range tests
44 _test_generic_punch -d falloc fzero fzero fiemap _filter_fiemap $testfile
46 # Multi zero range tests
47 _test_generic_punch -k falloc fzero fzero fiemap _filter_fiemap $testfile
49 # Delayed allocation multi zero range tests
50 _test_generic_punch -d -k falloc fzero fzero fiemap _filter_fiemap $testfile