This is an archive of the discontinued LLVM Phabricator instance.

[libcxx] Add UNSUPPORTED tag to lit. It mirrors REQUIRES.
ClosedPublic

Authored by EricWF on Aug 17 2014, 9:45 PM.

Details

Summary

This patch adds support for // UNSUPPORTED: feature. If an excluded feature is found in the list of available features then the test is marked unsupported.

I hope to use this to mark test unsupported if the fail with msan on asan. As well as tests that fail in particular standard modes.

Diff Detail

Event Timeline

EricWF updated this revision to Diff 12604.Aug 17 2014, 9:45 PM
EricWF retitled this revision from to [libcxx] Add EXCLUDES tag to lit. It mirrors REQUIRES..
EricWF updated this object.
EricWF edited the test plan for this revision. (Show Details)
EricWF added reviewers: mclow.lists, danalbert.
EricWF added a subscriber: Unknown Object (MLST).
danalbert edited edge metadata.Aug 17 2014, 10:21 PM

Modulo a few comments, I think this looks fine, but I don't think I agree with using this to mark tests that fail under a given sanitizer. Specifically, I don't think "unsupported" is semantically correct in this case. If the test is failing under a given sanitizer, there's either something wrong with the test, something wrong with one of our libraries, or something wrong with the sanitizer itself, right? In that case, I think the right thing to do would be to XFAIL them under those conditions.

On a somewhat related note, I noticed that the LIT docs claim we're supposed to be able to label XFAILs with a PR number, but a few quick attempts with this didn't show any useful feedback in the test results. I assume this is because we parse the XFAIL lines ourselves. We should fix this so we can track these better.

test/lit.cfg
91

Whitespace alignment.

Also, what parts of the test suite would need REQUIRES: <target-triple>? I don't think I've found any tests that are platform specific. If not, YAGNI.

EricWF updated this revision to Diff 12606.Aug 17 2014, 10:32 PM
EricWF updated this object.
EricWF edited edge metadata.

Removed checking triple target for REQUIRES and EXCLUDES. I though that LIT's TestRunner.py check the triple target but I was mistaken. YAGNI :P

Thanks for looking at this Dan.

A lot of our tests replace operator new and operator delete. MSAN and ASAN also replace operator new/delete. This causes a linking error. Theres nothing wrong with the tests other than they just can't be run with MSAN or ASAN. I think these should be considered unsupported as opposed to expected failures.

I hope that clarifies things.

EricWF updated this revision to Diff 12608.Aug 17 2014, 11:49 PM
EricWF retitled this revision from [libcxx] Add EXCLUDES tag to lit. It mirrors REQUIRES. to [libcxx] Add UNSUPPORTED tag to lit. It mirrors REQUIRES..
EricWF updated this object.

Change name of EXCLUDES to UNSUPPORTED.

danalbert accepted this revision.Aug 17 2014, 11:50 PM
danalbert edited edge metadata.

Ah, alright. Unsupported would be correct then.

This revision is now accepted and ready to land.Aug 17 2014, 11:50 PM
EricWF closed this revision.Aug 17 2014, 11:52 PM