Skip to content

Commit 1e62398

Browse files
authored
[SYCL][E2E] Fix XFAIL statements that use negated device features (#18641)
Because of device specific features we have to perform our own checks to see whether or not a test should XFAIL. However, a similar check is also done in internal lit code, but due to the fact that this bit of code only knows about the non device specific features there can be situations where it incorrectly reports a test as expected to fail (Like negating a device specific feature, like `XFAIL: !cpu`). To avoid this we set the XFAIL conditions to an empty list before returning our result, this way `expected_to_fail` is always false in the code below, and our result is not altered. https://github.com/intel/llvm/blob/d60cd271ccb330dd9da8158176404b68ff55baa9/llvm/utils/lit/lit/Test.py#L275-L292
1 parent e5d5382 commit 1e62398

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

sycl/test-e2e/Regression/build_log.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// RUN: FileCheck %s --check-prefix=CHECK-EXPECTED-ERROR --input-file %t.out
66
// CHECK-EXPECTED-ERROR: error: backend compiler failed build
77

8-
// XFAIL: !arch-intel_gpu_bmg_g21
8+
// XFAIL: *
99
// XFAIL-TRACKER: https://github.com/intel/llvm/issues/16416
1010

1111
#include <stdio.h>

sycl/test-e2e/format.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,4 +393,10 @@ def map_result(features, code):
393393
if len(devices_for_test) == 1:
394394
device = devices_for_test[0]
395395
result.code = map_result(test.config.sycl_dev_features[device], result.code)
396+
397+
# Set this to empty so internal lit code won't change our result if it incorrectly
398+
# thinks the test should XFAIL. This can happen when our XFAIL condition relies on
399+
# device features, since the internal lit code doesn't have knowledge of these.
400+
test.xfails = []
401+
396402
return result

0 commit comments

Comments
 (0)