2 # FS QA Test No. shared/002
4 # Delayed allocation collapse range tests
5 # This testcase is one of the 4 testcases (shared 001 - 004) which tries to
6 # test various corner cases for fcollapse range functionality over different
7 # type of extents. These tests are based on generic/255 test case.
8 # For the type of tests, check the description of _test_generic_punch
10 #-----------------------------------------------------------------------
11 # Copyright (c) 2013 Samsung Electronics. All Rights Reserved.
13 # This program is free software; you can redistribute it and/or
14 # modify it under the terms of the GNU General Public License as
15 # published by the Free Software Foundation.
17 # This program is distributed in the hope that it would be useful,
18 # but WITHOUT ANY WARRANTY; without even the implied warranty of
19 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 # GNU General Public License for more details.
22 # You should have received a copy of the GNU General Public License
23 # along with this program; if not, write the Free Software Foundation,
24 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26 #-----------------------------------------------------------------------
30 seqres=$RESULT_DIR/$seq
31 echo "QA output created by $seq"
35 status=1 # failure is the default!
42 trap "_cleanup ; exit \$status" 0 1 2 3 15
44 # get standard environment, filters and checks
45 # we need to include common/punch to get defination fo filter functions
50 # real QA test starts here
51 _supported_fs xfs ext4
54 _require_xfs_io_falloc_punch
55 _require_xfs_io_falloc
56 _require_xfs_io_fiemap
57 _require_xfs_io_falloc_collapse
59 testfile=$TEST_DIR/$seq.$$
61 _test_generic_punch -d falloc fpunch fcollapse fiemap _filter_hole_fiemap $testfile