[libcxxabi] r296955 - Attempt to suppress test failures on OS X

Eric Fiselier via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 3 18:29:26 PST 2017


Author: ericwf
Date: Fri Mar  3 20:29:25 2017
New Revision: 296955

URL: http://llvm.org/viewvc/llvm-project?rev=296955&view=rev
Log:
Attempt to suppress test failures on OS X

Modified:
    libcxxabi/trunk/test/libcxxabi/test/config.py
    libcxxabi/trunk/test/test_exception_address_alignment.pass.cpp

Modified: libcxxabi/trunk/test/libcxxabi/test/config.py
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/libcxxabi/test/config.py?rev=296955&r1=296954&r2=296955&view=diff
==============================================================================
--- libcxxabi/trunk/test/libcxxabi/test/config.py (original)
+++ libcxxabi/trunk/test/libcxxabi/test/config.py Fri Mar  3 20:29:25 2017
@@ -48,6 +48,8 @@ class Configuration(LibcxxConfiguration)
         if not self.get_lit_bool('has_cxa_thread_atexit_impl', True):
             self.config.available_features.add(
                 'libcxxabi-no-cxa-thread-atexit-impl')
+        if not self.get_lit_bool('llvm_unwinder', False):
+            self.config.available_features.add('libcxxabi-has-system-unwinder')
 
     def configure_compile_flags(self):
         self.cxx.compile_flags += ['-DLIBCXXABI_NO_TIMER']

Modified: libcxxabi/trunk/test/test_exception_address_alignment.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/test_exception_address_alignment.pass.cpp?rev=296955&r1=296954&r2=296955&view=diff
==============================================================================
--- libcxxabi/trunk/test/test_exception_address_alignment.pass.cpp (original)
+++ libcxxabi/trunk/test/test_exception_address_alignment.pass.cpp Fri Mar  3 20:29:25 2017
@@ -7,13 +7,25 @@
 //
 //===----------------------------------------------------------------------===//
 
+// UNSUPPORTED: c++98, c++03
+
+// The system unwind.h on OS X provides an incorrectly aligned _Unwind_Exception
+// type. That causes these tests to fail. This XFAIL is my best attempt at
+// working around this failure.
+// XFAIL: darwin && libcxxabi-has-system-unwinder
+
 // Test that the address of the exception object is properly aligned to the
 // largest supported alignment for the system.
 
 #include <cstdint>
 #include <cassert>
 
+#include <unwind.h>
+
 struct __attribute__((aligned)) AlignedType {};
+static_assert(alignof(AlignedType) == alignof(_Unwind_Exception),
+  "_Unwind_Exception is incorrectly aligned. This test is expected to fail");
+
 struct MinAligned {  };
 static_assert(alignof(MinAligned) == 1 && sizeof(MinAligned) == 1, "");
 




More information about the cfe-commits mailing list