summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Roland Levillain <rpl@google.com> 2016-07-28 16:37:28 +0100
committer Roland Levillain <rpl@google.com> 2016-07-28 16:37:28 +0100
commit63b6eb400c9d9052447b213471f90dfa4e6f242c (patch)
treee9ede70e0725c85da30c4e87cf00ebe0a0567254
parent93afc5f20a23ece78d6d6e506ed75775b8ef2113 (diff)
Disable CheckSwapUsage test with read barriers on x86.
This test does not produce the expected results on some x86 systems when read barriers are enabled. Also remove unused TEST_DISABLED_FOR_READ_BARRIER macro definition. Test: m test-art-host-gtest Bug: 29259363 Bug: 12687968 Change-Id: If7c124226b32c10425725e62bb684150aba108ab
-rw-r--r--compiler/common_compiler_test.h7
-rw-r--r--dex2oat/dex2oat_test.cc5
-rw-r--r--runtime/common_runtime_test.h6
3 files changed, 11 insertions, 7 deletions
diff --git a/compiler/common_compiler_test.h b/compiler/common_compiler_test.h
index 2d139eb841..c9423757ab 100644
--- a/compiler/common_compiler_test.h
+++ b/compiler/common_compiler_test.h
@@ -115,13 +115,6 @@ class CommonCompilerTest : public CommonRuntimeTest {
std::list<std::vector<uint8_t>> header_code_and_maps_chunks_;
};
-// TODO: When read barrier works with all tests, get rid of this.
-#define TEST_DISABLED_FOR_READ_BARRIER() \
- if (kUseReadBarrier) { \
- printf("WARNING: TEST DISABLED FOR READ BARRIER\n"); \
- return; \
- }
-
// TODO: When read barrier works with all Optimizing back ends, get rid of this.
#define TEST_DISABLED_FOR_READ_BARRIER_WITH_OPTIMIZING_FOR_UNSUPPORTED_INSTRUCTION_SETS() \
if (kUseReadBarrier && GetCompilerKind() == Compiler::kOptimizing) { \
diff --git a/dex2oat/dex2oat_test.cc b/dex2oat/dex2oat_test.cc
index c076b5aea8..58dd047081 100644
--- a/dex2oat/dex2oat_test.cc
+++ b/dex2oat/dex2oat_test.cc
@@ -396,6 +396,11 @@ class Dex2oatSwapUseTest : public Dex2oatSwapTest {
};
TEST_F(Dex2oatSwapUseTest, CheckSwapUsage) {
+ // The `native_alloc_2_ >= native_alloc_1_` assertion below may not
+ // hold true on some x86 systems when read barriers are enabled;
+ // disable this test while we investigate (b/29259363).
+ TEST_DISABLED_FOR_READ_BARRIER_ON_X86();
+
RunTest(false /* use_fd */,
false /* expect_use */);
GrabResult1();
diff --git a/runtime/common_runtime_test.h b/runtime/common_runtime_test.h
index b68eb19f2a..8f7d18b67a 100644
--- a/runtime/common_runtime_test.h
+++ b/runtime/common_runtime_test.h
@@ -205,6 +205,12 @@ class CheckJniAbortCatcher {
return; \
}
+#define TEST_DISABLED_FOR_READ_BARRIER_ON_X86() \
+ if (kUseReadBarrier && kRuntimeISA == kX86) { \
+ printf("WARNING: TEST DISABLED FOR READ BARRIER ON X86\n"); \
+ return; \
+ }
+
} // namespace art
namespace std {