Whamcloud - gitweb
LU-1607 tests: allow MODOPTS_LIBCFS module params
authorAndreas Dilger <adilger@whamcloud.com>
Sat, 15 Sep 2012 02:53:18 +0000 (20:53 -0600)
committerOleg Drokin <green@whamcloud.com>
Sat, 6 Oct 2012 22:17:28 +0000 (18:17 -0400)
The changes made for forcing non-default CPT partition counts in
commit 95d67b28076f7938a6c962a5256e9b581a439f71 now prevents
overriding libcfs module options using MODOPTS_LIBCFS, because
there is always the cpu_npartitions parameter specified at module
loading time that overrides the environment variable.

Instead add the cpu_npartitions=2 argument to the environment
variable instead of making it a parameter.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I94bf500164dc23e81080bd2675646b5fa7500c1e
Reviewed-on: http://review.whamcloud.com/3999
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/test-framework.sh

index 33f7765..fa3dadb 100644 (file)
@@ -463,7 +463,6 @@ load_modules_local() {
                fi
        fi
 
-       local ncpts=0
        # if there is only one CPU core, libcfs can only create one partition
        # if there is more than 4 CPU cores, libcfs should create multiple CPU
        # partitions. So we just force libcfs to create 2 partitions for
@@ -471,12 +470,12 @@ load_modules_local() {
        if [ $ncpus -le 4 ] && [ $ncpus -gt 1 ]; then
                # force to enable multiple CPU partitions
                echo "Force libcfs to create 2 CPU partitions"
-               ncpts=2
+               MODOPTS_LIBCFS="cpu_npartitions=2 $MODOPTS_LIBCFS"
        else
                echo "libcfs will create CPU partition based on online CPUs"
        fi
 
-       load_module ../libcfs/libcfs/libcfs cpu_npartitions=$ncpts
+       load_module ../libcfs/libcfs/libcfs
 
     [ "$PTLDEBUG" ] && lctl set_param debug="$PTLDEBUG"
     [ "$SUBSYSTEM" ] && lctl set_param subsystem_debug="${SUBSYSTEM# }"