summaryrefslogtreecommitdiff
path: root/test/ubsan
diff options
context:
space:
mode:
authorDavid Carlier <devnexen@gmail.com>2018-06-30 21:35:05 +0000
committerDavid Carlier <devnexen@gmail.com>2018-06-30 21:35:05 +0000
commit6758db1bffbd51069a083633d50252ad68be181e (patch)
tree131a1db1cd2e1bc63badfcba8276b5c70a2d2ce7 /test/ubsan
parent877d4c0b05307d9bc8b72c6977ad12419df0294a (diff)
[UBsan] Enable subset of unit tests for OpenBSD
Reviewers: kubamracek, krytarowski Reviewed By: krytarowski Differential Revision: https://reviews.llvm.org/D48805 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@336053 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/ubsan')
-rw-r--r--test/ubsan/TestCases/Integer/suppressions.cpp2
-rw-r--r--test/ubsan/TestCases/Misc/coverage-levels.cc2
-rw-r--r--test/ubsan/TestCases/Misc/missing_return.cpp2
-rw-r--r--test/ubsan/TestCases/Misc/monitor.cpp2
-rw-r--r--test/ubsan/TestCases/TypeCheck/Function/function.cpp2
-rw-r--r--test/ubsan/TestCases/TypeCheck/misaligned.cpp2
-rw-r--r--test/ubsan/TestCases/TypeCheck/vptr.cpp2
-rw-r--r--test/ubsan/lit.common.cfg2
8 files changed, 15 insertions, 1 deletions
diff --git a/test/ubsan/TestCases/Integer/suppressions.cpp b/test/ubsan/TestCases/Integer/suppressions.cpp
index f72d82edf..65d8bba13 100644
--- a/test/ubsan/TestCases/Integer/suppressions.cpp
+++ b/test/ubsan/TestCases/Integer/suppressions.cpp
@@ -4,6 +4,8 @@
// requires the compiler-rt runtime to be able to symbolize stack addresses.
// REQUIRES: can-symbolize
// UNSUPPORTED: android
+// Output differs on OpenBSD longer by displaying the values.
+// XFAIL: openbsd
// Fails without any suppression.
// RUN: %env_ubsan_opts=halt_on_error=1 not %run %t 2>&1 | FileCheck %s
diff --git a/test/ubsan/TestCases/Misc/coverage-levels.cc b/test/ubsan/TestCases/Misc/coverage-levels.cc
index 05c19937d..54d99746b 100644
--- a/test/ubsan/TestCases/Misc/coverage-levels.cc
+++ b/test/ubsan/TestCases/Misc/coverage-levels.cc
@@ -23,6 +23,8 @@
// Coverage is not yet implemented in TSan.
// XFAIL: ubsan-tsan
// UNSUPPORTED: ubsan-standalone-static
+// No coverage support
+// UNSUPPORTED: openbsd
volatile int sink;
int main(int argc, char **argv) {
diff --git a/test/ubsan/TestCases/Misc/missing_return.cpp b/test/ubsan/TestCases/Misc/missing_return.cpp
index 5c5b286f1..fe8c8bae6 100644
--- a/test/ubsan/TestCases/Misc/missing_return.cpp
+++ b/test/ubsan/TestCases/Misc/missing_return.cpp
@@ -1,6 +1,8 @@
// RUN: %clangxx -fsanitize=return %gmlt %s -O3 -o %t
// RUN: not %run %t 2>&1 | FileCheck %s
// RUN: %env_ubsan_opts=print_stacktrace=1 not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-STACKTRACE
+// Error message does not exact what expected
+// XFAIL: openbsd
// CHECK: missing_return.cpp:[[@LINE+1]]:5: runtime error: execution reached the end of a value-returning function without returning a value
int f() {
diff --git a/test/ubsan/TestCases/Misc/monitor.cpp b/test/ubsan/TestCases/Misc/monitor.cpp
index c0eba0e89..806e0ee9e 100644
--- a/test/ubsan/TestCases/Misc/monitor.cpp
+++ b/test/ubsan/TestCases/Misc/monitor.cpp
@@ -5,6 +5,8 @@
// on Windows.
//
// UNSUPPORTED: win32
+// Linkage issue
+// XFAIL: openbsd
#include <iostream>
diff --git a/test/ubsan/TestCases/TypeCheck/Function/function.cpp b/test/ubsan/TestCases/TypeCheck/Function/function.cpp
index 63d24a129..7b9f09826 100644
--- a/test/ubsan/TestCases/TypeCheck/Function/function.cpp
+++ b/test/ubsan/TestCases/TypeCheck/Function/function.cpp
@@ -3,6 +3,8 @@
// Verify that we can disable symbolization if needed:
// RUN: %env_ubsan_opts=symbolize=0 %run %t 2>&1 | FileCheck %s --check-prefix=NOSYM
// XFAIL: win32,win64
+// Unsupported function flag
+// UNSUPPORTED: openbsd
#include <stdint.h>
diff --git a/test/ubsan/TestCases/TypeCheck/misaligned.cpp b/test/ubsan/TestCases/TypeCheck/misaligned.cpp
index 4eaedf37e..a5cefaa31 100644
--- a/test/ubsan/TestCases/TypeCheck/misaligned.cpp
+++ b/test/ubsan/TestCases/TypeCheck/misaligned.cpp
@@ -11,6 +11,8 @@
// RUN: %clangxx -fsanitize=alignment -fno-sanitize-recover=alignment %s -O3 -o %t
// RUN: not %run %t w1 2>&1 | FileCheck %s --check-prefix=CHECK-WILD
+// Compilation error make the test fails.
+// XFAIL: openbsd
#include <new>
diff --git a/test/ubsan/TestCases/TypeCheck/vptr.cpp b/test/ubsan/TestCases/TypeCheck/vptr.cpp
index d7848c4ce..9b53e8095 100644
--- a/test/ubsan/TestCases/TypeCheck/vptr.cpp
+++ b/test/ubsan/TestCases/TypeCheck/vptr.cpp
@@ -40,6 +40,8 @@
// UNSUPPORTED: win32
// Suppressions file not pushed to the device.
// UNSUPPORTED: android
+// Compilation error
+// UNSUPPORTED: openbsd
#include <new>
#include <typeinfo>
#include <assert.h>
diff --git a/test/ubsan/lit.common.cfg b/test/ubsan/lit.common.cfg
index 851c7fbbc..e20832bd6 100644
--- a/test/ubsan/lit.common.cfg
+++ b/test/ubsan/lit.common.cfg
@@ -68,7 +68,7 @@ config.substitutions.append( ("%gmlt ", " ".join(config.debug_info_flags) + " ")
config.suffixes = ['.c', '.cc', '.cpp']
# Check that the host supports UndefinedBehaviorSanitizer tests
-if config.host_os not in ['Linux', 'Darwin', 'FreeBSD', 'Windows', 'NetBSD', 'SunOS']:
+if config.host_os not in ['Linux', 'Darwin', 'FreeBSD', 'Windows', 'NetBSD', 'SunOS', 'OpenBSD']:
config.unsupported = True
config.available_features.add('arch=' + config.target_arch)