-
Notifications
You must be signed in to change notification settings - Fork 129
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 failures in recent versions of Lmod #543
Comments
I have fixed the LMOD_LD_PRELOAD issue with some filtering (via rt/common_func.sh) but the second issue is something special that is happening in your environment. Please using the "testing" branch from the github and retest. It should report the full text of what caused the Lua syntax error above. If you want to be sure to capture everything you can change line 26 in rt/sh_to_modulefile/sh_to_modulefile.tdesc to:
and send me the file: _stderr.orig and s.log and after re-running the tests from the rt/sh_to_modulefile/t1/*/ directory. Thanks for the bug report! |
If you had a chance to look at this issue, please let me know. |
Sorry, was busy at work and did not remember to look at this. Here's the stderr.log and s.log |
The problem is that the sandbox is adding a variable with an "@" in it. Something that I have not see before:
So I have modified Lmod to be able to deal with these unusual names. I have updated the "testing" branch. Please test this branch to see if it now passes the test under gentoo. If it fails, please send me the_stderr.orig and s.log like before. |
That's odd, I wonder why it uses an |
Looking at the stderr.txt file, it looks correct to me. Can I assume that all the tests pass? |
No, even though it seems to pass, I get an error for the test. Here is the diff. Let me know if anything else would be useful to see. # diff -u /tmp/portage/sys-cluster/lmod-9999/work/lmod-9999/rt/sh_to_modulefile/t1/2021_12_03_10_57_06-Linux-x86_64-sh_to_modulefile/_err.{left,right}
--- /tmp/portage/sys-cluster/lmod-9999/work/lmod-9999/rt/sh_to_modulefile/t1/2021_12_03_10_57_06-Linux-x86_64-sh_to_modulefile/_err.left 2021-12-03 10:57:58.958080388 +0100
+++ /tmp/portage/sys-cluster/lmod-9999/work/lmod-9999/rt/sh_to_modulefile/t1/2021_12_03_10_57_06-Linux-x86_64-sh_to_modulefile/_err.right 2021-12-03 10:57:58.958080388 +0100
@@ -6,8 +6,18 @@
by Robert McLay mclay@tacc.utexas.edu
===========================
step 2
-lua ProjectDIR/src/sh_to_modulefile.in.lua ProjectDIR/rt/sh_to_modulefile/tstScript.sh
+lua ProjectDIR/src/sh_to_modulefile.in.lua -D ProjectDIR/rt/sh_to_modulefile/tstScript.sh
===========================
+capture(/bin/bash --noprofile -norc -c " set -e;/lua ProjectDIR/src/printEnvT.lua oldEnvT; echo %__________blk_divider__________%; alias; echo %__________blk_divider__________%; declare -f; echo %__________blk_divider__________%; . ProjectDIR/rt/sh_to_modulefile/tstScript.sh 2>&1; echo %__________blk_divider__________%;/lua ProjectDIR/src/printEnvT.lua envT; echo %__________blk_divider__________%; alias; echo %__________blk_divider__________%; declare -f; echo %__________blk_divider__________%; "){
+} capture
+MF_Base:process(shellName, ignoreT, resultT){
+ MF_Base:processVars(ignoreT, oldEnvT, envT, a){
+ } MF_Base:processVars
+ MF_Base:processAliases(shellName, old, new, a){
+ } MF_Base:processAliases
+ MF_Base:processFuncs(shellName, old, new, a){
+ } MF_Base:processFuncs
+} MF_Base:process
===========================
step 3
lua ProjectDIR/src/sh_to_modulefile.in.lua ProjectDIR/rt/sh_to_modulefile/path_both_ends.sh
@@ -110,8 +120,8 @@
"setenv(\"SECOND\",\"FOO_BAR\")",
},
["ProjectDIR/rt/sh_to_modulefile/tstScript.sh"] = {
- "setenv(\"MY_NAME\",\"tstScript.sh\")", "prepend_path(\"PATH\",\"ProjectDIR/rt/sh_to_modulefile/bin\")", "append_path(\"PATH\",\"ProjectDIR/rt/sh_to_modulefile/sbin\")", "setenv(\"TST_SCRIPT\",\"1\")", "set_alias(\"fooAlias\",\"foobin -q -l\")"
- , [[set_shell_function("banner"," \\
+ "setenv(\"MY_NAME\",\"tstScript.sh\")", "prepend_path(\"PATH\",\"ProjectDIR/rt/sh_to_modulefile/bin\")", "append_path(\"PATH\",\"ProjectDIR/rt/sh_to_modulefile/sbin\")", "setenv(\"TST_SCRIPT\",\"1\")"
+ , "set_alias(\"fooAlias\",\"foobin -q -l\")", [[set_shell_function("banner"," \\
local str=\\"$1\\";\\
local RED='\\033[1;31m';\\
local NONE='\\033[0m';\\
@@ -180,8 +190,8 @@
"setenv(\"SECOND\",\"FOO_BAR\")",
},
["ProjectDIR/rt/sh_to_modulefile/tstScript.sh"] = {
- "setenv(\"MY_NAME\",\"tstScript.sh\")", "prepend_path(\"PATH\",\"ProjectDIR/rt/sh_to_modulefile/bin\")", "append_path(\"PATH\",\"ProjectDIR/rt/sh_to_modulefile/sbin\")", "setenv(\"TST_SCRIPT\",\"1\")", "set_alias(\"fooAlias\",\"foobin -q -l\")"
- , [[set_shell_function("banner"," \\
+ "setenv(\"MY_NAME\",\"tstScript.sh\")", "prepend_path(\"PATH\",\"ProjectDIR/rt/sh_to_modulefile/bin\")", "append_path(\"PATH\",\"ProjectDIR/rt/sh_to_modulefile/sbin\")", "setenv(\"TST_SCRIPT\",\"1\")"
+ , "set_alias(\"fooAlias\",\"foobin -q -l\")", [[set_shell_function("banner"," \\
local str=\\"$1\\";\\
local RED='\\033[1;31m';\\
local NONE='\\033[0m';\\ |
Without trying to add # diff -u /tmp/portage/sys-cluster/lmod-9999/work/lmod-9999/rt/sh_to_modulefile/t1/2021_12_04_12_31_58-Linux-x86_64-sh_to_modulefile/_err.{left,right}
--- /tmp/portage/sys-cluster/lmod-9999/work/lmod-9999/rt/sh_to_modulefile/t1/2021_12_04_12_31_58-Linux-x86_64-sh_to_modulefile/_err.left 2021-12-04 12:32:50.411831925 +0100
+++ /tmp/portage/sys-cluster/lmod-9999/work/lmod-9999/rt/sh_to_modulefile/t1/2021_12_04_12_31_58-Linux-x86_64-sh_to_modulefile/_err.right 2021-12-04 12:32:50.411831925 +0100
@@ -110,8 +110,8 @@
"setenv(\"SECOND\",\"FOO_BAR\")",
},
["ProjectDIR/rt/sh_to_modulefile/tstScript.sh"] = {
- "setenv(\"MY_NAME\",\"tstScript.sh\")", "prepend_path(\"PATH\",\"ProjectDIR/rt/sh_to_modulefile/bin\")", "append_path(\"PATH\",\"ProjectDIR/rt/sh_to_modulefile/sbin\")", "setenv(\"TST_SCRIPT\",\"1\")", "set_alias(\"fooAlias\",\"foobin -q -l\")"
- , [[set_shell_function("banner"," \\
+ "setenv(\"MY_NAME\",\"tstScript.sh\")", "prepend_path(\"PATH\",\"ProjectDIR/rt/sh_to_modulefile/bin\")", "append_path(\"PATH\",\"ProjectDIR/rt/sh_to_modulefile/sbin\")", "setenv(\"TST_SCRIPT\",\"1\")"
+ , "set_alias(\"fooAlias\",\"foobin -q -l\")", [[set_shell_function("banner"," \\
local str=\\"$1\\";\\
local RED='\\033[1;31m';\\
local NONE='\\033[0m';\\
@@ -180,8 +180,8 @@
"setenv(\"SECOND\",\"FOO_BAR\")",
},
["ProjectDIR/rt/sh_to_modulefile/tstScript.sh"] = {
- "setenv(\"MY_NAME\",\"tstScript.sh\")", "prepend_path(\"PATH\",\"ProjectDIR/rt/sh_to_modulefile/bin\")", "append_path(\"PATH\",\"ProjectDIR/rt/sh_to_modulefile/sbin\")", "setenv(\"TST_SCRIPT\",\"1\")", "set_alias(\"fooAlias\",\"foobin -q -l\")"
- , [[set_shell_function("banner"," \\
+ "setenv(\"MY_NAME\",\"tstScript.sh\")", "prepend_path(\"PATH\",\"ProjectDIR/rt/sh_to_modulefile/bin\")", "append_path(\"PATH\",\"ProjectDIR/rt/sh_to_modulefile/sbin\")", "setenv(\"TST_SCRIPT\",\"1\")"
+ , "set_alias(\"fooAlias\",\"foobin -q -l\")", [[set_shell_function("banner"," \\
local str=\\"$1\\";\\
local RED='\\033[1;31m';\\
local NONE='\\033[0m';\\ This is probably not a real failure, but the test is marked as failed for me. |
Thanks for working with me on this. Your tests have a longer directory name then my tests which lead to the difference you saw. I have update Lmod to handle longer directory names when testing. Please update your "testing" branching and re-run the tests. I believe that it will pass this time but please let me know either way. |
…orts that are effected by long directory names
Indeed, after your last changes, all tests pass. Thank you! |
Great. I'm closing this issue. |
Just a follow up request. I noticed that ksh and zsh are now test dependencies of Lmod. Is there a way to easily disable tests using ksh at least? |
There are no tests that depend on ksh. I moved /usr/bin/ksh to /usr/bin/ksh.orig and all the test passed. |
I see this when I run without ksh and zsh installed:
|
Lmod 8.6.1+ have changed the tests so that there is a separate test for ksh and another for zsh. So for each of these test, they are only run if that shell is installed. Please test this when you get a chance. |
Lmod 8.6.1 still tries to run ksh and zsh tests for me.
FWIW, the tests are run with |
The new tests, ksh_to_modulefile and zsh_to_modulefile, first test to see if the shell is in the path. If not the test is marked as active equals false. So the only way that you could get a failure is if there is some command "ksh" in the path but it not the actual shell. Lets stick with just the ksh test. Is ksh installed? Or is there some executable called ksh installed? What error to you see in the ksh test directory? What does result.csv say? What do err.txt or out.txt say? |
I do not have ksh or zsh installed, and no such commands are in the PATH. The tests still fail (just tried with version 8.6.14), the error being that the shell command is not found. The results for ksh are shown below:
|
This is not a bug in Lmod but a bug in the Hermes testing system. Please update Hermes to version 2.9 and try again. Thanks for the bug report! |
Indeed, I updates Hermes to 2.9 and now all the tests pass. Thanks for your patience with this! |
Between Lmod 8.5.18 (last version to pass all tests) and 8.5.23 I see the following test failures when trying to update the version of Lmod in Gentoo Linux:
The diffs are:
Sandbox added by portage here, so not a real failure in Lmod. We can probably ignore this test, but would be nice if tests passed in the sandboxed environment.
This looks like a real problem in Lmod.
The text was updated successfully, but these errors were encountered: