From: Andreas Dilger Date: Fri, 16 Dec 2011 02:24:57 +0000 (-0700) Subject: LU-506 tests: check lustre.conf for modprobe X-Git-Tag: 2.1.55~27 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=2353aa397a0380ee70c4c0ec202d2fccf1e447fe;p=fs%2Flustre-release.git LU-506 tests: check lustre.conf for modprobe The newer userspace modprobe requires that the /etc/modprobe.d/ files end in ".conf", so that there is no confusion between config files that are supposed to be parsed, and files that are left after editing (e.g. lustre.conf.orig or lustre.conf~). Add a check for /etc/modprobe.d/lustre.conf to get lnet module parameters during testing. Signed-off-by: Andreas Dilger Change-Id: Ie408f5334b2570f13e225038488df06ff7b524c4 Reviewed-on: http://review.whamcloud.com/1877 Tested-by: Hudson Reviewed-by: Brian J. Murrell Reviewed-by: Yu Jian Tested-by: Maloo Reviewed-by: Oleg Drokin --- diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index 4b2cd84..0016a50 100644 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -37,8 +37,13 @@ if [ -f "$EXCEPT_LIST_FILE" ]; then . $EXCEPT_LIST_FILE fi -[ -z "$MODPROBECONF" -a -f /etc/modprobe.conf ] && MODPROBECONF=/etc/modprobe.conf -[ -z "$MODPROBECONF" -a -f /etc/modprobe.d/Lustre ] && MODPROBECONF=/etc/modprobe.d/Lustre +# 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="" @@ -607,12 +612,12 @@ 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 \ - \\\"$PTLDEBUG\\\" \\\"$SUBSYSTEM\\\" $DEBUG_SIZE || true + \\\"$PTLDEBUG\\\" \\\"$SUBSYSTEM\\\" $DEBUG_SIZE || true } set_default_debug_facet () {