- pre="$LST add_test --batch b --loop $lst_LOOP "
- for t in "brw read" "brw write" ; do
- for s in $lst_SIZES; do
- for c in $lst_CONCR; do
- for d in "${nc}:${ns} --from c --to s" "${ns}:${nc} --from s --to c"; do
- echo -n "$pre"
- echo " --concurrency $c --distribute $d $t check=full size=$s"
- done
- done
- done
- done
-
- for c in $lst_CONCR; do
- for d in "${nc}:${ns} --from c --to s" "${ns}:${nc} --from s --to c"; do
- echo -n "$pre"
- echo " --concurrency $c --distribute $d ping "
- done
- done
+ declare -a tests
+
+ case $lst_FROM in
+ c) tests[0]="${nc}:${ns} --from c --to s";;
+ s) tests[0]="${ns}:${nc} --from s --to c";;
+ cs)tests[0]="${nc}:${ns} --from c --to s"
+ tests[1]="${ns}:${nc} --from s --to c";;
+ *) error Unknown flag $lst_FROM;;
+ esac
+
+ pre="$LST add_test --batch b --loop $lst_LOOP "
+ for t in $lst_TESTS; do
+ for s in $lst_SIZES; do
+ for c in $lst_CONCR; do
+ for ((i=0; i<${#tests[@]}; i++)); do
+ echo -n "$pre --concurrency $c"\
+ " --distribute ${tests[i]} "
+ case $t in
+ read|write)
+ echo -n "brw $t" \
+ " $check size=$s";;
+ ping)
+ echo -n $t;;
+ *) error Unknonwn LST test;;
+ esac
+ echo
+ done
+ done
+ done
+ done