This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Fix that a crashing test is marked as unsupported when it prints UNSUPPORTED before crashing
ClosedPublic

Authored by teemperor on Feb 24 2020, 12:38 AM.

Details

Summary

I added an abort() call to some code and noticed that the test suite was still passing and it just marked my test as "UNSUPPORTED".

It seems the reason for that is that we expect failing tests to print "FAIL:" which doesn't happen when we crash. If we then also
have an unsupported because we skipped some debug information in the output, we just mark the test passing because it is unsupported
on the current platform.

This patch marks any test that has a non-zero exit code as failing even if it doesn't print "FAIL:" (e.g., because it crashed).

Diff Detail

Event Timeline

teemperor created this revision.Feb 24 2020, 12:38 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 24 2020, 12:38 AM
teemperor retitled this revision from [lldb] Fx that a crashing test is marked as passed as passing/unsupported when it prints UNSUPPORTED before crashing to [lldb] Fix that a crashing test is marked as unsupported when it prints UNSUPPORTED before crashing.Feb 24 2020, 12:40 AM
labath accepted this revision.Feb 24 2020, 12:46 AM

I think this is the right thing to do, but let's also see what Jonas says about it.

Also, this has the potential to mark some tests as failures even though there were previously "passing", so be ready to handle (probably, disable) those...

This revision is now accepted and ready to land.Feb 24 2020, 12:46 AM
JDevlieghere accepted this revision.Feb 24 2020, 9:45 AM

I don't remember why this was written this way, maybe there was a good reason for it but probably it was just a mistake. Let's see what happens when we land this :-)

This revision was automatically updated to reflect the committed changes.