3 LUSTRE=${LUSTRE:-$(cd $(dirname $0)/..; echo $PWD)}
4 . $LUSTRE/tests/test-framework.sh
6 . ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
10 ALWAYS_EXCEPT="$ALWAYS_EXCEPT $LNET_SELFTEST_EXCEPT"
12 [ x$LST = x ] && { skip_env "$0 : lst not found LST=$LST" && exit 0; }
14 # FIXME: what is the reasonable value here?
15 lst_LOOP=${lst_LOOP:-100000}
16 lst_CONCR=${lst_CONCR:-"1 2 4 8"}
17 lst_SIZES=${lst_SIZES:-"4k 8k 256k 1M"}
18 if [ "$SLOW" = no ]; then
24 smoke_DURATION=${smoke_DURATION:-1800}
25 if [ "$SLOW" = no ]; then
26 [ $smoke_DURATION -le 300 ] || smoke_DURATION=300
29 lst_SERVERS=${lst_SERVERS:-$(comma_list $(osts_nodes) $mds_HOST)}
30 lst_CLIENTS=${lst_CLIENTS:-${CLIENTS:-`hostname`}}
34 local mounted=$(mounted_lustre_filesystems)
35 echo $mounted' ' | grep -w -q $mntpt' '
39 lst_SERVERS=`hostname`
40 lst_CLIENTS=`hostname`
43 # FIXME: do we really need to unload lustre modules on all nodes?
44 # bug 19387, comment 9
45 # unloading lustre modules is not strictly necessary but unmounting
46 # /mnt/lustre before running lst would be useful:
47 # 1) because lustre messages clutter logs - we needn't them for testing LNET
48 # 2) it's theoretically possible that lst tests congest comm paths so tightly
49 # that mounted lustre wouldn't able to perform some of its background activities
50 if is_mounted $MOUNT || is_mounted $MOUNT2; then
51 local_mode && CLIENTONLY=yes
59 # Workaround for bug 15619
70 local nc=$(echo ${clients//,/ } | wc -w)
71 local ns=$(echo ${servers//,/ } | wc -w)
75 echo 'cleanup () { trap 0; echo killing $1 ... ; kill -9 $1 || true; }'
77 echo "$LST new_session --timeo 100000 hh"
78 echo "$LST add_group c $(nids_list $clients)"
79 echo "$LST add_group s $(nids_list $servers)"
80 echo "$LST add_batch b"
82 pre="$LST add_test --batch b --loop $lst_LOOP "
83 for t in "brw read" "brw write" ; do
84 for s in $lst_SIZES; do
85 for c in $lst_CONCR; do
86 for d in "${nc}:${ns} --from c --to s" "${ns}:${nc} --from s --to c"; do
88 echo " --concurrency $c --distribute $d $t check=full size=$s"
94 for c in $lst_CONCR; do
95 for d in "${nc}:${ns} --from c --to s" "${ns}:${nc} --from s --to c"; do
97 echo " --concurrency $c --distribute $d ping "
103 echo "$LST stat --delay 10 --timeout 10 c s &"
105 echo 'trap "cleanup $pid" INT TERM'
106 echo sleep $smoke_DURATION
113 export LST_SESSION=$$
124 if awk '/^Total.*nodes/ {print $2}' $log | grep -vq '^0$'; then
125 error 'lst Error found'
132 local servers=$lst_SERVERS
133 local clients=$lst_CLIENTS
135 local runlst=$TMP/smoke.sh
137 local log=$TMP/$tfile.log
140 test_smoke_sub $servers $clients 2>&1 > $runlst
144 run_lst $runlst | tee $log
146 [ $rc = 0 ] || error "$runlst failed: $rc"
148 lst_end_session --verbose | tee -a $log
150 # error counters in "lst show_error" should be checked
153 run_test smoke "lst regression test"
155 complete $(basename $0) $SECONDS
156 if [ "$RESTORE_MOUNT" = yes ]; then