Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test suite fails in source-sh when modules are built with a non-default man directory #549

Open
mrc0mmand opened this issue Oct 2, 2024 · 1 comment
Labels
Milestone

Comments

@mrc0mmand
Copy link

mrc0mmand commented Oct 2, 2024

Describe the bug

Hey!

When running the full test suite on both C10S and Fedora Rawhide I noticed it currently fails, since it's built there with --mandir=/usr/share/man, which seems to break the source-sh test case.

To Reproduce

# dnf builddep -y environment-modules
# dnf install -y autoreconf git
# git clone https://github.com/cea-hpc/modules
# cd modules
# ./configure --mandir=/usr/share/man
# make -j $(nproc)
# make test

Expected behavior

All tests should pass.

Error and debugging information

...
# make test
...
Running /root/modules/testsuite/modules.50-cmds/400-source-sh.exp ...
FAIL: load source-sh/1 (sh)
OUT[562]: 'PATH=/usr/local/Modules/bin:/root/.local/bin:/root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin; export PATH;
_LMFILES_=/root/modules/testsuite/modulefiles.2/source-sh/1; export _LMFILES_;
LOADEDMODULES=source-sh/1; export LOADEDMODULES;
testsuite=yes; export testsuite;
MODULES_COLLECTION_TARGET=bar; export MODULES_COLLECTION_TARGET;
__MODULES_LMSOURCESH=source-sh/1\&bash\ testsuite/example/sh-to-mod.sh\|prepend-path\ PATH\ /usr/local/Modules/bin\|setenv\ MODULES_COLLECTION_TARGET\ bar\|setenv\ testsuite\ yes; export __MODULES_LMSOURCESH;
test 0;
'#>
EXP[677]: 'PATH=/usr/local/Modules/bin:/root/.local/bin:/root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin; export PATH;
MANPATH=/usr/share/man:/usr/share/man:/usr/local/share/man; export MANPATH;
_LMFILES_=/root/modules/testsuite/modulefiles.2/source-sh/1; export _LMFILES_;
LOADEDMODULES=source-sh/1; export LOADEDMODULES;
testsuite=yes; export testsuite;
MODULES_COLLECTION_TARGET=bar; export MODULES_COLLECTION_TARGET;
__MODULES_LMSOURCESH=source-sh/1\&bash\ testsuite/example/sh-to-mod.sh\|prepend-path\ MANPATH\ /usr/share/man\|prepend-path\ PATH\ /usr/local/Modules/bin\|setenv\ MODULES_COLLECTION_TARGET\ bar\|setenv\ testsuite\ yes; export __MODULES_LMSOURCESH;
test 0;
'#>
FAIL: display source-sh/1 (sh)
ERR[315]: '-------------------------------------------------------------------
/root/modules/testsuite/modulefiles.2/source-sh/1:

prepend-path    PATH /usr/local/Modules/bin
setenv          MODULES_COLLECTION_TARGET bar
setenv          testsuite yes
module-whatis   source-sh/1
-------------------------------------------------------------------
'#>
EXP[351]: '-------------------------------------------------------------------
/root/modules/testsuite/modulefiles.2/source-sh/1:

prepend-path    MANPATH /usr/share/man
prepend-path    PATH /usr/local/Modules/bin
setenv          MODULES_COLLECTION_TARGET bar
setenv          testsuite yes
module-whatis   source-sh/1
-------------------------------------------------------------------
'#>
FAIL: load source-sh/1 (sh)
OUT[505]: 'PATH=/usr/local/Modules/bin:/root/.local/bin:/root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin; export PATH;
_LMFILES_=/root/modules/testsuite/modulefiles.2/source-sh/1; export _LMFILES_;
LOADEDMODULES=source-sh/1; export LOADEDMODULES;
MODULES_COLLECTION_TARGET=bar; export MODULES_COLLECTION_TARGET;
__MODULES_LMSOURCESH=source-sh/1\&bash\ testsuite/example/sh-to-mod.sh\|prepend-path\ PATH\ /usr/local/Modules/bin\|setenv\ MODULES_COLLECTION_TARGET\ bar; export __MODULES_LMSOURCESH;
test 0;
'#>
EXP[620]: 'PATH=/usr/local/Modules/bin:/root/.local/bin:/root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin; export PATH;
MANPATH=/usr/share/man:/usr/share/man:/usr/local/share/man; export MANPATH;
_LMFILES_=/root/modules/testsuite/modulefiles.2/source-sh/1; export _LMFILES_;
LOADEDMODULES=source-sh/1; export LOADEDMODULES;
MODULES_COLLECTION_TARGET=bar; export MODULES_COLLECTION_TARGET;
__MODULES_LMSOURCESH=source-sh/1\&bash\ testsuite/example/sh-to-mod.sh\|prepend-path\ MANPATH\ /usr/share/man\|prepend-path\ PATH\ /usr/local/Modules/bin\|setenv\ MODULES_COLLECTION_TARGET\ bar; export __MODULES_LMSOURCESH;
test 0;
'#>
FAIL: load source-sh/1 (sh)
OUT[563]: 'PATH=/usr/local/Modules/bin:/root/.local/bin:/root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin; export PATH;
_LMFILES_=/root/modules/testsuite/modulefiles/setenv/1.0:/root/modules/testsuite/modulefiles.2/source-sh/1; export _LMFILES_;
LOADEDMODULES=setenv/1.0:source-sh/1; export LOADEDMODULES;
MODULES_COLLECTION_TARGET=bar; export MODULES_COLLECTION_TARGET;
__MODULES_LMSOURCESH=source-sh/1\&bash\ testsuite/example/sh-to-mod.sh\|prepend-path\ PATH\ /usr/local/Modules/bin\|setenv\ MODULES_COLLECTION_TARGET\ bar; export __MODULES_LMSOURCESH;
test 0;
'#>
EXP[678]: 'PATH=/usr/local/Modules/bin:/root/.local/bin:/root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin; export PATH;
MANPATH=/usr/share/man:/usr/share/man:/usr/local/share/man; export MANPATH;
_LMFILES_=/root/modules/testsuite/modulefiles/setenv/1.0:/root/modules/testsuite/modulefiles.2/source-sh/1; export _LMFILES_;
LOADEDMODULES=setenv/1.0:source-sh/1; export LOADEDMODULES;
MODULES_COLLECTION_TARGET=bar; export MODULES_COLLECTION_TARGET;
__MODULES_LMSOURCESH=source-sh/1\&bash\ testsuite/example/sh-to-mod.sh\|prepend-path\ MANPATH\ /usr/share/man\|prepend-path\ PATH\ /usr/local/Modules/bin\|setenv\ MODULES_COLLECTION_TARGET\ bar; export __MODULES_LMSOURCESH;
test 0;
'#>
FAIL: unload source-sh/1 (sh)
OUT[266]: 'PATH=/root/.local/bin:/root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin; export PATH;
MANPATH=/usr/local/share/man; export MANPATH;
unset _LMFILES_;
unset LOADEDMODULES;
unset testsuite;
unset MODULES_COLLECTION_TARGET;
unset __MODULES_LMSOURCESH;
test 0;
'#>
EXP[281]: 'PATH=/root/.local/bin:/root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin; export PATH;
MANPATH=/usr/share/man:/usr/local/share/man; export MANPATH;
unset _LMFILES_;
unset LOADEDMODULES;
unset testsuite;
unset MODULES_COLLECTION_TARGET;
unset __MODULES_LMSOURCESH;
test 0;
'#>
        Unset temp variables: ans default_path msgtcl extraans mpre mp extratserr updatedpath tserr_path tserr_disp1 tserr_disp2 tserr_disp3 tserr_disp4 default_manpath updatedmanpath tserr_disp71 lmsourceshpath tserr bindirenc mandirenc
        Restore test variable initial values: testdir
        Unset MANPATH
        Unset TESTSUITE_SHTOMOD_NOCOMP
        Unset MODULES_CMD
        Setup MODULEPATH = '/root/modules/testsuite/modulefiles'
        Unset TESTSUITE_SHTOMOD_NOALIAS
        Unset TESTSUITE_SOURCESH_ESCCHAR
        Unset TESTSUITE_SHTOMOD_NOPATH
        Unset MODULES_SET_SHELL_STARTUP
        Unset TESTSUITE_SHTOMOD_NOCD
        Unset TESTSUITE_SHTOMOD_NOVAR
        Unset TESTSUITE_SHTOMOD_NOFUNC
...
                === modules Summary ===

# of expected passes            20651
# of unexpected failures        5
make: *** [Makefile:934: test] Error 1

Modules version and configuration

Latest git main (d223410 ATTOW)

Additional context

@mrc0mmand mrc0mmand added the bug label Oct 2, 2024
@xdelaruelle
Copy link
Member

Many thanks for your report, I will fix these tests to cope with the configuration setup you describe.

@xdelaruelle xdelaruelle added this to the 5.5.0 milestone Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants