This is an archive of the discontinued LLVM Phabricator instance.

[lit] Move llvm-test-suite result codes into llvm/lit
Changes PlannedPublic

Authored by jdoerfert on Apr 12 2020, 5:53 PM.

Details

Summary

Without this lnt runtest test-suite instructed to use lit will fail
if tests result in the SKIPPED or NOEXE result codes. A patch to the
llvm-test-suite will remove the definitions there (from
litsupport/test.py) and reuse these ones instead.

Diff Detail

Event Timeline

jdoerfert created this revision.Apr 12 2020, 5:53 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 12 2020, 5:53 PM
cmatthews accepted this revision.Apr 12 2020, 8:25 PM

Lgtm. Thanks!

This revision is now accepted and ready to land.Apr 12 2020, 8:25 PM
jdenny added a reviewer: yln.Apr 13 2020, 7:00 AM
jdenny added a subscriber: jdenny.
jdenny added inline comments.
llvm/utils/lit/lit/Test.py
39

This has been added already: D77819.

yln requested changes to this revision.Apr 13 2020, 11:04 AM

Hi Johannes,

As Joel mentioned: I already added a SKIPPED category: tests that should have been executed but weren't.
I am planning to add one more: FILTERED: tests that are discovered but, are filtered out.

Please explain what benefit having a separate category for NOEXE offers; and why it is considered a failure? My understanding is that --no-execute is mostly used for benchmarking lit itself (pass/fail doesn't matter there?).

Thanks!

This revision now requires changes to proceed.Apr 13 2020, 11:04 AM
In D77986#1978333, @yln wrote:

Hi Johannes,

As Joel mentioned: I already added a SKIPPED category: tests that should have been executed but weren't.
I am planning to add one more: FILTERED: tests that are discovered but, are filtered out.

Please explain what benefit having a separate category for NOEXE offers; and why it is considered a failure? My understanding is that --no-execute is mostly used for benchmarking lit itself (pass/fail doesn't matter there?).

Thanks!

As I mentioned in the commit message, without this patch running lnt runtest test-suite can fail with an obscure message and not produce a result. It is considered a failure because this is the definition that I moved from the test-suite (D77987).

yln added a comment.Apr 13 2020, 2:51 PM

Ah okay, I didn't realize that NOEXE had nothing to do with lit's --no-execute option. I think you can use UNRESOLVED instead of creating a specific category for it and use the already existing SKIPPED. Would that work?

In D77986#1979080, @yln wrote:

Ah okay, I didn't realize that NOEXE had nothing to do with lit's --no-execute option. I think you can use UNRESOLVED instead of creating a specific category for it and use the already existing SKIPPED. Would that work?

I guess one could use UNRESOLVED but I'm unsure why and I think there are obvious drawbacks: It would introduce a weird split between the llvm-test-suite and llvm/lit as NOEXE in the former would then map to something else in the latter. I don't think we should "rename" it in the test-suite as it is not "unresolved" (whatever that then means) but we just failed to produce an executable so the compile stage failed not the run stage (which would be FAIL).

Using the SKIPPED category has similar problems (conceptually, I don't know if it would actually show right now): We didn't skip the test, we compiled, failed to produce an executable, and consequently couldn't run anything. Skipped implies something else.

I don't think we should "rename" it in the test-suite as it is not "unresolved" (whatever that then means) but we just failed to produce an executable so the compile stage failed not the run stage (which would be FAIL).

Based on that description, I agree with @jdoerfert that UNRESOLVED or SKIPPED doesn't make sense for NOEXE. NOEXE sounds like a special kind of FAIL. I don't have enough experience with lnt to know why it's worthwhile to distinguish NOEXE from FAIL, but it's not a new distinction in lnt. If it's worthwhile there, maybe it will be worthwhile in other lit-based test suites too.

yln added a comment.Apr 14 2020, 11:22 AM

I don't think we should "rename" it in the test-suite as it is not "unresolved" (whatever that then means) but we just failed to produce an executable so the compile stage failed not the run stage (which would be FAIL).

Based on that description, I agree with @jdoerfert that UNRESOLVED or SKIPPED doesn't make sense for NOEXE. NOEXE sounds like a special kind of FAIL.

I mixed this up as well. Thanks for explaining @jdoerfert!

I don't have enough experience with lnt to know why it's worthwhile to distinguish NOEXE from FAIL, but it's not a new distinction in lnt. If it's worthwhile there, maybe it will be worthwhile in other lit-based test suites too.

This is the question then. Are there plans (or a desire) to adopt this notion in other lit tests as well and should this become a supported lit feature? Is not having these categories in "vanilla" lit blocking improvements in lnt?

In D77986#1981385, @yln wrote:

I don't have enough experience with lnt to know why it's worthwhile to distinguish NOEXE from FAIL, but it's not a new distinction in lnt. If it's worthwhile there, maybe it will be worthwhile in other lit-based test suites too.

This is the question then. Are there plans (or a desire) to adopt this notion in other lit tests as well and should this become a supported lit feature? Is not having these categories in "vanilla" lit blocking improvements in lnt?

To make this clear: Right now this is needed for me to run lnt with lit in the first place. Without these two patches lnt crashes as it provides lit with NOEXE result codes that are not handled in tests_by_code (and potentially other places).

yln added a comment.Apr 14 2020, 1:07 PM

To make this clear: Right now this is needed for me to run lnt with lit in the first place. Without these two patches lnt crashes as it provides lit with NOEXE result codes that are not handled in tests_by_code (and potentially other places).

Ah, I now understand the reason and urgency! I didn't realize that there were "custom" categories in derived projects. Apologies for breaking things. Let me get back to you with a patch that accounts for this.

yln added a comment.Apr 14 2020, 4:04 PM

Would the solution proposed in D78164 work for you? @jdoerfert

yln resigned from this revision.Apr 28 2020, 10:14 PM
This revision is now accepted and ready to land.Apr 28 2020, 10:14 PM
yln requested changes to this revision.Apr 28 2020, 10:14 PM
yln added a subscriber: yln.

Accidental accept. I mean to resign as a reviewer.

This revision now requires changes to proceed.Apr 28 2020, 10:14 PM
yln resigned from this revision.Apr 28 2020, 10:15 PM
This revision is now accepted and ready to land.Apr 28 2020, 10:15 PM
jdoerfert planned changes to this revision.Apr 30 2020, 5:34 AM
jdoerfert added a subscriber: Meinersbur.

@Meinersbur will take a look at this using the registration mechanism @ynl provided.