blob: 04fbd4c6dd9a0203ddf80d125bb01cba917f57ea (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
#! /bin/bash
# SPDX-License-Identifier: GPL-2.0
# Copyright (c) 2006 Silicon Graphics, Inc. All Rights Reserved.
#
# FSQA Test No. 126
#
# tests various file permission options modified from CXFSQA test fs_perms
#
. ./common/preamble
_begin_fstest perms auto quick
# Override the default cleanup function.
_cleanup()
{
cd /
}
# Import common functions.
. ./common/filter
# real QA test starts here
_supported_fs generic
_require_test
_require_chown
QA_FS_PERMS=$here/src/fs_perms
cd $TEST_DIR
cp $here/src/testx ./testx.file
# file_perm owner_uid owner_gid tester_uid tester_gid perm_to_test expected_result pass=1
$QA_FS_PERMS 001 99 99 12 100 x 1
$QA_FS_PERMS 010 99 99 200 99 x 1
$QA_FS_PERMS 100 99 99 99 500 x 1
$QA_FS_PERMS 002 99 99 12 100 w 1
$QA_FS_PERMS 020 99 99 200 99 w 1
$QA_FS_PERMS 200 99 99 99 500 w 1
$QA_FS_PERMS 004 99 99 12 100 r 1
$QA_FS_PERMS 040 99 99 200 99 r 1
$QA_FS_PERMS 400 99 99 99 500 r 1
$QA_FS_PERMS 000 99 99 99 99 r 1
$QA_FS_PERMS 000 99 99 99 99 w 1
$QA_FS_PERMS 000 99 99 99 99 x 1
$QA_FS_PERMS 010 99 99 99 500 x 1
$QA_FS_PERMS 100 99 99 200 99 x 1
$QA_FS_PERMS 020 99 99 99 500 w 1
$QA_FS_PERMS 200 99 99 200 99 w 1
$QA_FS_PERMS 040 99 99 99 500 r 1
$QA_FS_PERMS 400 99 99 200 99 r 1
rm -f ./testx.file
status=0
exit
|