From b8f655bf1a644442d4260deaae62f4aa8a08580a Mon Sep 17 00:00:00 2001 From: ericm Date: Sun, 17 Aug 2003 07:20:00 +0000 Subject: [PATCH] [liblustre]: liblustre sanity script fix. --- lustre/tests/liblustre_sanity_uml.sh | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/lustre/tests/liblustre_sanity_uml.sh b/lustre/tests/liblustre_sanity_uml.sh index 2f9612a..9ba1798 100644 --- a/lustre/tests/liblustre_sanity_uml.sh +++ b/lustre/tests/liblustre_sanity_uml.sh @@ -27,44 +27,56 @@ fi workdir=`pwd` +cleanup() +{ + curdir=`pwd` + cd $LTREE_KERNEL/tests + $LCONF --node localhost --cleanup --force $LTREE_USER/tests/$configfile 2>&1 > /dev/null + cd $curdir +} + configfile=liblustre_sanity_uml.xml # generate config file rm -f $configfile MDSNODE=localhost OSTNODES=localhost CLIENTS=$LLIP sh uml.sh $configfile +if [ ! -e $configfile ]; then + echo "fail to generate config file $configfile" + exit 1 +fi # generate dump file rm -f /tmp/DUMP_FILE $LCONF --lctl_dump /tmp/DUMP_FILE --node $LLIP $configfile - if [ ! -e /tmp/DUMP_FILE ]; then - echo "error create dumpfile" + echo "error creating dumpfile" exit 1 fi #setup lustre server cd $LTREE_KERNEL/tests -$LCONF --node localhost $LTREE_USER/tests/$configfile +$LCONF --node localhost --reformat $LTREE_USER/tests/$configfile rc=$? if [ $rc -ne 0 ]; then echo "setup lustre server: error $rc" + cleanup exit 1 fi cd $workdir #do liblustre testing -$LTREE_USER/liblustre/lltest $LLIP +$LTREE_USER/liblustre/lltest rc=$? if [ $rc -ne 0 ]; then echo "liblustre test error $rc" + cleanup exit 1 fi -echo "========== liblustre sanity test complete sucessfully ==========" +echo "===== liblustre sanity test complete sucessfully =====" -echo -n "======= cleanup... " -cd $LTREE_KERNEL/tests -$LCONF --node localhost --cleanup --force $LTREE_USER/tests/$configfile 2>&1 > /dev/null -echo "done =======" +echo -n "===== cleanup... "; cleanup; echo "done =====" cd $workdir + +exit 0 -- 1.8.3.1