This patch fixes "error" issues reported by shellcheck
for *.sh files. This patch also moves spaces to tabs.
Test-Parameters: trivial
Test-Parameters: testlist=sanity-scrub,sanity-dom
Test-Parameters: testlist=large-scale
Test-Parameters: testlist=lnet-selftest
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: I4d129f26493bc17ee6d5988ae234dace149dfdd3
Reviewed-on: https://review.whamcloud.com/46814
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Nunez <jnunez@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
LUSTRE=${LUSTRE:-$(dirname $0)/..}
. $LUSTRE/tests/test-framework.sh
LUSTRE=${LUSTRE:-$(dirname $0)/..}
. $LUSTRE/tests/test-framework.sh
init_logging
ALWAYS_EXCEPT="$LARGE_SCALE_EXCEPT "
init_logging
ALWAYS_EXCEPT="$LARGE_SCALE_EXCEPT "
chmod 0777 $dir
while [ $num -le $CLIENTCOUNT ]; do
chmod 0777 $dir
while [ $num -le $CLIENTCOUNT ]; do
- list=$(comma_list ${nodes[@]:0:$num})
+ list=$(comma_list "${nodes[@]:0:$num}")
generate_machine_file $list $MACHINEFILE ||
error "can not generate machinefile"
generate_machine_file $list $MACHINEFILE ||
error "can not generate machinefile"
LUSTRE=${LUSTRE:-$(dirname $0)/..}
. $LUSTRE/tests/test-framework.sh
LUSTRE=${LUSTRE:-$(dirname $0)/..}
. $LUSTRE/tests/test-framework.sh
init_logging
ALWAYS_EXCEPT="$LNET_SELFTEST_EXCEPT"
init_logging
ALWAYS_EXCEPT="$LNET_SELFTEST_EXCEPT"
lst_CONCR=${lst_CONCR:-"1 2 4 8"}
lst_SIZES=${lst_SIZES:-"4k 8k 256k 1M"}
if [ "$SLOW" = no ]; then
lst_CONCR=${lst_CONCR:-"1 2 4 8"}
lst_SIZES=${lst_SIZES:-"4k 8k 256k 1M"}
if [ "$SLOW" = no ]; then
- lst_CONCR="1 8"
- lst_SIZES="4k 1M"
- lst_LOOP=1000
+ lst_CONCR="1 8"
+ lst_SIZES="4k 1M"
+ lst_LOOP=1000
fi
smoke_DURATION=${smoke_DURATION:-1800}
if [ "$SLOW" = no ]; then
fi
smoke_DURATION=${smoke_DURATION:-1800}
if [ "$SLOW" = no ]; then
- [ $smoke_DURATION -le 300 ] || smoke_DURATION=300
+ [ $smoke_DURATION -le 300 ] || smoke_DURATION=300
fi
lst_TESTS=${lst_TESTS:-"write read ping"}
fi
lst_TESTS=${lst_TESTS:-"write read ping"}
- # Workaround for bug 15619
- lst_cleanup_all
- lst_setup_all
+ # Workaround for bug 15619
+ lst_cleanup_all
+ lst_setup_all
LUSTRE=${LUSTRE:-$(dirname $0)/..}
. $LUSTRE/tests/test-framework.sh
LUSTRE=${LUSTRE:-$(dirname $0)/..}
. $LUSTRE/tests/test-framework.sh
MOUNT=${MOUNT:-$1}
MOUNT=${MOUNT:-/mnt/lustre}
MOUNT=${MOUNT:-$1}
MOUNT=${MOUNT:-/mnt/lustre}
-RECORDSOUT=$((`grep "records out" $LOG | cut -d+ -f 1` + \
+RECORDSOUT=$((`grep "records out" $LOG | cut -d+ -f 1` +
`grep "records out" $LOG2 | cut -d+ -f 1`))
FILESIZE=$((`ls -l $OOS | awk '{print $5}'` + `ls -l $OOS2 | awk '{print $5}'`))
if [ "$RECORDSOUT" -ne $(($FILESIZE / 1024)) ]; then
`grep "records out" $LOG2 | cut -d+ -f 1`))
FILESIZE=$((`ls -l $OOS | awk '{print $5}'` + `ls -l $OOS2 | awk '{print $5}'`))
if [ "$RECORDSOUT" -ne $(($FILESIZE / 1024)) ]; then
- echo "ERROR: blocks written by dd not equal to the size of file"
- SUCCESS=0
+ echo "ERROR: blocks written by dd not equal to the size of file"
+ SUCCESS=0
LUSTRE=${LUSTRE:-$(dirname $0)/..}
. $LUSTRE/tests/test-framework.sh
LUSTRE=${LUSTRE:-$(dirname $0)/..}
. $LUSTRE/tests/test-framework.sh
init_logging
build_test_filter
init_logging
build_test_filter
for target in $FAIL_TARGETS; do
victims=(${victims[@]} $(get_facets $target))
done
for target in $FAIL_TARGETS; do
victims=(${victims[@]} $(get_facets $target))
done
- echo Victim facets ${victims[@]}
+ echo Victim facets "${victims[@]}"
fi
if ((MDSCOUNT > 1)); then
fi
if ((MDSCOUNT > 1)); then
LUSTRE=${LUSTRE:-$(dirname $0)/..}
. $LUSTRE/tests/test-framework.sh
LUSTRE=${LUSTRE:-$(dirname $0)/..}
. $LUSTRE/tests/test-framework.sh
init_logging
ALWAYS_EXCEPT="$SANITY_SCRUB_EXCEPT"
init_logging
ALWAYS_EXCEPT="$SANITY_SCRUB_EXCEPT"
# use small MDS + OST size to speed formatting time
# do not use too small MDSSIZE/OSTSIZE, which affect the default journal size
# 400M MDT device can guarantee uninitialized groups during the OI scrub
# use small MDS + OST size to speed formatting time
# do not use too small MDSSIZE/OSTSIZE, which affect the default journal size
# 400M MDT device can guarantee uninitialized groups during the OI scrub
-[[ $MDSSIZE < 400000 || "$mds1_FSTYPE" == ldiskfs ]] && MDSSIZE=400000
-[[ $OSTSIZE < 400000 || "$ost1_FSTYPE" == ldiskfs ]] && OSTSIZE=400000
+[[ $MDSSIZE -lt 400000 || "$mds1_FSTYPE" == ldiskfs ]] && MDSSIZE=400000
+[[ $OSTSIZE -lt 400000 || "$ost1_FSTYPE" == ldiskfs ]] && OSTSIZE=400000
# no need too many OSTs, to reduce the format/start/stop overhead
[ $OSTCOUNT -gt 4 ] && OSTCOUNT=4
# no need too many OSTs, to reduce the format/start/stop overhead
[ $OSTCOUNT -gt 4 ] && OSTCOUNT=4
local PRE_FETCHED=1024
local TIME_DIFF=2
# MAX_MARGIN = 1.2 = 12 / 10
local PRE_FETCHED=1024
local TIME_DIFF=2
# MAX_MARGIN = 1.2 = 12 / 10
- local MAX_SPEED=$(((PRE_FETCHED + BASE_SPEED1 * \
+ local MAX_SPEED=$(((PRE_FETCHED + BASE_SPEED1 *
(RUN_TIME1 + TIME_DIFF)) / RUN_TIME1 * 12 / 10))
local n
for n in $(seq $MDSCOUNT); do
(RUN_TIME1 + TIME_DIFF)) / RUN_TIME1 * 12 / 10))
local n
for n in $(seq $MDSCOUNT); do
# 30% margin
local MARGIN=3
# 30% margin
local MARGIN=3
- local MIN_SPEED=$(((PRE_FETCHED + \
- BASE_SPEED1 * (RUN_TIME1 - TIME_DIFF) + \
- BASE_SPEED2 * (RUN_TIME2 - TIME_DIFF)) / \
+ local MIN_SPEED=$(((PRE_FETCHED +
+ BASE_SPEED1 * (RUN_TIME1 - TIME_DIFF) +
+ BASE_SPEED2 * (RUN_TIME2 - TIME_DIFF)) /
(RUN_TIME1 + RUN_TIME2) * (10 - MARGIN) / 10))
# MAX_MARGIN = 1.2 = 12 / 10
(RUN_TIME1 + RUN_TIME2) * (10 - MARGIN) / 10))
# MAX_MARGIN = 1.2 = 12 / 10
- MAX_SPEED=$(((PRE_FETCHED + \
- BASE_SPEED1 * (RUN_TIME1 + TIME_DIFF) + \
- BASE_SPEED2 * (RUN_TIME2 + TIME_DIFF)) / \
+ MAX_SPEED=$(((PRE_FETCHED +
+ BASE_SPEED1 * (RUN_TIME1 + TIME_DIFF) +
+ BASE_SPEED2 * (RUN_TIME2 + TIME_DIFF)) /
(RUN_TIME1 + RUN_TIME2) * (10 + MARGIN) / 10))
for n in $(seq $MDSCOUNT); do
SPEED=$(scrub_status $n | awk '/^average_speed/ { print $2 }')
(RUN_TIME1 + RUN_TIME2) * (10 + MARGIN) / 10))
for n in $(seq $MDSCOUNT); do
SPEED=$(scrub_status $n | awk '/^average_speed/ { print $2 }')