Whamcloud - gitweb
LU-16804 tests: load CONFIG at beginning of init_test_env 14/50914/4
authorSebastien Buisson <sbuisson@ddn.com>
Wed, 10 May 2023 12:13:54 +0000 (14:13 +0200)
committerOleg Drokin <green@whamcloud.com>
Wed, 31 May 2023 19:11:01 +0000 (19:11 +0000)
In order to have all environment variables properly loaded, make
CONFIG loaded at the beginning of init_test_env().

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I1c3caa3d582c4b317ff3d0d10fc0103e046ddf17
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50914
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Sarah Liu <sarah@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/test-framework.sh

index ceefa3f..1f92dc2 100755 (executable)
@@ -187,6 +187,9 @@ init_test_env() {
        export KEEP_ZPOOL=${KEEP_ZPOOL:-false}
        export CLEANUP_DM_DEV=false
        export PAGE_SIZE=$(get_page_size client)
+       export NAME=${NAME:-local}
+
+       . ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
 
        export MKE2FS=$MKE2FS
        if [ -z "$MKE2FS" ]; then
@@ -349,7 +352,6 @@ init_test_env() {
        [ ! -f "$LSOM_SYNC" ] &&
                export LSOM_SYNC=$(which llsom_sync 2> /dev/null)
        [ -z "$LSOM_SYNC" ] && export LSOM_SYNC="/usr/sbin/llsom_sync"
-       export NAME=${NAME:-local}
        export LGSSD=${LGSSD:-"$LUSTRE/utils/gss/lgssd"}
        [ "$GSS_PIPEFS" = "true" ] && [ ! -f "$LGSSD" ] &&
                export LGSSD=$(which lgssd)
@@ -447,7 +449,6 @@ init_test_env() {
 
        export BLCKSIZE=${BLCKSIZE:-4096}
        export MACHINEFILE=${MACHINEFILE:-$TMP/$(basename $0 .sh).machines}
-       . ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
        get_lustre_env
 
        # use localrecov to enable recovery for local clients, LU-12722