X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Ftests%2Frundbench;h=11f619116dba6b00dd33ca6d6626f974f307c9d1;hb=0ad54d59777366fba8ee61eaaa27b3060c91782f;hp=ab9f2362c0d65d6315091a6f1d12946398f23d04;hpb=48c8cf8fe613327c8735fe61482039f210fcb443;p=fs%2Flustre-release.git diff --git a/lustre/tests/rundbench b/lustre/tests/rundbench index ab9f236..11f6191 100755 --- a/lustre/tests/rundbench +++ b/lustre/tests/rundbench @@ -44,13 +44,13 @@ for prefix in $CLIENT_PREFIX; do [ "x$CLIENT" != "x" ] && break; done -if [ -n "$SRC" -a -s "$SRC" ]; then - CLIENT=${SRC} +if [ -n "$DBENCH_SRC" -a -s "$DBENCH_SRC" ]; then + CLIENT=$DBENCH_SRC fi -[ ! -s "$CLIENT" ] && \ - skip_env "$0 : $(hostname) no client file found for dbench DBENCH_LIB=$DBENCH_LIB SRC=$SRC" && \ - exit 0 +[ ! -s "$CLIENT" ] && + skip_env "$0: no client file found for dbench on $(hostname): "\ + "DBENCH_LIB=$DBENCH_LIB DBENCH_SRC=$DBENCH_SRC" && exit 0 [ ! -s "$TGT" ] && echo "copying $CLIENT to $TGT" && cp $CLIENT $TGT [ ! -s "$TGT" ] && \ @@ -59,7 +59,9 @@ fi if [ "x$CHROOT" == "xyes" ]; then echo "copying necessary libs to $DIR" cp `which dbench` $DIR - LIBS71=$(ldd $DIR/dbench|sed -e 's/\t*//' -e 's/.*=> //' -e 's/ .*//' -e 's/^\///') + LIBS71=$(ldd $DIR/dbench | + sed -e 's/\t*//' -e 's/.*=> //' -e 's/ .*//' -e 's/^\///' | + grep -v 'linux-vdso.so.1') tar -C / -chf - $LIBS71 | tar -C $DIR -xvf - if [ "${PIPESTATUS[*]}" != "0 0" ]; then echo "can't copy libs $LIBS71 to $DIR" @@ -80,6 +82,10 @@ rm -rf dbench $LIBS71 client.txt exit 0 ' TERM +# turn off errexit. rundbench will return error code on failure +trap '' ERR +set +e + cd $DIR echo "running 'dbench $@' $PREFIX $PWD at `date`"