From: adilger Date: Sat, 11 Jan 2003 07:43:36 +0000 (+0000) Subject: Fix up the echo.sh config script so that you can use it with LOV configs, X-Git-Tag: v1_7_0_51~2^20~38 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=5d5a8d9bf952593ab0b7eac8b3ecd1403442cfa0;p=fs%2Flustre-release.git Fix up the echo.sh config script so that you can use it with LOV configs, like "LOV=1 NAME=echo sh llmount.sh". Note that LOV configs do not yet work, but I know where the problem lies (we are not copying the full LOV MD data to the user buffer primarily, although fixing this entails a bunch of other changes I think). --- diff --git a/lustre/tests/runregression-net.sh b/lustre/tests/runregression-net.sh index 288f847..15ed75b 100644 --- a/lustre/tests/runregression-net.sh +++ b/lustre/tests/runregression-net.sh @@ -1,8 +1,6 @@ #!/bin/sh -export PATH=/sbin:/usr/sbin:$PATH - SRCDIR="`dirname $0`/" -. $SRCDIR/common.sh +export PATH=/sbin:/usr/sbin:$SRCDIR/../utils:$PATH COUNT=${COUNT:-1000000} COUNT_10=`expr $COUNT / 10` @@ -11,13 +9,17 @@ COUNT_1000=`expr $COUNT / 1000` ENDRUN=endrun-`hostname` -ECHONAME="`$OBDCTL device_list 2> /dev/null | awk '/ echo_client / { print $4 }' | tail -1`" +ECHONAME="`lctl device_list 2> /dev/null | awk '/ echo_client / { print $4 }' | tail -1`" if [ -z "$ECHONAME" ]; then echo "$0: needs an ECHO_CLIENT set up first" 1>&2 exit 1 fi +cleanup () { + lctl --device \$$ECHONAME destroy $OID +} + runthreads() { THR=$1 DO=$2 @@ -29,28 +31,26 @@ runthreads() { test_getattr) RW= ;; - test_brw_write) DO=test_brw RW=w ;; - test_brw_read) DO=test_brw RW=r ;; esac - $OBDCTL --threads $THR v \$$ECHONAME $DO $CNT $RW $V $PGS $OID || exit 1 + lctl --threads $THR v \$$ECHONAME $DO $CNT $RW $V $PGS $OID || exit 1 - if [ -e endrun ]; then - rm endrun - echo "exiting because endrun file was found" - exit 0 + if [ -e $ENDRUN ]; then + rm $ENDRUN + echo "exiting because $ENDRUN file was found" + cleanup fi } -[ -z "$OID" ] && OID=`$OBDCTL --device \\$$ECHONAME create 1 | awk '/is object id/ { print $6 }'` +[ -z "$OID" ] && OID=`lctl --device \\$$ECHONAME create 1 | awk '/is object id/ { print $6 }'` [ -z "$OID" ] && echo "error creating object" 1>&2 && exit 1 # TODO: obdctl needs to check on the progress of each forked thread @@ -97,4 +97,4 @@ for CMD in test_getattr test_brw_write test_brw_read; do [ "$PGV" ] && runthreads 100 $CMD $COUNT_1000 -30 $PGV done -$OBDCTL --device \$$ECHONAME destroy $OID +lctl --device \$$ECHONAME destroy $OID