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 _begin_fstest auto prealloc quick zero
13 # Import common functions.
17 # real QA test starts here
19 _require_xfs_io_command "falloc"
20 _require_xfs_io_command "fzero"
23 # Select appropriate golden output based on mount options
26 testfile=$TEST_DIR/001.$$
28 # Standard zero range tests
29 _test_generic_punch falloc fzero fzero fiemap _filter_fiemap $testfile
31 # Delayed allocation zero range tests
32 _test_generic_punch -d falloc fzero fzero fiemap _filter_fiemap $testfile
34 # Multi zero range tests
35 _test_generic_punch -k falloc fzero fzero fiemap _filter_fiemap $testfile
37 # Delayed allocation multi zero range tests
38 _test_generic_punch -d -k falloc fzero fzero fiemap _filter_fiemap $testfile