From 0f69cbe2694a4740e6db5b99bd81a26746403072 Mon Sep 17 00:00:00 2001 From: Rainer Orth Date: Fri, 20 Nov 2020 13:02:15 +0100 Subject: [PATCH] [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 --- .../lib/sanitizer_common/tests/sanitizer_allocator_test.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/compiler-rt/lib/sanitizer_common/tests/sanitizer_allocator_test.cpp b/compiler-rt/lib/sanitizer_common/tests/sanitizer_allocator_test.cpp index baf9b37f..26593c0 100644 --- a/compiler-rt/lib/sanitizer_common/tests/sanitizer_allocator_test.cpp +++ b/compiler-rt/lib/sanitizer_common/tests/sanitizer_allocator_test.cpp @@ -28,6 +28,14 @@ using namespace __sanitizer; +#if SANITIZER_SOLARIS && defined(__sparcv9) +// FIXME: These tests probably fail because Solaris/sparcv9 uses the full +// 64-bit address space. Needs more investigation +#define SKIP_ON_SOLARIS_SPARCV9(x) DISABLED_##x +#else +#define SKIP_ON_SOLARIS_SPARCV9(x) x +#endif + // Too slow for debug build #if !SANITIZER_DEBUG @@ -701,7 +709,7 @@ TEST(SanitizerCommon, CombinedAllocator64VeryCompact) { } #endif -TEST(SanitizerCommon, CombinedAllocator32Compact) { +TEST(SanitizerCommon, SKIP_ON_SOLARIS_SPARCV9(CombinedAllocator32Compact)) { TestCombinedAllocator(); } @@ -937,7 +945,7 @@ TEST(SanitizerCommon, SizeClassAllocator64DynamicIteration) { #endif #endif -TEST(SanitizerCommon, SizeClassAllocator32Iteration) { +TEST(SanitizerCommon, SKIP_ON_SOLARIS_SPARCV9(SizeClassAllocator32Iteration)) { TestSizeClassAllocatorIteration(); } -- 2.7.4