[compiler-rt] 0f69cbe - [sanitizer_common][test] Disable CombinedAllocator32Compact etc. on Solaris/sparcv9

Rainer Orth via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 20 04:02:54 PST 2020


Author: Rainer Orth
Date: 2020-11-20T13:02:15+01:00
New Revision: 0f69cbe2694a4740e6db5b99bd81a26746403072

URL: https://github.com/llvm/llvm-project/commit/0f69cbe2694a4740e6db5b99bd81a26746403072
DIFF: https://github.com/llvm/llvm-project/commit/0f69cbe2694a4740e6db5b99bd81a26746403072.diff

LOG: [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

Added: 
    

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

Removed: 
    


################################################################################
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 baf9b37fb955..26593c0c2f49 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<Allocator32Compact>();
 }
 
@@ -937,7 +945,7 @@ TEST(SanitizerCommon, SizeClassAllocator64DynamicIteration) {
 #endif
 #endif
 
-TEST(SanitizerCommon, SizeClassAllocator32Iteration) {
+TEST(SanitizerCommon, SKIP_ON_SOLARIS_SPARCV9(SizeClassAllocator32Iteration)) {
   TestSizeClassAllocatorIteration<Allocator32Compact>();
 }
 


        


More information about the llvm-commits mailing list