From: Iurii Golovach Date: Tue, 20 Mar 2012 00:53:27 +0000 (-0700) Subject: LU-1062 tests: incorrect path to configuration file X-Git-Tag: v1_8_7_81_WC1~5 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=6d054f7b0457199e27cb98b99da12b65e8625e35;p=fs%2Flustre-release.git LU-1062 tests: incorrect path to configuration file this is a bit modified port of the http://review.whamcloud.com/#change,1877 (author Andreas Dilger) Xyratex-bug-id: MRP-480 Reviewed-by: Sergey Glushchenko Reviewed-by: Andriy Skulysh Signed-off-by: Iurii Golovach Change-Id: I10b42de2c2d453e23142c01290742153dff7262a Reviewed-on: http://review.whamcloud.com/2419 Tested-by: Hudson Tested-by: Maloo Reviewed-by: Johann Lombardi --- diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index 6de0445..25f1ee4 100644 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -29,6 +29,14 @@ if [ -f "$EXCEPT_LIST_FILE" ]; then . $EXCEPT_LIST_FILE fi +# check config files for options in decreasing order of preference +[ -z "$MODPROBECONF" -a -f /etc/modprobe.d/lustre.conf ] && + MODPROBECONF=/etc/modprobe.d/lustre.conf +[ -z "$MODPROBECONF" -a -f /etc/modprobe.d/Lustre ] && + MODPROBECONF=/etc/modprobe.d/Lustre +[ -z "$MODPROBECONF" -a -f /etc/modprobe.conf ] && + MODPROBECONF=/etc/modprobe.conf + assert_DIR () { local failed="" [[ $DIR/ = $MOUNT/* ]] || \ @@ -306,9 +314,6 @@ load_modules_local() { load_module ../lnet/libcfs/libcfs [ "$PTLDEBUG" ] && lctl set_param debug="$PTLDEBUG" [ "$SUBSYSTEM" ] && lctl set_param subsystem_debug="${SUBSYSTEM# }" - local MODPROBECONF= - [ -f /etc/modprobe.conf ] && MODPROBECONF=/etc/modprobe.conf - [ ! "$MODPROBECONF" -a -d /etc/modprobe.d ] && MODPROBECONF=/etc/modprobe.d/Lustre [ -z "$LNETOPTS" -a "$MODPROBECONF" ] && \ LNETOPTS=$(awk '/^options lnet/ { print $0}' $MODPROBECONF | sed 's/^options lnet //g') echo $LNETOPTS | grep -q "accept=all" || LNETOPTS="$LNETOPTS accept=all"; @@ -429,8 +434,8 @@ set_default_debug_nodes () { local nodes=$1 if [[ ,$nodes, = *,$HOSTNAME,* ]]; then - nodes=$(exclude_items_from_list "$nodes" "$HOSTNAME") - set_default_debug + nodes=$(exclude_items_from_list "$nodes" "$HOSTNAME") + set_default_debug fi [[ -n $nodes ]] && do_rpc_nodes $nodes set_default_debug \