[compiler-rt] r336053 - [UBsan] Enable subset of unit tests for OpenBSD

David Carlier via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 30 14:35:05 PDT 2018


Author: devnexen
Date: Sat Jun 30 14:35:05 2018
New Revision: 336053

URL: http://llvm.org/viewvc/llvm-project?rev=336053&view=rev
Log:
[UBsan] Enable subset of unit tests for OpenBSD

Reviewers: kubamracek, krytarowski

Reviewed By: krytarowski

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


Modified:
    compiler-rt/trunk/test/lit.common.cfg
    compiler-rt/trunk/test/ubsan/TestCases/Integer/suppressions.cpp
    compiler-rt/trunk/test/ubsan/TestCases/Misc/coverage-levels.cc
    compiler-rt/trunk/test/ubsan/TestCases/Misc/missing_return.cpp
    compiler-rt/trunk/test/ubsan/TestCases/Misc/monitor.cpp
    compiler-rt/trunk/test/ubsan/TestCases/TypeCheck/Function/function.cpp
    compiler-rt/trunk/test/ubsan/TestCases/TypeCheck/misaligned.cpp
    compiler-rt/trunk/test/ubsan/TestCases/TypeCheck/vptr.cpp
    compiler-rt/trunk/test/ubsan/lit.common.cfg
    compiler-rt/trunk/test/xray/lit.cfg

Modified: compiler-rt/trunk/test/lit.common.cfg
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/lit.common.cfg?rev=336053&r1=336052&r2=336053&view=diff
==============================================================================
--- compiler-rt/trunk/test/lit.common.cfg (original)
+++ compiler-rt/trunk/test/lit.common.cfg Sat Jun 30 14:35:05 2018
@@ -355,7 +355,7 @@ for postfix in ["2", "1", ""]:
   if config.host_os == 'Darwin':
     config.substitutions.append( ("%ld_flags_rpath_exe" + postfix, '-Wl,-rpath, at executable_path/ %dynamiclib' + postfix) )
     config.substitutions.append( ("%ld_flags_rpath_so" + postfix, '-install_name @rpath/`basename %dynamiclib{}`'.format(postfix)) )
-  elif config.host_os == 'FreeBSD' or config.host_os == 'NetBSD':
+  elif config.host_os in ('FreeBSD', 'NetBSD', 'OpenBSD'):
     config.substitutions.append( ("%ld_flags_rpath_exe" + postfix, "-Wl,-z,origin -Wl,-rpath,\$ORIGIN -L%T -l%xdynamiclib_namespec" + postfix) )
     config.substitutions.append( ("%ld_flags_rpath_so" + postfix, '') )
   elif config.host_os == 'Linux':

Modified: compiler-rt/trunk/test/ubsan/TestCases/Integer/suppressions.cpp
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/ubsan/TestCases/Integer/suppressions.cpp?rev=336053&r1=336052&r2=336053&view=diff
==============================================================================
--- compiler-rt/trunk/test/ubsan/TestCases/Integer/suppressions.cpp (original)
+++ compiler-rt/trunk/test/ubsan/TestCases/Integer/suppressions.cpp Sat Jun 30 14:35:05 2018
@@ -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

Modified: compiler-rt/trunk/test/ubsan/TestCases/Misc/coverage-levels.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/ubsan/TestCases/Misc/coverage-levels.cc?rev=336053&r1=336052&r2=336053&view=diff
==============================================================================
--- compiler-rt/trunk/test/ubsan/TestCases/Misc/coverage-levels.cc (original)
+++ compiler-rt/trunk/test/ubsan/TestCases/Misc/coverage-levels.cc Sat Jun 30 14:35:05 2018
@@ -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) {

Modified: compiler-rt/trunk/test/ubsan/TestCases/Misc/missing_return.cpp
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/ubsan/TestCases/Misc/missing_return.cpp?rev=336053&r1=336052&r2=336053&view=diff
==============================================================================
--- compiler-rt/trunk/test/ubsan/TestCases/Misc/missing_return.cpp (original)
+++ compiler-rt/trunk/test/ubsan/TestCases/Misc/missing_return.cpp Sat Jun 30 14:35:05 2018
@@ -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() {

Modified: compiler-rt/trunk/test/ubsan/TestCases/Misc/monitor.cpp
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/ubsan/TestCases/Misc/monitor.cpp?rev=336053&r1=336052&r2=336053&view=diff
==============================================================================
--- compiler-rt/trunk/test/ubsan/TestCases/Misc/monitor.cpp (original)
+++ compiler-rt/trunk/test/ubsan/TestCases/Misc/monitor.cpp Sat Jun 30 14:35:05 2018
@@ -5,6 +5,8 @@
 // on Windows.
 //
 // UNSUPPORTED: win32
+// Linkage issue
+// XFAIL: openbsd
 
 #include <iostream>
 

Modified: compiler-rt/trunk/test/ubsan/TestCases/TypeCheck/Function/function.cpp
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/ubsan/TestCases/TypeCheck/Function/function.cpp?rev=336053&r1=336052&r2=336053&view=diff
==============================================================================
--- compiler-rt/trunk/test/ubsan/TestCases/TypeCheck/Function/function.cpp (original)
+++ compiler-rt/trunk/test/ubsan/TestCases/TypeCheck/Function/function.cpp Sat Jun 30 14:35:05 2018
@@ -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>
 

Modified: compiler-rt/trunk/test/ubsan/TestCases/TypeCheck/misaligned.cpp
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/ubsan/TestCases/TypeCheck/misaligned.cpp?rev=336053&r1=336052&r2=336053&view=diff
==============================================================================
--- compiler-rt/trunk/test/ubsan/TestCases/TypeCheck/misaligned.cpp (original)
+++ compiler-rt/trunk/test/ubsan/TestCases/TypeCheck/misaligned.cpp Sat Jun 30 14:35:05 2018
@@ -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>
 

Modified: compiler-rt/trunk/test/ubsan/TestCases/TypeCheck/vptr.cpp
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/ubsan/TestCases/TypeCheck/vptr.cpp?rev=336053&r1=336052&r2=336053&view=diff
==============================================================================
--- compiler-rt/trunk/test/ubsan/TestCases/TypeCheck/vptr.cpp (original)
+++ compiler-rt/trunk/test/ubsan/TestCases/TypeCheck/vptr.cpp Sat Jun 30 14:35:05 2018
@@ -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>

Modified: compiler-rt/trunk/test/ubsan/lit.common.cfg
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/ubsan/lit.common.cfg?rev=336053&r1=336052&r2=336053&view=diff
==============================================================================
--- compiler-rt/trunk/test/ubsan/lit.common.cfg (original)
+++ compiler-rt/trunk/test/ubsan/lit.common.cfg Sat Jun 30 14:35:05 2018
@@ -68,7 +68,7 @@ config.substitutions.append( ("%gmlt ",
 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)

Modified: compiler-rt/trunk/test/xray/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/xray/lit.cfg?rev=336053&r1=336052&r2=336053&view=diff
==============================================================================
--- compiler-rt/trunk/test/xray/lit.cfg (original)
+++ compiler-rt/trunk/test/xray/lit.cfg Sat Jun 30 14:35:05 2018
@@ -45,7 +45,7 @@ config.substitutions.append(
 # Default test suffixes.
 config.suffixes = ['.c', '.cc', '.cpp']
 
-if config.host_os not in ['FreeBSD', 'Linux', 'NetBSD']:
+if config.host_os not in ['FreeBSD', 'Linux', 'NetBSD', 'OpenBSD']:
   config.unsupported = True
 elif '64' not in config.host_arch:
   if 'arm' in config.host_arch:




More information about the llvm-commits mailing list