xfs: test what happens when we reset the root dir and it has xattrs
[xfstests-dev.git] / tests / xfs / 242
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2010 Red Hat.  All Rights Reserved.
4 #
5 # FS QA Test No. 242
6 #
7 # Test XFS_IOC_ZERO_RANGE
8 #
9 seq=`basename $0`
10 seqres=$RESULT_DIR/$seq
11 echo "QA output created by $seq"
12
13 here=`pwd`
14 tmp=/tmp/$$
15 status=1        # failure is the default!
16
17 _cleanup()
18 {
19     rm -f $tmp.*
20 }
21
22 trap "_cleanup ; exit \$status" 0 1 2 3 15
23
24 # get standard environment, filters and checks
25 . ./common/rc
26 . ./common/filter
27 . ./common/punch
28
29 # real QA test starts here
30 _supported_fs xfs
31 _require_test
32
33 _require_xfs_io_command "falloc"
34 _require_xfs_io_command "zero"
35
36 testfile=$TEST_DIR/242.$$
37
38 _test_generic_punch resvsp unresvsp zero 'bmap -p' _filter_bmap $testfile
39
40 status=0 ; exit