Skip to content

Commit

Permalink
[sanitizer_common][test] Always skip select allocator tests on SPARC …
Browse files Browse the repository at this point in the history
…V9 (#100530)

Two allocator tests `FAIL` on Linux/sparc64:
```
  SanitizerCommon-Unit :: ./Sanitizer-sparcv9-Test/SanitizerCommon/CombinedAllocator32Compact
  SanitizerCommon-Unit :: ./Sanitizer-sparcv9-Test/SanitizerCommon/SizeClassAllocator32Iteration
```
The failure mode is the same on Solaris/sparcv9, where those tests are
already disabled since 0f69cbe.
Therefore, this patch skips them on SPARC in general.

Tested on `sparc64-unknown-linux-gnu` and `sparcv9-sun-solaris2.11`.
  • Loading branch information
rorth authored Jul 30, 2024
1 parent 84ad292 commit 3d14912
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,13 @@

using namespace __sanitizer;

#if SANITIZER_SOLARIS && defined(__sparcv9)
#if 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
// 64-bit address space. Same on Linux/sparc64, so probably a general SPARC
// issue. Needs more investigation
# define SKIP_ON_SPARCV9(x) DISABLED_##x
#else
#define SKIP_ON_SOLARIS_SPARCV9(x) x
# define SKIP_ON_SPARCV9(x) x
#endif

// On 64-bit systems with small virtual address spaces (e.g. 39-bit) we can't
Expand Down Expand Up @@ -781,7 +782,7 @@ TEST(SanitizerCommon, CombinedAllocator64VeryCompact) {
}
#endif

TEST(SanitizerCommon, SKIP_ON_SOLARIS_SPARCV9(CombinedAllocator32Compact)) {
TEST(SanitizerCommon, SKIP_ON_SPARCV9(CombinedAllocator32Compact)) {
TestCombinedAllocator<Allocator32Compact>();
}

Expand Down Expand Up @@ -1028,7 +1029,7 @@ TEST(SanitizerCommon, SizeClassAllocator64DynamicPremappedIteration) {
#endif
#endif

TEST(SanitizerCommon, SKIP_ON_SOLARIS_SPARCV9(SizeClassAllocator32Iteration)) {
TEST(SanitizerCommon, SKIP_ON_SPARCV9(SizeClassAllocator32Iteration)) {
TestSizeClassAllocatorIteration<Allocator32Compact>();
}

Expand Down

0 comments on commit 3d14912

Please sign in to comment.