|
1 | 1 | // REQUIRES: linux, cpu || (gpu && level_zero)
|
| 2 | + |
| 3 | +// The following is an ugly hack to make CI pass. The issue here is that when |
| 4 | +// sycl-toolchain is built with assertions enabled, then we hit one at |
| 5 | +// `DeviceGlobalUSMMem::~DeviceGlobalUSMMem()` and exit with abort. If not, then |
| 6 | +// sanitizer does `exit(1)`. |
| 7 | +// |
| 8 | +// That doesn't matter as long as LIT does *not* use "external shell", but when |
| 9 | +// it does, the difference between `not` and `not --crash` becomes crucial and |
| 10 | +// we cannot have a single command that would match both behaviors. Ideally, |
| 11 | +// we'd need to make a choice based on how the toolchain was built. |
| 12 | +// Unfortunately, we don't have that information at the LIT level and |
| 13 | +// propagating it all the way down to it would be ugly. Instead, rely on the |
| 14 | +// fact that "no-assertion" mode doesn't use "run-only" lit invocations and make |
| 15 | +// a choice based on that. This is rather fragile but workarounds the issue for |
| 16 | +// the time being. |
| 17 | + |
| 18 | +// DEFINE: %{not} = not %if test-mode-run-only %{ --crash %} |
| 19 | + |
2 | 20 | // RUN: %{build} %device_asan_flags -O0 -g -o %t1.out
|
3 |
| -// RUN: %{run} not --crash %t1.out 2>&1 | FileCheck %s |
| 21 | +// RUN: %{run} %{not} %t1.out 2>&1 | FileCheck %s |
4 | 22 | // RUN: %{build} %device_asan_flags -O1 -g -o %t2.out
|
5 |
| -// RUN: %{run} not --crash %t2.out 2>&1 | FileCheck %s |
| 23 | +// RUN: %{run} %{not} %t2.out 2>&1 | FileCheck %s |
6 | 24 | // RUN: %{build} %device_asan_flags -O2 -g -o %t3.out
|
7 |
| -// RUN: %{run} not --crash %t3.out 2>&1 | FileCheck %s |
| 25 | +// RUN: %{run} %{not} %t3.out 2>&1 | FileCheck %s |
8 | 26 |
|
9 | 27 | // Flakily timesout on PVC
|
10 | 28 | // UNSUPPORTED: arch-intel_gpu_pvc
|
|
0 commit comments