4 # Make sure renames accross project boundaries are properly rejected
5 # and that we don't use the wrong lock flags internally.
7 # Based on a report and testcase from Arkadiusz Miskiewicz <arekm@maven.pl>
9 #-----------------------------------------------------------------------
10 # Copyright (c) 2008 Christoph Hellwig.
11 #-----------------------------------------------------------------------
17 echo "QA output created by $seq"
21 status=1 # failure is the default!
29 trap "_cleanup; exit \$status" 0 1 2 3 15
31 # get standard environment, filters and checks
36 # real QA test starts here
44 # Setup temporary replacements for /etc/projects and /etc/projid
46 cat >$tmp.projects <<EOF
50 cat >$tmp.projid <<EOF
55 # And make sure we always use our replacements
57 quota_cmd="xfs_quota -D $tmp.projects -P $tmp.projid"
59 _scratch_mkfs_xfs >/dev/null 2>&1
60 _qmount_option "pquota"
64 # Create the project root
68 $quota_cmd -x -c 'project -s answer' $SCRATCH_MNT >/dev/null 2>&1
69 $quota_cmd -x -c 'limit -p bhard=100m answer' $SCRATCH_MNT
71 touch $SCRATCH_MNT/test
74 # Try renaming a file into the project. This should fail.
76 # We repeat this a couple thousand times as a single rename couldn't
77 # always trigger the wrong unlock flags bug we had in older kernels.
79 for i in `seq 1 2000`; do
80 src/rename test t/test