Whamcloud - gitweb
Fixes from b_port_step needed to get HEAD to build.
[fs/lustre-release.git] / lustre / tests / lockorder.sh
index 34fa695..5134a2d 100644 (file)
@@ -46,7 +46,7 @@ while [ $MINRES -gt $MAXRES ]; do
                MINFILE=$FILETMP
                MINRES=$FILERES
        else
-               rm $TMPFILE
+               rm $FILETMP
        fi
        NUM=$(($NUM + 1))
 done
@@ -60,7 +60,9 @@ $LCTL mark "start dir: $LOCKDIR=$MAXRES file: $LOCKFILE=$MINRES"
 $CREATEMANY -l$LOCKFILE $LOCKFILE -$COUNT &
 CR_PID=$!
 
-sleep 1
+while ! test -f ${LOCKFILE}1 ; do
+       sleep 1
+done
 
 # this will lock $DIR and ${LOCKFILE}0
 $STATMANY -s $DIR2/lockdir/lockfile 1 -$COUNT &
@@ -74,4 +76,4 @@ trap 0
 kill $CR_PID || true
 kill $ST_PID || true
 
-#rm -r $PDIR
+rm -rf $LOCKDIR