Whamcloud - gitweb
LU-506 tests: check lustre.conf for modprobe
authorAndreas Dilger <adilger@whamcloud.com>
Fri, 16 Dec 2011 02:24:57 +0000 (19:24 -0700)
committerOleg Drokin <green@whamcloud.com>
Fri, 13 Jan 2012 16:29:25 +0000 (11:29 -0500)
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 <adilger@whamcloud.com>
Change-Id: Ie408f5334b2570f13e225038488df06ff7b524c4
Reviewed-on: http://review.whamcloud.com/1877
Tested-by: Hudson
Reviewed-by: Brian J. Murrell <brian@whamcloud.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/test-framework.sh

index 4b2cd84..0016a50 100644 (file)
@@ -37,8 +37,13 @@ if [ -f "$EXCEPT_LIST_FILE" ]; then
     . $EXCEPT_LIST_FILE
 fi
 
     . $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=""
 
 assert_DIR () {
     local failed=""
@@ -607,12 +612,12 @@ set_default_debug_nodes () {
     local nodes=$1
 
     if [[ ,$nodes, = *,$HOSTNAME,* ]]; then
     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 \
     fi
 
     [[ -n $nodes ]] && do_rpc_nodes $nodes set_default_debug \
-       \\\"$PTLDEBUG\\\" \\\"$SUBSYSTEM\\\" $DEBUG_SIZE || true
+        \\\"$PTLDEBUG\\\" \\\"$SUBSYSTEM\\\" $DEBUG_SIZE || true
 }
 
 set_default_debug_facet () {
 }
 
 set_default_debug_facet () {