generic: test adding filesystem-level fscrypt key via key_id
[xfstests-dev.git] / tests / generic / 016
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2013 Samsung Electronics.  All Rights Reserved.
4 #
5 # FS QA Test No. generic/016
6 #
7 # Delayed allocation multi collapse range tests
8 # This testcase is one of the 4 testcases which tries to
9 # test various corner cases for fcollapse range functionality over different
10 # type of extents. These tests are based on generic/255 test case.
11 # For the type of tests, check the description of _test_generic_punch
12 # in common/rc.
13 seq=`basename $0`
14 seqres=$RESULT_DIR/$seq
15 echo "QA output created by $seq"
16
17 here=`pwd`
18 tmp=/tmp/$$
19 status=1        # failure is the default!
20
21 _cleanup()
22 {
23     rm -f $tmp.*
24 }
25
26 trap "_cleanup ; exit \$status" 0 1 2 3 15
27
28 # get standard environment, filters and checks
29 # we need to include common/punch to get defination fo filter functions
30 . ./common/rc
31 . ./common/filter
32 . ./common/punch
33
34 # real QA test starts here
35 _supported_fs generic
36 _supported_os Linux
37
38 _require_test
39 _require_xfs_io_command "fpunch"
40 _require_xfs_io_command "falloc"
41 _require_xfs_io_command "fiemap"
42 _require_xfs_io_command "fcollapse"
43
44 testfile=$TEST_DIR/$seq.$$
45
46 _test_generic_punch -d -k falloc fpunch fcollapse fiemap _filter_hole_fiemap $testfile
47 _check_test_fs
48
49 status=0
50 exit