generic/395: remove workarounds for wrong error codes
[xfstests-dev.git] / tests / generic / 237
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2010 FUJITSU LIMITED. All Rights Reserved.
4 #
5 # FS QA Test No. 237
6 #
7 # Check user B can setfacl a file which belongs to user A
8 # See also http://marc.info/?l=linux-btrfs&m=127434445620298&w=2
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 # get standard environment, filters and checks
20 . ./common/rc
21 . ./common/filter
22 . ./common/attr
23
24 _cleanup()
25 {
26         cd /
27         rm -f $tmp.*
28         [ -n "$TEST_DIR" ] && rm -rf $TEST_DIR/$seq.dir1
29 }
30
31 # real QA test starts here
32 _supported_fs generic
33 # only Linux supports fallocate
34 _require_test
35 _require_runas
36
37 rm -f $seqres.full
38
39 _acl_setup_ids
40 _require_acls
41
42 # get dir
43 cd $TEST_DIR
44 rm -rf $seq.dir1
45 mkdir $seq.dir1
46 cd $seq.dir1
47
48 touch file1
49 chown $acl1.$acl1 file1
50
51 echo "Expect to FAIL"
52 _runas -u $acl2 -g $acl2 -- setfacl -m u::rwx file1 2>&1 | sed 's/^setfacl: \/.*file1: Operation not permitted$/setfacl: file1: Operation not permitted/'
53
54 echo "Test over."
55 # success, all done
56 status=0
57 exit