8310551: vmTestbase/nsk/jdb/interrupt/interrupt001/interrupt001.java timed out due to missing prompt

Reviewed-by: kevinw, sspitsyn
This commit is contained in:
Chris Plummer 2023-07-14 18:39:34 +00:00
parent 0d2196f8e5
commit c84866ac0d
3 changed files with 7 additions and 9 deletions

View File

@ -171,5 +171,3 @@ vmTestbase/vm/mlvm/indy/func/jvmti/mergeCP_indy2manySame_b/TestDescription.java
vmTestbase/nsk/jdwp/ThreadReference/ForceEarlyReturn/forceEarlyReturn001/forceEarlyReturn001.java 7199837 generic-all
vmTestbase/nsk/monitoring/ThreadMXBean/ThreadInfo/Multi/Multi005/TestDescription.java 8076494 windows-x64
vmTestbase/nsk/jdb/interrupt/interrupt001/interrupt001.java 8310551 linux-all

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -89,7 +89,7 @@ public class interrupt001 extends JdbTest {
static final String LAST_BREAK = DEBUGGEE_CLASS + ".breakHere";
static final String MYTHREAD = "MyThread";
static final String DEBUGGEE_THREAD = DEBUGGEE_CLASS + "$" + MYTHREAD;
static final String DEBUGGEE_RESULT = DEBUGGEE_CLASS + ".notInterrupted.get()";
static final String DEBUGGEE_RESULT = DEBUGGEE_CLASS + ".notInterrupted";
static int numThreads = nsk.jdb.interrupt.interrupt001.interrupt001a.numThreads;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -56,8 +56,8 @@ public class interrupt001a {
lock.wait();
}
} catch (InterruptedException e) {
notInterrupted.decrementAndGet();
synchronized (waitnotify) {
notInterrupted--;
waitnotify.notify();
}
}
@ -83,7 +83,7 @@ public class interrupt001a {
private JdbArgumentHandler argumentHandler;
private Log log;
public static final AtomicInteger notInterrupted = new AtomicInteger(numThreads);
public static volatile int notInterrupted = numThreads;
public int runIt(String args[], PrintStream out) {
@ -122,8 +122,8 @@ public class interrupt001a {
long waitTime = argumentHandler.getWaitTime() * 60 * 1000;
long startTime = System.currentTimeMillis();
while (notInterrupted.get() > 0 && System.currentTimeMillis() - startTime <= waitTime) {
synchronized (waitnotify) {
synchronized (waitnotify) {
while (notInterrupted > 0 && System.currentTimeMillis() - startTime <= waitTime) {
try {
waitnotify.wait(waitTime);
} catch (InterruptedException e) {