-
Notifications
You must be signed in to change notification settings - Fork 796
[SYCL][E2E] Track amount of XFAILed tests
#15603
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 4 commits
3b89b37
7c72b73
8da85a5
8ff75fd
c908d65
e9e4dd2
4c855cb
505ee97
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -320,3 +320,23 @@ implementation header files is still in progress and the final set of these | |
| "fine-grained" includes that might be officially documented and suggested for | ||
| customers to use isn't determined yet. **Until then, code outside of this project | ||
| must keep using `<sycl/sycl.hpp>` provided by the SYCL2020 specification.** | ||
|
|
||
| ## Marking tests as expected to fail | ||
|
|
||
| Every test should be written in a way that it is either passed, or it is skipped | ||
| (in case it is not compatible with an environment it was launched in). | ||
|
|
||
| If for any reason you find yourself in need to temporary mark test as expected | ||
| to fail under certain conditions, you need to submit an issue to the repo to | ||
| analyze that failure and make test passed or skipped. | ||
|
|
||
| Once the issue is created, you can update the test by adding `XFAIL` and | ||
| `XFAIL-TRACKER` directive: | ||
| ``` | ||
| // GPU driver update caused failure | ||
| // XFAIL: level_zero | ||
| // XFAIL-TRACKER: intel/llvm#DDDDD | ||
|
||
| ``` | ||
|
|
||
| If you add `XFAIL` without `XFAIL-TRACKER` directive, | ||
| `no-xfail-without-tracker.cpp` test will fail, notifying you about that. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| // This test is intended to ensure that we have no trackers marked as XFAIL | ||
| // without a tracker information added to a test. | ||
| // | ||
| // The format we check is: | ||
| // XFAIL: lit,features | ||
| // XFAIL-TRACKER: intel/llvm issue URL|intel/llvm#NNNNN shortcut | ||
| // | ||
| // REQUIRES: linux | ||
| // | ||
| // Explanation of the command: | ||
| // - search for all "XFAIL" occurrences, display line with match and the next one | ||
| // -I, --include to drop binary files and other unrelated files | ||
| // - in the result, search for "XFAIL" again, but invert the result - this | ||
| // allows us to get the line *after* XFAIL | ||
| // - in those lines, check that XFAIL-TRACKER is present and correct. Once | ||
| // again, invert the search to get all "bad" lines | ||
| // - make a final count of how many ill-formatted directives there are and | ||
| // verify that against the reference | ||
| // | ||
| // RUN: grep -rI "XFAIL:" %S -A 1 --include=*.c --include=*.cpp \ | ||
| // RUN: --no-group-separator | \ | ||
| // RUN: grep -v "XFAIL:" | \ | ||
| // RUN: grep -Pv "XFAIL-TRACKER:\s+.*intel/llvm.*\d+" | \ | ||
| // RUN: wc -l | FileCheck %s --check-prefix NUMBER-OF-XFAIL-WITHOUT-TRACKER | ||
| // | ||
| // The number below is a number of tests which are *improperly* XFAIL-ed, i.e. | ||
| // we either don't have a tracker associated with a failure listed in those | ||
| // tests, or it is listed in a wrong format. | ||
| // Note: strictly speaking, that is not amount of files, but amount of XFAIL | ||
| // directives. If a test contains several XFAIL directives, some of them may be | ||
| // valid and other may not. | ||
| // | ||
| // That number *must not* increase. Any PR which causes this number to grow | ||
| // should be rejected and it should be updated to either keep the number as-is | ||
| // or have it reduced (preferrably, down to zero). | ||
| // | ||
| // If you see this test failed for your patch, it means that you either | ||
| // introduced XFAIL directive to a test improperly, or broke the format of an | ||
| // existing XFAIL-ed tests. | ||
| // Another possibility (and that is a good option) is that you updated some | ||
| // tests to match the required format and in that case you should just update | ||
| // (i.e. reduce) the number below. | ||
| // | ||
| // NUMBER-OF-XFAIL-WITHOUT-TRACKER: 176 |
Uh oh!
There was an error while loading. Please reload this page.