summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Hiroshi Yamauchi <yamauchi@google.com> 2015-09-01 23:49:09 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2015-09-01 23:49:09 +0000
commitc5f408dda0d2828015585da685c8d43a9371fe30 (patch)
tree265a96cfc39130eaa68035e0a5847d208ccbca67
parentb52cfcb3868d08102b4c971974a7b1443861a90c (diff)
parentc823effac6455affd40bedbc9f620f9275919e73 (diff)
Merge "Disable the GDB-based test timeout dump in 32 bit."
-rw-r--r--runtime/runtime.cc3
-rwxr-xr-xtest/etc/run-test-jar3
2 files changed, 5 insertions, 1 deletions
diff --git a/runtime/runtime.cc b/runtime/runtime.cc
index 8f2ca30008..25bb827b58 100644
--- a/runtime/runtime.cc
+++ b/runtime/runtime.cc
@@ -495,7 +495,8 @@ bool Runtime::Start() {
CHECK(!no_sig_chain_) << "A started runtime should have sig chain enabled";
// If a debug host build, disable ptrace restriction for debugging and test timeout thread dump.
-#if defined(__linux__) && !defined(__ANDROID__)
+ // Only 64-bit as prctl() may fail in 32 bit userspace on a 64-bit kernel.
+#if defined(__linux__) && !defined(__ANDROID__) && defined(__x86_64__)
if (kIsDebugBuild) {
CHECK_EQ(prctl(PR_SET_PTRACER, PR_SET_PTRACER_ANY), 0);
}
diff --git a/test/etc/run-test-jar b/test/etc/run-test-jar
index f45e6f5865..6b57f2b957 100755
--- a/test/etc/run-test-jar
+++ b/test/etc/run-test-jar
@@ -463,6 +463,9 @@ else
if [ `uname` = "Darwin" ]; then
# Fall back to timeout on Mac.
TIME_OUT="timeout"
+ elif [ "$ISA" = "x86" ]; then
+ # prctl call may fail in 32-bit on an older (3.2) 64-bit Linux kernel. Fall back to timeout.
+ TIME_OUT="timeout"
else
# Check if gdb is available.
gdb --eval-command="quit" > /dev/null 2>&1