X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Ftests%2Flockorder.sh;h=162df9af0a31fecf0a34a8173132b2eeba598584;hb=fc97a6df9bd039547e7b2d24a08fcbfe751eadbd;hp=cf5051b5270065d5cab75005755f693ce4ff7821;hpb=d9694cb64f8b3d4762a06520ced4edcb8235ec30;p=fs%2Flustre-release.git diff --git a/lustre/tests/lockorder.sh b/lustre/tests/lockorder.sh index cf5051b..162df9a 100644 --- a/lustre/tests/lockorder.sh +++ b/lustre/tests/lockorder.sh @@ -15,9 +15,10 @@ COUNT=${COUNT:-100} cleanup() { [ $CR_PID ] && kill -9 $CR_PID + [ $ST_PID ] && kill -9 $ST_PID } -trap cleanup 0 +trap cleanup EXIT LOCKDIR=$DIR/lockdir LOCKFILE=$LOCKDIR/lockfile @@ -46,7 +47,7 @@ while [ $MINRES -gt $MAXRES ]; do MINFILE=$FILETMP MINRES=$FILERES else - rm $TMPFILE + rm $FILETMP fi NUM=$(($NUM + 1)) done @@ -60,7 +61,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 &