xfs: Check for extent overflow when trivally adding a new extent
[xfstests-dev.git] / tests / xfs / 512
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2020 Christoph Hellwig
4 #
5 # FS QA Test 512
6 #
7 # Ensure that removing the access ACL through the XFS-specific attr name removes
8 # the cached ACL as well
9 #
10 seq=`basename $0`
11 seqres=$RESULT_DIR/$seq
12 echo "QA output created by $seq"
13
14 here=`pwd`
15 tmp=/tmp/$$
16 status=1        # failure is the default!
17 trap "_cleanup; exit \$status" 0 1 2 3 15
18
19 _cleanup()
20 {
21         cd /
22         rm -f $FILE
23 }
24
25 # get standard environment, filters and checks
26 . ./common/rc
27 . ./common/filter
28 . ./common/attr
29
30 # real QA test starts here
31 _supported_fs xfs
32
33 _require_test
34 _require_runas
35 _require_acls
36 _require_attrs
37 _require_user
38
39 FILE=$TEST_DIR/foo
40
41 echo "This is a test" > ${FILE}
42 chmod g-r $FILE
43 chmod o-r $FILE
44 chmod u-r $FILE
45
46 echo "No ACL: "
47 _user_do "cat $FILE"
48
49 echo "With ACL: "
50 setfacl -m u:$qa_user:r $FILE
51 _user_do "cat $FILE"
52
53 echo "ACL Removed through attr:"
54 $SETFATTR_PROG -x trusted.SGI_ACL_FILE ${FILE}
55 _user_do "cat $FILE"
56
57 status=0
58 exit