- Added reading nm and objdump paths from env variables
- Added binaryCacheRoot
Details
Diff Detail
- Repository
- rLNT LNT
Event Timeline
I think ideally the bullet points in your patch description should each correspond to a different patch. That said, I don't have sufficient expertise to review everything but I might be able to review some of the resulting patches.
lnt/testing/profile/profile.py | ||
---|---|---|
34–36 | This will set the parameters to None (and thus override the default values of the parameter) when the environment variables are not set. I don't think this is what you meant. |
lnt/testing/profile/profile.py | ||
---|---|---|
34–36 | import os def prn(x): print(x) prn(x = os.getenv('MISSING_VAR', 'abc')) Output: abc |
lnt/testing/profile/profile.py | ||
---|---|---|
34–36 | Nothing, I missed something: the second parameter of getenv. |
lnt/testing/profile/profile.py | ||
---|---|---|
34–36 | this patch was actually tested in production setup, so it works at least on some platforms. |
I've divided previously uploaded patch and minimized all changes. Main new functional of cPerf usage refactoring will follow in a next patch
Please add some tests for the environment variables and possibly for the bug fixes depending on what they are. This should also be split into 4 patches, one for each items mentioned. They are all independent, even if you likely made them in one go to get Linux perf work for you. One important reason for splitting is if an issue is found with one of the items the whole patch might need to be reverted. It also allow for easier cherry-pick for people who maintain their own branch of LNT.
Besides the missing tests, the patch LGTM and I'll be happy to approve it.
Most changes in cPerf.cpp are related to the standalone mode which is not used in the production. This mode is designed only for debug purpose. It cannot break anything.
cPerf.cpp was already designed to get nm and objdump path as the parameter (with default value).
The environment variables are used to
- redefine or specify the full path to the tools nm and objdump;
- set the root path to binaries.
What are the options? I see only 2 options - the variable is missing (current default behavior) or the variable contains a path to the tool which is used as is. What may be wrong in the code nm = os.getenv('CMAKE_NM', 'nm')?
I don't see any purpose of such tests.
It is necessary to add some executable binaries (tools) and probably some profile files to the LNT repository for requested tests. I think it is redundant and very bad idea. It is impossible to design such tests to be valid on any target or at least on most targets.
I suggest to accept this patch and commit it as is.
BTW, I see that LNT tests did not execute automatically. Something is totally broken here around LNT tests and all LNT tests are useless for now. Who should we ping to fix this?
Still, the title does not reflect what is happening in the diff which is a clear sign the patch should be split and this is a completely independent change. If the fixes are also for standalone mode I'm happy for the patch to be split in 2 only: standalone+fixes and envvars+bincacheroot.
BTW, I see that LNT tests did not execute automatically. Something is totally broken here around LNT tests and all LNT tests are useless for now. Who should we ping to fix this?
Whoever broke the tests. There's at least 3 failures:
- plistlib change I introduced seems to only work for Python3, I'll make a patch
- future needs to be installed for mypy to work (I'm guessing some recent Python version don't have it in the standard library anymore because it used to work) I've created https://reviews.llvm.org/D112148
- Something in runtest/test_suite.shtest
I think py27 fails because of plistlib change I introduced which only works for Python 3. I need to revisit that. Python3 fails for me because I think I'm using a too new version which seems to have dropped future.
This will set the parameters to None (and thus override the default values of the parameter) when the environment variables are not set. I don't think this is what you meant.