-
Notifications
You must be signed in to change notification settings - Fork 117
[test] Testing the environment of the login nodes when accessed remotely over SSH #583
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #583 +/- ##
==========================================
+ Coverage 91.53% 91.56% +0.02%
==========================================
Files 72 72
Lines 9005 9005
==========================================
+ Hits 8243 8245 +2
+ Misses 762 760 -2
Continue to review full report at Codecov.
|
vkarak
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I remember, we have said that we should look into more variables. Not just $SCRATCH.
@victorusu @lucamar Can you please review as well?
victorusu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have just one comment to extend the test. Probably we do not need to do it now. But it would be nice to have an extended version of this test.
vkarak
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generating a separate test for each env variable seems too much. Why not checking all the variables from a single check? The overall overhead for running will be much lower. You may execute echo VAR=$VAR instead of $VAR and update the regex pattern. If it fails, again you will immediately have the offending variable name.
|
@rsarm The problem you are seeing is due to the fact that a regression test is deep copied for each combination of system partition and programming environment, but the closure of the lambda function still refers to the original object, because functions are not deep copied. More specifically, when you create the lambda function for the import copy
class C:
def __init__(self):
self.fn = lambda: self
if __name__ == '__main__':
c = C()
d = copy.deepcopy(c)
print('c is bound to', c)
print('d is bound to', d)
print('c.fn() is bound to', c.fn())
print('d.fn() is bound to', d.fn())This will print the following, which demonstrates exactly the problem: A workaround to this bug is to avoid functions with closures. So you could rewrite your sanity function as follows: def __init__(self):
...
self.sanity_patterns = sn.all(
sn.map(self.assert_envvar, ['CRAY_CPU_TARGET=haswell']))
def assert_envvar(self, v):
return sn.assert_found(v, self.stdout) |
|
Hello @rsarm! Thanks for updating the PR.
Comment last updated on December 06, 2018 at 15:34 Hours UTC |
|
@rsarm Can you revert your latest changes? I have fixed the PR myself yesterday, but forgot to merge it. |
vkarak
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rsarm Please revert your last changes.
Closes #510