Skip to content

Commit 0f69cbe

Browse files
committed
[sanitizer_common][test] Disable CombinedAllocator32Compact etc. on Solaris/sparcv9
As reported in PR 48202, two allocator tests `FAIL` on Solaris/sparcv9, presumably because Solaris uses the full 64-bit address space and the allocator cannot deal with that: SanitizerCommon-Unit :: ./Sanitizer-sparcv9-Test/SanitizerCommon.CombinedAllocator32Compact SanitizerCommon-Unit :: ./Sanitizer-sparcv9-Test/SanitizerCommon.SizeClassAllocator32Iteration This patch disables the tests. Tested on `sparcv9-sun-solaris2.11`. Differential Revision: https://reviews.llvm.org/D91622
1 parent ce6524d commit 0f69cbe

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

compiler-rt/lib/sanitizer_common/tests/sanitizer_allocator_test.cpp

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@
2828

2929
using namespace __sanitizer;
3030

31+
#if SANITIZER_SOLARIS && defined(__sparcv9)
32+
// FIXME: These tests probably fail because Solaris/sparcv9 uses the full
33+
// 64-bit address space. Needs more investigation
34+
#define SKIP_ON_SOLARIS_SPARCV9(x) DISABLED_##x
35+
#else
36+
#define SKIP_ON_SOLARIS_SPARCV9(x) x
37+
#endif
38+
3139
// Too slow for debug build
3240
#if !SANITIZER_DEBUG
3341

@@ -701,7 +709,7 @@ TEST(SanitizerCommon, CombinedAllocator64VeryCompact) {
701709
}
702710
#endif
703711

704-
TEST(SanitizerCommon, CombinedAllocator32Compact) {
712+
TEST(SanitizerCommon, SKIP_ON_SOLARIS_SPARCV9(CombinedAllocator32Compact)) {
705713
TestCombinedAllocator<Allocator32Compact>();
706714
}
707715

@@ -937,7 +945,7 @@ TEST(SanitizerCommon, SizeClassAllocator64DynamicIteration) {
937945
#endif
938946
#endif
939947

940-
TEST(SanitizerCommon, SizeClassAllocator32Iteration) {
948+
TEST(SanitizerCommon, SKIP_ON_SOLARIS_SPARCV9(SizeClassAllocator32Iteration)) {
941949
TestSizeClassAllocatorIteration<Allocator32Compact>();
942950
}
943951

0 commit comments

Comments
 (0)