X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Ftests%2Ffunctions.sh;h=84916b0e0b903aa43d3462068db79c7e6e4e2c7c;hb=5245b94a4aed1c4dcfa8b394acf916ea7accf138;hp=0bc4fa0e279482a5e86176c2830dfbe2c40a2a1d;hpb=2ed2a85fdccfd4e82be5f586e79fa943f938f65b;p=fs%2Flustre-release.git diff --git a/lustre/tests/functions.sh b/lustre/tests/functions.sh index 0bc4fa0..84916b0 100644 --- a/lustre/tests/functions.sh +++ b/lustre/tests/functions.sh @@ -194,11 +194,16 @@ mpi_run () { } nids_list () { - local list - for i in ${1//,/ }; do - list="$list $i@$NETTYPE" - done - echo $list + local list + local escape="$2" + for i in ${1//,/ }; do + if [ "$list" = "" ]; then + list="$i@$NETTYPE" + else + list="$list$escape $i@$NETTYPE" + fi + done + echo $list } # FIXME: all setup/cleanup can be done without rpc.sh @@ -284,6 +289,8 @@ run_compilebench() { # compile dir kernel-0 ~1GB # required space ~1GB * cbench_IDIRS + local dir=${1:-$DIR} + cbench_DIR=${cbench_DIR:-""} cbench_IDIRS=${cbench_IDIRS:-2} cbench_RUNS=${cbench_RUNS:-2} @@ -296,7 +303,7 @@ run_compilebench() { [ -e $cbench_DIR/compilebench ] || \ { skip_env "No compilebench build" && return; } - local space=$(df -P $DIR | tail -n 1 | awk '{ print $4 }') + local space=$(df -P $dir | tail -n 1 | awk '{ print $4 }') if [[ $space -le $((1024 * 1024 * cbench_IDIRS)) ]]; then cbench_IDIRS=$((space / 1024 / 1024)) [[ $cbench_IDIRS -eq 0 ]] && @@ -310,7 +317,7 @@ run_compilebench() { # t-f _base needs to be modifyed to set properly tdir # for new "test_foo" functions names # local testdir=$DIR/$tdir - local testdir=$DIR/d0.compilebench + local testdir=$dir/d0.compilebench mkdir -p $testdir local savePWD=$PWD @@ -335,6 +342,7 @@ run_metabench() { mbench_NFILES=${mbench_NFILES:-30400} # threads per client mbench_THREADS=${mbench_THREADS:-4} + mbench_OPTIONS=${mbench_OPTIONS:-} [ x$METABENCH = x ] && { skip_env "metabench not found" && return; } @@ -353,7 +361,7 @@ run_metabench() { # -S Run the file stat tests. # -c nfile Number of files to be used in each test. # -k Cleanup. Remove the test directories. - local cmd="$METABENCH -w $testdir -c $mbench_NFILES -C -S -k" + local cmd="$METABENCH -w $testdir -c $mbench_NFILES -C -S -k $mbench_OPTIONS" echo "+ $cmd" # find out if we need to use srun by checking $SRUN_PARTITION @@ -586,11 +594,13 @@ run_ior() { # -t N transferSize -- size of transfer in bytes (e.g.: 8, 4k, 2m, 1g)" # -w writeFile -- write file" # -r readFile -- read existing file" + # -W checkWrite -- check read after write" + # -C reorderTasks -- changes task ordering to n+1 ordering for readback # -T maxTimeDuration -- max time in minutes to run tests" # -k keepFile -- keep testFile(s) on program exit local cmd="$IOR -a $ior_type -b ${ior_blockSize}g -o $testdir/iorData \ - -t $ior_xferSize -v -w -r -i $ior_iteration -T $ior_DURATION -k" + -t $ior_xferSize -v -C -w -r -W -i $ior_iteration -T $ior_DURATION -k" [ $type = "fpp" ] && cmd="$cmd -F" echo "+ $cmd" @@ -809,9 +819,6 @@ run_parallel_grouplock() { # mpi_run uses mpiuser chmod 0777 $testdir - do_nodes $clients "lctl set_param llite.*.max_rw_chunk=0" || - error "set_param max_rw_chunk=0 failed " - local cmd local status=0 local subtest @@ -908,7 +915,7 @@ run_statahead () { local num_mntpts=$statahead_NUMMNTPTS local mntpt_root=$TMP/mntpt/lustre - local mntopts=${MNTOPTSTATAHEAD:-$MOUNTOPT} + local mntopts=$MNTOPTSTATAHEAD echo "Mounting $num_mntpts lustre clients starts on $clients" trap "cleanup_statahead $clients $mntpt_root $num_mntpts" EXIT ERR