[llvm] [offload] add KNOWN_FAILURE_ON unittest macro (PR #196275)

Ɓukasz Plewa via llvm-commits llvm-commits at lists.llvm.org
Thu May 7 03:51:33 PDT 2026


================
@@ -61,6 +61,17 @@
   } while (0)
 #endif
 
+#define KNOWN_FAILURE_ON(...)                                                  \
+  do {                                                                         \
+    ol_platform_backend_t CurBackend = this->getPlatformBackend();             \
+    for (ol_platform_backend_t B :                                             \
+         std::initializer_list<ol_platform_backend_t>{__VA_ARGS__}) {          \
+      if (CurBackend == B) {                                                   \
+        GTEST_SKIP() << "Skipping known failure."                              \
----------------
lplewa wrote:

- missing ;
- not needed {}
- can You make this macro in GTEST style, so we can call in this way:
```KNOW_FAILURE_ON(XYZ) << "UNSUPORTED FEATURE";```
```KNOW_FAILURE_ON(XYZ) << "See issue #23423";```



https://github.com/llvm/llvm-project/pull/196275


More information about the llvm-commits mailing list