[mlir][msan][test] Disable jit tests
authorVitaly Buka <vitalybuka@google.com>
Wed, 27 Apr 2022 23:04:47 +0000 (16:04 -0700)
committerVitaly Buka <vitalybuka@google.com>
Thu, 28 Apr 2022 15:50:13 +0000 (08:50 -0700)
I am going to enable MLIR test on msan bot
https://lab.llvm.org/buildbot/#/builders/sanitizer-x86_64-linux-bootstrap-msan

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D124574

mlir/test/mlir-cpu-runner/lit.local.cfg
mlir/unittests/ExecutionEngine/Invoke.cpp

index 3a9b0ef..7dc3525 100644 (file)
@@ -4,6 +4,10 @@ import sys
 if sys.platform == 'win32':
     config.unsupported = True
 
+# MSAN does not work with JIT.
+if 'msan' in config.available_features:
+  config.unsupported = True
+
 # Requires the native target to be configured in.
 if 'llvm_has_native_target' not in config.available_features:
     config.unsupported = True
index cc91254..febfbd1 100644 (file)
@@ -232,7 +232,13 @@ static void memrefMultiply(::StridedMemRefType<float, 2> *memref,
     elt *= coefficient;
 }
 
-TEST(NativeMemRefJit, JITCallback) {
+// MSAN does not work with JIT.
+#if __has_feature(memory_sanitizer)
+#define MAYBE_JITCallback DISABLED_JITCallback
+#else
+#define MAYBE_JITCallback JITCallback
+#endif
+TEST(NativeMemRefJit, MAYBE_JITCallback) {
   constexpr int k = 2;
   constexpr int m = 2;
   int64_t shape[] = {k, m};