4 # Make sure user cannot overwrite, append, delete or move a file created by
5 # root. Modified CXFSQA test 940960 and 940558.
7 #-----------------------------------------------------------------------
8 # Copyright (c) 2006 Silicon Graphics, Inc. All Rights Reserved.
9 #-----------------------------------------------------------------------
15 echo "QA output created by $seq"
19 status=0 # success is the default!
20 trap "_cleanup; exit \$status" 0 1 2 3 15
34 s,.*Permission\sdenied.*,Permission denied,;
35 s,.*no\saccess\sto\stty.*,,;
36 s,.*no\sjob\scontrol\sin\sthis\sshell.*,,;
46 echo "/bin/sh '$1'" | su - $qa_user | _filter_user_do
49 # get standard environment, filters and checks
53 # real QA test starts here
54 _supported_fs xfs udf nfs
55 _supported_os Linux IRIX
61 echo foo > $testdir/data_coherency.txt
62 # check basic appending to a file
63 echo bar >> $testdir/data_coherency.txt
66 _user_do "echo goo 2>&1 >> $testdir/data_coherency.txt"
69 _user_do "echo goo 2>&1 > $testdir/data_coherency.txt"
72 _user_do "rm $testdir/data_coherency.txt 2>&1"
75 _user_do "mv $testdir/data_coherency.txt $testdir/data_coherency2.txt 2>&1"
77 cat $testdir/data_coherency.txt