- local rrc=0
- local rc=0
- local clients=${CLIENTS:-$(hostname)}
-
- check_progs_installed $clients $racer || \
- { skip_env "$racer not found" && return 0; }
-
- local rpids=""
- for rdir in $RDIRS; do
- do_nodes $clients "DURATION=$DURATION $racer $rdir $NUM_RACER_THREADS" &
- pid=$!
- rpids="$rpids $pid"
- done
-
- echo racers pids: $rpids
- for pid in $rpids; do
- wait $pid
- rc=$?
- echo "pid=$pid rc=$rc"
- if [ $rc != 0 ]; then
- rrc=$((rrc + 1))
- fi
- done
-
- return $rrc
+ local rrc=0
+ local rc=0
+ local clients=$CLIENTS
+ local RDIRS
+ local i
+
+ for d in ${RACERDIRS}; do
+ is_mounted $d || continue
+
+ RDIRS="$RDIRS $d/racer"
+ mkdir -p $d/racer
+ # lfs setstripe $d/racer -c -1
+ if [ $MDSCOUNT -ge 2 ]; then
+ for i in $(seq $((MDSCOUNT - 1))); do
+ RDIRS="$RDIRS $d/racer$i"
+ if [ ! -e $d/racer$i ]; then
+ $LFS mkdir -i $i $d/racer$i ||
+ error "lfs mkdir $i failed"
+ fi
+ done
+ fi
+ done
+
+ local rpids=""
+ for rdir in $RDIRS; do
+ do_nodes $clients "DURATION=$DURATION \
+ MDSCOUNT=$MDSCOUNT OSTCOUNT=$OSTCOUNT\
+ RACER_ENABLE_REMOTE_DIRS=$RACER_ENABLE_REMOTE_DIRS \
+ RACER_ENABLE_STRIPED_DIRS=$RACER_ENABLE_STRIPED_DIRS \
+ RACER_ENABLE_MIGRATION=$RACER_ENABLE_MIGRATION \
+ RACER_ENABLE_PFL=$RACER_ENABLE_PFL \
+ RACER_ENABLE_DOM=$RACER_ENABLE_DOM \
+ RACER_ENABLE_FLR=$RACER_ENABLE_FLR \
+ LFS=$LFS \
+ LCTL=$LCTL \
+ $racer $rdir $NUM_RACER_THREADS" &
+ pid=$!
+ rpids="$rpids $pid"
+ done
+
+ local lss_pids=""
+ if $RACER_ENABLE_SNAPSHOT; then
+ lss_gen_conf
+
+ $LUSTRE/tests/racer/lss_create.sh &
+ pid=$!
+ lss_pids="$lss_pids $pid"
+
+ $LUSTRE/tests/racer/lss_destroy.sh &
+ pid=$!
+ lss_pids="$lss_pids $pid"
+ fi
+
+ echo racers pids: $rpids
+ for pid in $rpids; do
+ wait $pid
+ rc=$?
+ echo "pid=$pid rc=$rc"
+ if [ $rc != 0 ]; then
+ rrc=$((rrc + 1))
+ fi
+ done
+
+ if $RACER_ENABLE_SNAPSHOT; then
+ killall -q lss_create.sh
+ killall -q lss_destroy.sh
+
+ for pid in $lss_pids; do
+ wait $pid
+ done
+
+ lss_cleanup
+ fi
+
+ return $rrc