[LU-4066] init_test_env misuses `dirname $0` to locate server modules Created: 04/Oct/13  Updated: 28/Oct/13  Resolved: 28/Oct/13

Status: Closed
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.5.0
Fix Version/s: Lustre 2.6.0

Type: Bug Priority: Minor
Reporter: John Hammond Assignee: John Hammond
Resolution: Fixed Votes: 0
Labels: test

Severity: 3
Rank (Obsolete): 10897

 Description   

In init_test_env we have the following code to locate server modules:

    if [ ! -f /lib/modules/$(uname -r)/kernel/fs/lustre/mdt.ko -a \
        ! -f /lib/modules/$(uname -r)/updates/kernel/fs/lustre/mdt.ko -a \
        ! -f `dirname $0`/../mdt/mdt.ko ]; then
        export CLIENTMODSONLY=yes
    fi

When running from a build directory (with modules not installed in /lib/modules/...) this is broken when init_test_env is called by rpc.sh through do_rpc_nodes:

do_rpc_nodes () {
        local list=$1
        shift

        [ -z "$list" ] && return 0

        # Add paths to lustre tests for 32 and 64 bit systems.                                                 
	local LIBPATH="/usr/lib/lustre/tests:/usr/lib64/lustre/tests:"
        local TESTPATH="$RLUSTRE/tests:"
        local RPATH="PATH=${TESTPATH}${LIBPATH}${PATH}:/sbin:/bin:/usr/sbin:"
        do_nodesv $list "${RPATH} NAME=${NAME} sh rpc.sh $@ "
}

No matter where rpc.sh is found, when it executes it will have $0 set to 'rpc.sh' and not to the full path.

So `dirname $0`/../mdt/mdt.ko should be replaced with $LUSTRE/mdt/mdt.ko.

I also see that CONFIG is not propagated to rpc.sh.



 Comments   
Comment by John Hammond [ 04/Oct/13 ]

Please see http://review.whamcloud.com/7854.

Comment by John Hammond [ 28/Oct/13 ]

Patch landed to master.

Generated at Sat Feb 10 01:39:21 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.