From a9257f57ad27a1b1219cfd8ce29fbfabdca1df84 Mon Sep 17 00:00:00 2001 From: Andreas Dilger Date: Fri, 14 Sep 2012 20:53:18 -0600 Subject: [PATCH 1/1] LU-1607 tests: allow MODOPTS_LIBCFS module params 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 Change-Id: I94bf500164dc23e81080bd2675646b5fa7500c1e Reviewed-on: http://review.whamcloud.com/3999 Tested-by: Hudson Tested-by: Maloo Reviewed-by: Alex Zhuravlev Reviewed-by: Oleg Drokin --- lustre/tests/test-framework.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index 33f7765..fa3dadb 100644 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -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# }" -- 1.8.3.1