Whamcloud - gitweb
LU-13432 tests: test-framework to preserver MODOPTS_LIBCFS 73/38173/3
authorAlex Zhuravlev <bzzz@whamcloud.com>
Wed, 8 Apr 2020 08:24:08 +0000 (11:24 +0300)
committerOleg Drokin <green@whamcloud.com>
Thu, 14 May 2020 05:41:37 +0000 (05:41 +0000)
do not reset MODOPTS_LIBCFS at module loading so that
if some one passes extra option to a test that's preserved
over a whole run rather than reset that at the first module
reload.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I235d09dc7ed4084b95e7f85528b952b75b16744d
Reviewed-on: https://review.whamcloud.com/38173
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Nunez <jnunez@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/tests/test-framework.sh

index 0249c43..b18222c 100755 (executable)
@@ -700,6 +700,7 @@ load_modules_local() {
        # if there is more than 4 CPU cores, libcfs should create multiple CPU
        # partitions. So we just force libcfs to create 2 partitions for
        # system with 2 or 4 cores
+       local saved_opts="$MODOPTS_LIBCFS"
        if [ $ncpus -le 4 ] && [ $ncpus -gt 1 ]; then
                # force to enable multiple CPU partitions
                echo "Force libcfs to create 2 CPU partitions"
@@ -711,7 +712,7 @@ load_modules_local() {
        load_module ../libcfs/libcfs/libcfs
        # Prevent local MODOPTS_LIBCFS being passed as part of environment
        # variable to remote nodes
-       unset MODOPTS_LIBCFS
+       MODOPTS_LIBCFS=$saved_opts
 
        set_default_debug
        load_module ../lnet/lnet/lnet