-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[doc] Add special case for unsupported test #78858
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
Conversation
@llvm/pr-subscribers-testing-tools Author: AdityaK (hiraditya) ChangesThat helps disable the test for all the targets Full diff: https://github.com/llvm/llvm-project/pull/78858.diff 1 Files Affected:
diff --git a/llvm/docs/TestingGuide.rst b/llvm/docs/TestingGuide.rst
index a692e301fa2c41..802cb8d2e6db04 100644
--- a/llvm/docs/TestingGuide.rst
+++ b/llvm/docs/TestingGuide.rst
@@ -568,7 +568,8 @@ list of boolean expressions. The values in each expression may be:
| ``UNSUPPORTED`` disables the test if any expression is true.
| ``XFAIL`` expects the test to fail if any expression is true.
-As a special case, ``XFAIL: *`` is expected to fail everywhere.
+As a special case, ``XFAIL: *`` is expected to fail everywhere. Similarly,
+``UNSUPPORTED: target={{.*}}`` will disable the test everywhere.
.. code-block:: llvm
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor suggestion to improve the docs further.
llvm/docs/TestingGuide.rst
Outdated
@@ -568,7 +568,8 @@ list of boolean expressions. The values in each expression may be: | |||
| ``UNSUPPORTED`` disables the test if any expression is true. | |||
| ``XFAIL`` expects the test to fail if any expression is true. | |||
|
|||
As a special case, ``XFAIL: *`` is expected to fail everywhere. | |||
As a special case, ``XFAIL: *`` is expected to fail everywhere. Similarly, | |||
``UNSUPPORTED: target={{.*}}`` will disable the test everywhere. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be a good idea to expand on this a bit and explain that XFAIL
runs the test but expects it to fail, where as UNSUPPORTED
will skip the test entirely so you would never know if the state changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coincidentally, this is documented exactly as you mentioned in https://github.com/llvm/llvm-project/blob/main/llvm/docs/TestingGuide.rst?plain=1#L596
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure UNSUPPORTED: target={{.*}}
is really a "special case": it's just a natural consequence of the use of a regex with the target=
method. XFAIL: *
on the other hand IS a special case, because it isn't a regex.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, it is however useful to disable the test in all cases. lmk if you think this is still an interesting thing to document.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jh7370 I agree with you, but I guess I didn't read it as "this is also a special case", but rather as "this is another way to do this". I think that having the pointer to the fact that this is not great is important since we don't want to encourage people to disable tests I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about we rephrase this as: "To mark a test expected failing or unsupported for all cases, use XFAIL: *
or UNSUPPORTED: target={{.}}
as appropriate" or something to that effect (most importantly, simply drop the "as a special case" bit)?
I've definitely seen a use-case downstream for marking something as UNSUPPORTED
for all cases: if a test from upstream has come down and is flaky (so doesn't pass/fail consistently and thus XFAIL
won't work), it's important to mark it as such whilst it gets reported upstream, so that our continuous merge process doesn't get blocked.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like that suggestion @jh7370
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've definitely seen a use-case downstream for marking something as UNSUPPORTED for all cases
Same. it took me a bit to find this trick with UNSUPPORTED.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add [doc]
to the start of the commit title, please? The way the title is currently it makes it look like there's some functional change to the testing infrastructure in this patch.
llvm/docs/TestingGuide.rst
Outdated
@@ -568,7 +568,8 @@ list of boolean expressions. The values in each expression may be: | |||
| ``UNSUPPORTED`` disables the test if any expression is true. | |||
| ``XFAIL`` expects the test to fail if any expression is true. | |||
|
|||
As a special case, ``XFAIL: *`` is expected to fail everywhere. | |||
As a special case, ``XFAIL: *`` is expected to fail everywhere. Similarly, | |||
``UNSUPPORTED: target={{.*}}`` will disable the test everywhere. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure UNSUPPORTED: target={{.*}}
is really a "special case": it's just a natural consequence of the use of a regex with the target=
method. XFAIL: *
on the other hand IS a special case, because it isn't a regex.
That helps disable the test for all the targets
Merging it, assuming there are no further suggestions. Let me know if it can be improved further and I can follow up with another PR. |
@@ -568,7 +568,8 @@ list of boolean expressions. The values in each expression may be: | |||
| ``UNSUPPORTED`` disables the test if any expression is true. | |||
| ``XFAIL`` expects the test to fail if any expression is true. | |||
As a special case, ``XFAIL: *`` is expected to fail everywhere. | |||
Use, ``XFAIL: *`` if the test is expected to fail everywhere. Similarly, use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: delete the "," after "Use"
That helps disable the test for all the targets