summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/1944-sudden-exit/expected.txt2
-rw-r--r--test/1944-sudden-exit/info.txt5
-rwxr-xr-xtest/1944-sudden-exit/run18
-rw-r--r--test/1944-sudden-exit/src/Main.java21
-rw-r--r--test/1944-sudden-exit/src/art/Test1944.java69
-rw-r--r--test/1944-sudden-exit/src/art/Trace.java68
-rw-r--r--test/1944-sudden-exit/sudden_exit.cc32
-rw-r--r--test/Android.bp1
8 files changed, 0 insertions, 216 deletions
diff --git a/test/1944-sudden-exit/expected.txt b/test/1944-sudden-exit/expected.txt
deleted file mode 100644
index 98f8511769..0000000000
--- a/test/1944-sudden-exit/expected.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-All threads started
-Exiting suddenly
diff --git a/test/1944-sudden-exit/info.txt b/test/1944-sudden-exit/info.txt
deleted file mode 100644
index d575ce5864..0000000000
--- a/test/1944-sudden-exit/info.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-Test to make sure the runtime will not crash if an agent calls exit(3) while
-other threads are performing operations.
-
-In this case we have multiple threads all performing single stepping when we
-call exit(3).
diff --git a/test/1944-sudden-exit/run b/test/1944-sudden-exit/run
deleted file mode 100755
index 51875a7e86..0000000000
--- a/test/1944-sudden-exit/run
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/bash
-#
-# Copyright 2017 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.
-
-# Ask for stack traces to be dumped to a file rather than to stdout.
-./default-run "$@" --jvmti
diff --git a/test/1944-sudden-exit/src/Main.java b/test/1944-sudden-exit/src/Main.java
deleted file mode 100644
index 1644c6ef0c..0000000000
--- a/test/1944-sudden-exit/src/Main.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (C) 2017 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.
- */
-
-public class Main {
- public static void main(String[] args) throws Exception {
- art.Test1944.run();
- }
-}
diff --git a/test/1944-sudden-exit/src/art/Test1944.java b/test/1944-sudden-exit/src/art/Test1944.java
deleted file mode 100644
index 36cbb2b390..0000000000
--- a/test/1944-sudden-exit/src/art/Test1944.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (C) 2017 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.
- */
-
-package art;
-
-import java.util.Arrays;
-import java.lang.reflect.Executable;
-import java.lang.reflect.Method;
-import java.util.concurrent.Semaphore;
-
-public class Test1944 {
- // Just calculate fib forever.
- public static void fib(Semaphore started) {
- started.release();
- long a = 1;
- long b = 1;
- while (true) {
- long c = a + b;
- a = b;
- b = c;
- }
- }
-
- // Don't bother actually doing anything.
- public static void notifySingleStep(Thread thr, Executable e, long loc) { }
-
- public static native void exitNow();
-
- private static int num_threads = 10;
-
- public static void run() throws Exception {
- final Semaphore started = new Semaphore(-(num_threads - 1));
-
- Trace.enableSingleStepTracing(Test1944.class,
- Test1944.class.getDeclaredMethod(
- "notifySingleStep", Thread.class, Executable.class, Long.TYPE),
- null);
-
- Thread[] threads = new Thread[num_threads];
- for (int i = 0; i < num_threads; i++) {
- threads[i] = new Thread(() -> { fib(started); });
- // Make half daemons.
- threads[i].setDaemon(i % 2 == 0);
- threads[i].start();
- }
- // Wait for all threads to start.
- started.acquire();
- System.out.println("All threads started");
- // sleep a little
- Thread.sleep(10);
- // Die.
- System.out.println("Exiting suddenly");
- exitNow();
- System.out.println("FAILED: Should not reach here!");
- }
-}
diff --git a/test/1944-sudden-exit/src/art/Trace.java b/test/1944-sudden-exit/src/art/Trace.java
deleted file mode 100644
index 8999bb1368..0000000000
--- a/test/1944-sudden-exit/src/art/Trace.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (C) 2017 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.
- */
-
-package art;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-
-public class Trace {
- public static native void enableTracing(Class<?> methodClass,
- Method entryMethod,
- Method exitMethod,
- Method fieldAccess,
- Method fieldModify,
- Method singleStep,
- Thread thr);
- public static native void disableTracing(Thread thr);
-
- public static void enableFieldTracing(Class<?> methodClass,
- Method fieldAccess,
- Method fieldModify,
- Thread thr) {
- enableTracing(methodClass, null, null, fieldAccess, fieldModify, null, thr);
- }
-
- public static void enableMethodTracing(Class<?> methodClass,
- Method entryMethod,
- Method exitMethod,
- Thread thr) {
- enableTracing(methodClass, entryMethod, exitMethod, null, null, null, thr);
- }
-
- public static void enableSingleStepTracing(Class<?> methodClass,
- Method singleStep,
- Thread thr) {
- enableTracing(methodClass, null, null, null, null, singleStep, thr);
- }
-
- public static native void watchFieldAccess(Field f);
- public static native void watchFieldModification(Field f);
- public static native void watchAllFieldAccesses();
- public static native void watchAllFieldModifications();
-
- // the names, arguments, and even line numbers of these functions are embedded in the tests so we
- // need to add to the bottom and not modify old ones to maintain compat.
- public static native void enableTracing2(Class<?> methodClass,
- Method entryMethod,
- Method exitMethod,
- Method fieldAccess,
- Method fieldModify,
- Method singleStep,
- Method ThreadStart,
- Method ThreadEnd,
- Thread thr);
-}
diff --git a/test/1944-sudden-exit/sudden_exit.cc b/test/1944-sudden-exit/sudden_exit.cc
deleted file mode 100644
index 2f5ce9b959..0000000000
--- a/test/1944-sudden-exit/sudden_exit.cc
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright (C) 2018 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.
- */
-
-#include <stdlib.h>
-#include "jni.h"
-
-namespace art {
-namespace Test1944SuddenExit {
-
-extern "C" JNIEXPORT void JNICALL Java_art_Test1944_exitNow(JNIEnv*, jclass)
- __attribute__((noreturn));
-
-extern "C" JNIEXPORT void JNICALL Java_art_Test1944_exitNow(JNIEnv*, jclass) {
- exit(0);
-}
-
-} // namespace Test1944SuddenExit
-} // namespace art
-
diff --git a/test/Android.bp b/test/Android.bp
index 98e79ad125..72e8eee95a 100644
--- a/test/Android.bp
+++ b/test/Android.bp
@@ -294,7 +294,6 @@ art_cc_defaults {
"936-search-onload/search_onload.cc",
"983-source-transform-verify/source_transform.cc",
"1940-ddms-ext/ddm_ext.cc",
- "1944-sudden-exit/sudden_exit.cc",
],
}