summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJesse Wilson <jessewilson@google.com>2011-06-21 10:22:19 -0700
committerJesse Wilson <jessewilson@google.com>2011-06-21 10:23:07 -0700
commitbea345e1cd8acd993758366df42af7c6c9cf76d6 (patch)
treedb3f8ac397733437aac736d215eae8564a4a5083 /tests
parent0c632a8484839ceeffc6fdf04c310c02c7531530 (diff)
downloadandroid_dalvik-bea345e1cd8acd993758366df42af7c6c9cf76d6.tar.gz
android_dalvik-bea345e1cd8acd993758366df42af7c6c9cf76d6.tar.bz2
android_dalvik-bea345e1cd8acd993758366df42af7c6c9cf76d6.zip
Fix the watchdog test to handle the failure from managed code.
Change-Id: I9691f414b953c7e11791069a574441b993611238 http://b/4144865
Diffstat (limited to 'tests')
-rw-r--r--tests/030-bad-finalizer/expected.txt1
-rw-r--r--tests/030-bad-finalizer/info.txt16
-rw-r--r--tests/030-bad-finalizer/run27
3 files changed, 14 insertions, 30 deletions
diff --git a/tests/030-bad-finalizer/expected.txt b/tests/030-bad-finalizer/expected.txt
index 6e91dcc94..88b18967d 100644
--- a/tests/030-bad-finalizer/expected.txt
+++ b/tests/030-bad-finalizer/expected.txt
@@ -5,4 +5,3 @@ Finalizer done spinning.
Finalizer sleeping forever now.
Requesting another GC.
Requesting another GC.
-(segfault)
diff --git a/tests/030-bad-finalizer/info.txt b/tests/030-bad-finalizer/info.txt
index 0f76ad6a8..26f499376 100644
--- a/tests/030-bad-finalizer/info.txt
+++ b/tests/030-bad-finalizer/info.txt
@@ -1,3 +1,15 @@
The finalizer for this class never finishes. Dalvik is expected to detect
-this situation and abort the VM (so you will likely see a "deadd00d"
-crash in the log output).
+this situation and abort the VM (so you will likely see a stacktrace like
+the following in the log output).
+
+java.util.concurrent.TimeoutException
+ at java.lang.VMThread.sleep(Native Method)
+ at java.lang.Thread.sleep(Thread.java:1031)
+ at java.lang.Thread.sleep(Thread.java:1013)
+ at BadFinalizer.snooze(BadFinalizer.java:9)
+ at BadFinalizer.finalize(BadFinalizer.java:29)
+ at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:182)
+ at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:168)
+ at java.lang.Thread.run(Thread.java:856)
+Calling exit(2)
+
diff --git a/tests/030-bad-finalizer/run b/tests/030-bad-finalizer/run
deleted file mode 100644
index 8e03cd3f1..000000000
--- a/tests/030-bad-finalizer/run
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/bash
-#
-# Copyright (C) 2008 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-${RUN} "$@" > original-output.txt
-
-cat original-output.txt | awk '
-/Segmentation fault/ {
- # ignore the details of the line
- print "(segfault)"
- next;
-}
-{
- print;
-}'