Skip to content

Commit d532ddc

Browse files
committed
Attempt to suppress test failures on OS X
llvm-svn: 296955
1 parent 6f8d62d commit d532ddc

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

libcxxabi/test/libcxxabi/test/config.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ def configure_features(self):
4848
if not self.get_lit_bool('has_cxa_thread_atexit_impl', True):
4949
self.config.available_features.add(
5050
'libcxxabi-no-cxa-thread-atexit-impl')
51+
if not self.get_lit_bool('llvm_unwinder', False):
52+
self.config.available_features.add('libcxxabi-has-system-unwinder')
5153

5254
def configure_compile_flags(self):
5355
self.cxx.compile_flags += ['-DLIBCXXABI_NO_TIMER']

libcxxabi/test/test_exception_address_alignment.pass.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,25 @@
77
//
88
//===----------------------------------------------------------------------===//
99

10+
// UNSUPPORTED: c++98, c++03
11+
12+
// The system unwind.h on OS X provides an incorrectly aligned _Unwind_Exception
13+
// type. That causes these tests to fail. This XFAIL is my best attempt at
14+
// working around this failure.
15+
// XFAIL: darwin && libcxxabi-has-system-unwinder
16+
1017
// Test that the address of the exception object is properly aligned to the
1118
// largest supported alignment for the system.
1219

1320
#include <cstdint>
1421
#include <cassert>
1522

23+
#include <unwind.h>
24+
1625
struct __attribute__((aligned)) AlignedType {};
26+
static_assert(alignof(AlignedType) == alignof(_Unwind_Exception),
27+
"_Unwind_Exception is incorrectly aligned. This test is expected to fail");
28+
1729
struct MinAligned { };
1830
static_assert(alignof(MinAligned) == 1 && sizeof(MinAligned) == 1, "");
1931

0 commit comments

Comments
 (0)