2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2006 Silicon Graphics, Inc. All Rights Reserved.
7 # Make sure user cannot overwrite, append, delete or move a file created by
8 # root. Modified CXFSQA test 940960 and 940558.
11 seqres=$RESULT_DIR/$seq
12 echo "QA output created by $seq"
16 status=0 # success is the default!
18 trap "_cleanup; exit \$status" 0 1 2 3 15
23 rm -rf $my_test_subdir
27 # get standard environment, filters and checks
31 # real QA test starts here
38 my_test_subdir=$TEST_DIR/123subdir
40 # create subdir with required permissions
41 mkdir -m 755 $my_test_subdir
43 echo foo > $my_test_subdir/data_coherency.txt
44 # check basic appending to a file
45 echo bar >> $my_test_subdir/data_coherency.txt
48 _user_do "echo goo >> $my_test_subdir/data_coherency.txt"
51 _user_do "echo goo > $my_test_subdir/data_coherency.txt"
54 _user_do "rm $my_test_subdir/data_coherency.txt"
57 _user_do "mv $my_test_subdir/data_coherency.txt $my_test_subdir/data_coherency2.txt"
59 cat $my_test_subdir/data_coherency.txt