From 2353aa397a0380ee70c4c0ec202d2fccf1e447fe Mon Sep 17 00:00:00 2001 From: Andreas Dilger Date: Thu, 15 Dec 2011 19:24:57 -0700 Subject: [PATCH] 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 --- lustre/tests/test-framework.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) 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 () { -- 1.8.3.1