2 # FS QA Test No. generic/012
4 # Multi collapse range tests
5 # This testcase is one of the 4 testcases 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
55 _require_xfs_io_command "fpunch"
56 _require_xfs_io_command "falloc"
57 _require_xfs_io_command "fiemap"
58 _require_xfs_io_command "fcollapse"
60 testfile=$TEST_DIR/$seq.$$
62 _test_generic_punch -k falloc fpunch fcollapse fiemap _filter_hole_fiemap $testfile