fi
export SHUTDOWN_ATTEMPTS=${SHUTDOWN_ATTEMPTS:-3}
+ export OSD_TRACK_DECLARES_LBUG=${OSD_TRACK_DECLARES_LBUG:-"yes"}
# command line
set_default_debug_nodes $(comma_list $(nodes_list))
fi
- if [ -n "$OSD_TRACK_DECLARES_LBUG" ] ; then
- do_nodes $(comma_list $(mdts_nodes) $(osts_nodes)) \
- "$LCTL set_param osd-*.track_declares_assert=1" \
- > /dev/null
+ if [ $(lower $OSD_TRACK_DECLARES_LBUG) == 'yes' ] ; then
+ local facets="$(get_facets OST),$(get_facets MDS),mgs"
+ local facet
+ local nodes
+ local node
+ for facet in ${facets//,/ }; do
+ if [ $(facet_fstype $node) == "ldiskfs" ] ; then
+ node=$(facet_host ${facet})
+ nodes="$nodes $node"
+ fi
+ done
+ if [ -n "$nodes" ] ; then
+ nodes=$(for i in $nodes; do echo $i; done | sort -u)
+ do_nodes $(comma_list $nodes) "$LCTL set_param \
+ osd-ldiskfs.track_declares_assert=1"
+ fi
fi
init_gss
##################################
error_noexit() {
- local TYPE=${TYPE:-"FAIL"}
+ local TYPE=${TYPE:-"FAIL"}
- local dump=true
- # do not dump logs if $1=false
- if [ "x$1" = "xfalse" ]; then
- shift
- dump=false
- fi
+ local dump=true
+ # do not dump logs if $1=false
+ if [ "x$1" = "xfalse" ]; then
+ shift
+ dump=false
+ fi
- log " ${TESTSUITE} ${TESTNAME}: @@@@@@ ${TYPE}: $@ "
- log_trace_dump
- mkdir -p $LOGDIR
- # We need to dump the logs on all nodes
- if $dump; then
- gather_logs $(comma_list $(nodes_list))
- fi
+ log " ${TESTSUITE} ${TESTNAME}: @@@@@@ ${TYPE}: $@ "
+ log_trace_dump
+
+ mkdir -p $LOGDIR
+ # We need to dump the logs on all nodes
+ if $dump; then
+ gather_logs $(comma_list $(nodes_list))
+ fi
debugrestore
[ "$TESTSUITELOG" ] &&
echo "$TESTSUITE: $TYPE: $TESTNAME $@" >> $TESTSUITELOG
- echo "$@" > $LOGDIR/err
+ if [ -z "$*" ]; then
+ echo "error() without useful message, please fix" > $LOGDIR/err
+ else
+ echo "$@" > $LOGDIR/err
+ fi
}
exit_status () {
}
error() {
- error_noexit "$@"
- exit 1
+ error_noexit "$@"
+ exit 1
}
error_exit() {
- error "$@"
+ error "$@"
}
# use only if we are ignoring failures for this test, bugno required.
# (like ALWAYS_EXCEPT, but run the test and ignore the results.)
# e.g. error_ignore 5494 "your message"
error_ignore() {
- local TYPE="IGNORE (bz$1)"
- shift
- error_noexit "$@"
+ local TYPE="IGNORE (bz$1)"
+ shift
+ error_noexit "$@"
}
error_and_remount() {
}
skip_env () {
- $FAIL_ON_SKIP_ENV && error false $@ || skip $@
+ $FAIL_ON_SKIP_ENV && error false $@ || skip $@
}
skip() {
}
get_stripe () {
- local file=$1/stripe
- touch $file
- $LFS getstripe -v $file || error
- rm -f $file
+ local file=$1/stripe
+
+ touch $file
+ $LFS getstripe -v $file || error "getstripe $file failed"
+ rm -f $file
}
setstripe_nfsserver () {