From 673a2959efc8c36154ff707ce09b50795a56e673 Mon Sep 17 00:00:00 2001 From: grev Date: Fri, 26 Sep 2008 09:34:35 +0000 Subject: [PATCH] b=15266 i=Adilger PERFORMANCE_SANITY test suit --- lustre/tests/Makefile.am | 3 +++ lustre/tests/acceptance-small.sh | 11 ++++++++++- lustre/tests/cfg/ncli.sh | 5 +++++ lustre/tests/test-framework.sh | 39 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 57 insertions(+), 1 deletion(-) diff --git a/lustre/tests/Makefile.am b/lustre/tests/Makefile.am index e9ebe9f..1a57630 100644 --- a/lustre/tests/Makefile.am +++ b/lustre/tests/Makefile.am @@ -11,6 +11,9 @@ noinst_SCRIPTS += sanity.sh rundbench acceptance-small.sh compile.sh noinst_SCRIPTS += conf-sanity.sh insanity.sh lfscktest.sh oos.sh oos2.sh noinst_SCRIPTS += llog-test.sh recovery-small.sh replay-dual.sh sanity-quota.sh noinst_SCRIPTS += replay-ost-single.sh replay-single.sh run-llog.sh sanityN.sh +noinst_SCRIPTS += performance-sanity.sh mdsrate-create-small.sh +noinst_SCRIPTS += mdsrate-create-large.sh mdsrate-lookup-1dir.sh +noinst_SCRIPTS += mdsrate-stat-small.sh mdsrate-stat-large.sh noinst_SCRIPTS += lockorder.sh socketclient socketserver runmultiop_bg_pause noinst_SCRIPTS += sanity-sec.sh sanity-gss.sh krb5_login.sh setup_kerberos.sh nobase_noinst_SCRIPTS = cfg/local.sh diff --git a/lustre/tests/acceptance-small.sh b/lustre/tests/acceptance-small.sh index a6391ea..d7955da 100755 --- a/lustre/tests/acceptance-small.sh +++ b/lustre/tests/acceptance-small.sh @@ -23,7 +23,7 @@ fi [ "$DEBUG_OFF" ] || DEBUG_OFF="eval lctl set_param debug=\"$DEBUG_LVL\"" [ "$DEBUG_ON" ] || DEBUG_ON="eval lctl set_param debug=0x33f0484" -export TESTSUITE_LIST="RUNTESTS SANITY DBENCH BONNIE IOZONE FSX SANITYN LFSCK LIBLUSTRE REPLAY_SINGLE CONF_SANITY RECOVERY_SMALL REPLAY_OST_SINGLE REPLAY_DUAL INSANITY SANITY_QUOTA SANITY_SEC SANITY_GSS" +export TESTSUITE_LIST="RUNTESTS SANITY DBENCH BONNIE IOZONE FSX SANITYN LFSCK LIBLUSTRE REPLAY_SINGLE CONF_SANITY RECOVERY_SMALL REPLAY_OST_SINGLE REPLAY_DUAL INSANITY SANITY_QUOTA SANITY_SEC SANITY_GSS PERFORMANCE_SANITY" if [ "$ACC_SM_ONLY" ]; then for O in $TESTSUITE_LIST; do @@ -377,6 +377,15 @@ if [ "$SANITY_GSS" != "no" ]; then SANITY_GSS="done" fi +[ "$SLOW" = no ] && PERFORMANCE_SANITY="no" +[ -x "$MDSRATE" ] || PERFORMANCE_SANITY="no" +which mpirun > /dev/null 2>&1 || PERFORMANCE_SANITY="no" +if [ "$PERFORMANCE_SANITY" != "no" ]; then + title performance-sanity + bash performance-sanity.sh + PERFORMANCE_SANITY="done" +fi + RC=$? title FINISHED echo "Finished at `date` in $((`date +%s` - $STARTTIME))s" diff --git a/lustre/tests/cfg/ncli.sh b/lustre/tests/cfg/ncli.sh index ce2a649..907775e 100644 --- a/lustre/tests/cfg/ncli.sh +++ b/lustre/tests/cfg/ncli.sh @@ -10,3 +10,8 @@ init_clients_lists error "tests for remote clients $RCLIENTS needs pdsh != do_dsh " || true [ -n "$FUNCTIONS" ] && . $FUNCTIONS || true + +MPIBIN=${MPIBIN:-/testsuite/tests/`arch`/bin} +export PATH=:$PATH:$MPIBIN +MPIRUN=$(which mpirun) + diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index d00733f..3b289e2 100644 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -96,6 +96,8 @@ init_test_env() { if ! echo $PATH | grep -q $LUSTRE/tests; then export PATH=$PATH:$LUSTRE/tests fi + export MDSRATE=${MDSRATE:-"$LUSTRE/tests/mdsrate"} + [ ! -f "$MDSRATE" ] && export MDSRATE=$(which mdsrate) export LCTL=${LCTL:-"$LUSTRE/utils/lctl"} [ ! -f "$LCTL" ] && export LCTL=$(which lctl) export LFS=${LFS:-"$LUSTRE/utils/lfs"} @@ -1844,6 +1846,22 @@ mixed_ost_devs () { [ ! "$OSTCOUNT" = "$osscount" ] } +generate_machine_file() { + local nodes=${1//,/ } + local machinefile=$2 + rm -f $machinefile || error "can't rm $machinefile" + for node in $nodes; do + echo $node >>$machinefile + done +} + +get_stripe () { + local file=$1/stripe + touch $file + $LFS getstripe -v $file || error + rm -f $file +} + check_runas_id_ret() { local myRC=0 local myRUNAS_ID=$1 @@ -1903,6 +1921,27 @@ multiop_bg_pause() { return 0 } +check_rate() { + local OP=$1 + local TARGET_RATE=$2 + local NUM_CLIENTS=$3 + local LOG=$4 + + local RATE=$(awk '/^Rate: [0-9\.]+ '"${OP}"'s\/sec/ { print $2}' ${LOG}) + + # We need to use bc since the rate is a floating point number + local RES=$(echo "${RATE} < ${TARGET_RATE}" | bc -l ) + if [ ${RES} -eq 0 ]; then + echo "Success: ${RATE} ${OP}s/sec met target rate" \ + "${TARGET_RATE} ${OP}s/sec for ${NUM_CLIENTS} client(s)." + return 0 + else + echo "Failure: ${RATE} ${OP}s/sec did not meet target rate" \ + "${TARGET_RATE} ${OP}s/sec for ${NUM_CLIENTS} client(s)." + return 1 + fi +} + # reset llite stat counters clear_llite_stats(){ lctl set_param -n llite.*.stats 0 -- 1.8.3.1