Modify dassi QA scratch device
[xfstests-dev.git] / 126
1 #! /bin/sh
2 # FSQA Test No. 126
3 #
4 # tests various file permission options modified from CXFSQA test fs_perms
5 #
6 #-----------------------------------------------------------------------
7 #  Copyright (c) 2006 Silicon Graphics, Inc.  All Rights Reserved.
8 #-----------------------------------------------------------------------
9 #
10 # creator
11 owner=allanr@sgi.com
12
13 seq=`basename $0`
14 echo "QA output created by $seq"
15
16 here=`pwd`
17 tmp=/tmp/$$
18 status=1        # failure is the default!
19 trap "_cleanup; exit \$status" 0 1 2 3 15
20
21 _cleanup()
22 {
23     _cleanup_testdir
24 }
25
26 # get standard environment, filters and checks
27 . ./common.rc
28 . ./common.filter
29
30 # real QA test starts here
31 _supported_fs xfs
32 _supported_os Linux
33
34 _require_user
35 _setup_testdir
36
37 QA_FS_PERMS=$here/src/fs_perms
38
39 cd $testdir
40 cp $here/src/testx ./testx.file
41
42 # file_perm owner_uid owner_gid tester_uid tester_gid perm_to_test expected_result pass=1
43 $QA_FS_PERMS 001 99 99 12 100 x 1
44 $QA_FS_PERMS 010 99 99 200 99 x 1
45 $QA_FS_PERMS 100 99 99 99 500 x 1
46 $QA_FS_PERMS 002 99 99 12 100 w 1
47 $QA_FS_PERMS 020 99 99 200 99 w 1
48 $QA_FS_PERMS 200 99 99 99 500 w 1
49 $QA_FS_PERMS 004 99 99 12 100 r 1
50 $QA_FS_PERMS 040 99 99 200 99 r 1
51 $QA_FS_PERMS 400 99 99 99 500 r 1
52 $QA_FS_PERMS 000 99 99 99 99 r 1
53 $QA_FS_PERMS 000 99 99 99 99 w 1
54 $QA_FS_PERMS 000 99 99 99 99 x 1
55 $QA_FS_PERMS 010 99 99 99 500 x 1
56 $QA_FS_PERMS 100 99 99 200 99 x 1
57 $QA_FS_PERMS 020 99 99 99 500 w 1
58 $QA_FS_PERMS 200 99 99 200 99 w 1
59 $QA_FS_PERMS 040 99 99 99 500 r 1
60 $QA_FS_PERMS 400 99 99 200 99 r 1
61
62 status=0
63 _cleanup
64 exit