Noticed while testing for an out of tree target. There are probably more tests that should be so marked.
I'm not sure who owns these tests so I've added a few names I recognise from the recent history.
Details
Diff Detail
- Build Status
Buildable 8353 Build 8353: arc lint + arc unit
Event Timeline
According to the top-level CODE_OWNERS.TXT the overall LLD code owner is @ruiu so please add him as a reviewer.
Also all LLD patches should have llvm-commits as a subscriber.
Note that when you add the list as a subscriber after-the-fact, you should repeat the original patch description as a comment, otherwise it won't appear on the mailing list.
Thanks Paul. This is my first time looking at lld, the guidance is appreciated.
Mark a number of x86 only tests to require x86
Noticed while testing for an out of tree target. There are probably more tests that should be so marked.
I'm not sure who owns these tests so I've added a few names I recognise from the recent history.
A few more tests have been introduced like this. It may make more sense to restructure the tests so that they are separated by target.
We are using x86 as a "generic" target to test features that don't depend on targets. Besides that, the number of tests that need target-specific treatment is not that many, so I don't think we want to restructure the test files per target. (Also, the fact that we are using "x86" to test generic feature means that you usually want to enable the LLVM x86 target to run these tests.)
Are you saying, if you want to test LLD, you must enable the x86 target? That sounds backwards.
Yes, that's what I meant. It's not ideal, but if you want to write tests that don't depend on target, what target would you choose?
LLVM also has lots of tests that are generic in principle, but end up depending on a particular target for practical reasons. However, the project does not require people to include the X86 target (or ARM target, another favorite for "generic" tests) before they can run tests at all. The project relies on the many people who *do* have those targets enabled, plus bots, to guarantee coverage. And, the ought-to-be-generic tests end up in target-specific directories, where they don't get in the way of people whose work either doesn't depend on that target or requires that they not have that target enabled. As one recent example, r295384 added a "generic" test that had to be moved to an X86 specific directory in r295389, for exactly this reason.
The people who are proposing this change do not, for whatever reason, want to include the x86 target. I don't think the LLD project should force them to include it. I know I don't personally contribute meaningfully to the LLD project, but others in my company do, and as a designated merge guru I need to keep them happy.
I don't know if I understand what you said correctly. I do not want to force anyone to enable the x86 target. If you disable x86, tests that use x86 as a "generic" target won't run, but it shouldn't be more than that. I'm still waiting for you to update this patch to address Rafael's comment.
I'll update the patch. But I'm still concerned that needing to add "REQUIRES: x86" is going to be an ongoing maintenance for us as new tests are added.
Also as it currently stands, I can't see an easy way to distinguish between generic tests and actual x86 tests.
I'll update the patch. But I'm still concerned that needing to add "REQUIRES: x86" is going to be an ongoing maintenance for us as new tests are added.
We should start adding "REQUIRES: x86" to new tests from now on.
Also as it currently stands, I can't see an easy way to distinguish between generic tests and actual x86 tests.
You can distinguish by filename, as target-specific tests start with target name.
Does this mean the patch for files in the ELF directory which do not start with a target name should not specify a triple?
For example, relocatable-tls.s and no-symtab.s should pass without the REQUIRES clause were the explicit triple removed.
Rafael replied via email, not on phabricator, and email replies don't always propagate. He said:
davidb added a comment.
In https://reviews.llvm.org/D34685#796778, @ruiu wrote:
I don't know if I understand what you said correctly. I do not want to force anyone to enable the x86 target. If you disable x86, tests that use x86 as a "generic" target won't run, but it shouldn't be more than that. I'm still waiting for you to update this patch to address Rafael's comment.
I'll update the patch. But I'm still concerned that needing to add "REQUIRES: x86" is going to be an ongoing maintenance for us as new tests are added.
The normal way of avoiding that is setting up a bot. Can you setup one
that tests lld without the x86 backend?
Cheers,
Rafael
Again, can you please update as per the Rafael's comment?
Does this mean the patch for files in the ELF directory which do not start with a target name should not specify a triple?
For example, relocatable-tls.s and no-symtab.s should pass without the REQUIRES clause were the explicit triple removed.
Here is the rule that I'm proposing.
- If a test is testing an architecture-specific feature, add the architecture name as a prefix. For example, if a test tests x86 relocation relaxation, name it x86-relocation-relaxation.s.
- If a test is testing an architecture-independent feature, use the x86 as a "generic" target, and don't add "x86" as a prefix.
Sorry, Jon and I have been out of office the past week.
I can't seem to update the diff again without creating a new revision? The update existing revision doesn't seem available to me...
Make sure you have logged in to reviews.llvm.org. Looks like even I can upload a new revision to this review request, so I think anyone who have logged in can do that.
I can't seem to do it through the Phabricator UI, or archanist which has just created a new differential... https://reviews.llvm.org/D35565
REQUIRES: x86, zlib