summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/1917-get-stack-frame/src/art/Test1917.java11
-rw-r--r--test/1934-jvmti-signal-thread/src/art/Test1934.java22
-rw-r--r--test/knownfailures.json14
3 files changed, 22 insertions, 25 deletions
diff --git a/test/1917-get-stack-frame/src/art/Test1917.java b/test/1917-get-stack-frame/src/art/Test1917.java
index def7530bff..75af43bea3 100644
--- a/test/1917-get-stack-frame/src/art/Test1917.java
+++ b/test/1917-get-stack-frame/src/art/Test1917.java
@@ -134,13 +134,20 @@ public class Test1917 {
System.out.println("Recurring 5 times on another thread");
Thread thr = new Thread(
- new RecurCount(5, new StackTraceGenerator(makePrintStackFramesConsumer())));
+ Thread.currentThread().getThreadGroup(),
+ new RecurCount(5, new StackTraceGenerator(makePrintStackFramesConsumer())),
+ "Recurring Thread 1",
+ 10*1000000 /* 10 mb*/);
thr.start();
thr.join();
System.out.println("Recurring 5 times on another thread. Stack trace from main thread!");
ThreadPauser pause = new ThreadPauser();
- Thread thr2 = new Thread(new RecurCount(5, pause));
+ Thread thr2 = new Thread(
+ Thread.currentThread().getThreadGroup(),
+ new RecurCount(5, pause),
+ "Recurring Thread 2",
+ 10*1000000 /* 10 mb*/);
thr2.start();
pause.waitForOtherThreadToPause();
new StackTraceGenerator(thr2, makePrintStackFramesConsumer()).run();
diff --git a/test/1934-jvmti-signal-thread/src/art/Test1934.java b/test/1934-jvmti-signal-thread/src/art/Test1934.java
index 308f17b961..c71090b509 100644
--- a/test/1934-jvmti-signal-thread/src/art/Test1934.java
+++ b/test/1934-jvmti-signal-thread/src/art/Test1934.java
@@ -71,10 +71,14 @@ public class Test1934 {
ensureInitialized(java.util.concurrent.locks.LockSupport.class);
}
+ public static Thread createThread(Runnable r, String name) {
+ return new Thread(Thread.currentThread().getThreadGroup(), r, name, /* 10 mb */ 10 * 1000000);
+ }
+
public static void testStopBeforeStart() throws Exception {
final Throwable[] out_err = new Throwable[] { null, };
final Object tst = new Object();
- Thread target = new Thread(() -> { while (true) { } }, "waiting thread!");
+ Thread target = createThread(() -> { while (true) { } }, "waiting thread!");
target.setUncaughtExceptionHandler((t, e) -> { out_err[0] = e; });
System.out.println("stopping other thread before starting");
try {
@@ -93,7 +97,7 @@ public class Test1934 {
public static void testInterruptBeforeStart() throws Exception {
final Throwable[] out_err = new Throwable[] { null, };
final Object tst = new Object();
- Thread target = new Thread(() -> { while (true) { } }, "waiting thread!");
+ Thread target = createThread(() -> { while (true) { } }, "waiting thread!");
target.setUncaughtExceptionHandler((t, e) -> { out_err[0] = e; });
System.out.println("interrupting other thread before starting");
try {
@@ -113,7 +117,7 @@ public class Test1934 {
final Throwable[] out_err = new Throwable[] { null, };
final Object tst = new Object();
final Semaphore sem = new Semaphore(0);
- Thread target = new Thread(() -> {
+ Thread target = createThread(() -> {
sem.release();
while (true) {
try {
@@ -140,7 +144,7 @@ public class Test1934 {
final Throwable[] out_err = new Throwable[] { null, };
final Object tst = new Object();
final Semaphore sem = new Semaphore(0);
- Thread target = new Thread(() -> {
+ Thread target = createThread(() -> {
sem.release();
while (true) {
try {
@@ -172,7 +176,7 @@ public class Test1934 {
final Throwable[] out_err = new Throwable[] { null, };
final long native_monitor_id = allocNativeMonitor();
final Semaphore sem = new Semaphore(0);
- Thread target = new Thread(() -> {
+ Thread target = createThread(() -> {
sem.release();
nativeWaitForOtherThread(native_monitor_id);
// We need to make sure we do something that can get the exception to be actually noticed.
@@ -214,7 +218,7 @@ public class Test1934 {
public static void testStopRecur() throws Exception {
final Throwable[] out_err = new Throwable[] { null, };
final Semaphore sem = new Semaphore(0);
- Thread target = new Thread(() -> {
+ Thread target = createThread(() -> {
sem.release();
while (true) {
doRecurCnt(null, 50);
@@ -235,7 +239,7 @@ public class Test1934 {
public static void testInterruptRecur() throws Exception {
final Throwable[] out_err = new Throwable[] { null, };
final Semaphore sem = new Semaphore(0);
- Thread target = new Thread(() -> {
+ Thread target = createThread(() -> {
sem.release();
while (true) {
doRecurCnt(() -> {
@@ -258,7 +262,7 @@ public class Test1934 {
public static void testStopSpinning() throws Exception {
final Throwable[] out_err = new Throwable[] { null, };
final Semaphore sem = new Semaphore(0);
- Thread target = new Thread(() -> { sem.release(); while (true) {} }, "Spinning thread!");
+ Thread target = createThread(() -> { sem.release(); while (true) {} }, "Spinning thread!");
target.setUncaughtExceptionHandler((t, e) -> { out_err[0] = e; });
target.start();
sem.acquire();
@@ -273,7 +277,7 @@ public class Test1934 {
public static void testInterruptSpinning() throws Exception {
final Semaphore sem = new Semaphore(0);
- Thread target = new Thread(() -> {
+ Thread target = createThread(() -> {
sem.release();
while (!Thread.currentThread().isInterrupted()) { }
}, "Spinning thread!");
diff --git a/test/knownfailures.json b/test/knownfailures.json
index a7c71a5e8d..ce4ebd76a5 100644
--- a/test/knownfailures.json
+++ b/test/knownfailures.json
@@ -1031,19 +1031,5 @@
"variant": "jit & debuggable",
"bug": "b/109791792",
"description": ["Stack too big."]
- },
- {
- "tests": ["1934-jvmti-signal-thread"],
- "env_vars": {"SANITIZE_HOST": "address"},
- "variant": "interp-ac",
- "bug": "b/111837501",
- "description": ["Unexpected exception thrown"]
- },
- {
- "tests": ["1917-get-stack-frame"],
- "env_vars": {"SANITIZE_HOST": "address"},
- "variant": "interp-ac",
- "bug": "b/112071036",
- "description": ["Unexpected exception thrown"]
}
]