Skip to content

Commit

Permalink
8310551: vmTestbase/nsk/jdb/interrupt/interrupt001/interrupt001.java …
Browse files Browse the repository at this point in the history
…timed out due to missing prompt

Reviewed-by: kevinw, sspitsyn
  • Loading branch information
plummercj committed Jul 14, 2023
1 parent 0d2196f commit c84866a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
2 changes: 0 additions & 2 deletions test/hotspot/jtreg/ProblemList.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -89,7 +89,7 @@ public static int run(String argv[], PrintStream out) {
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;

Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -56,8 +56,8 @@ public void run() {
lock.wait();
}
} catch (InterruptedException e) {
notInterrupted.decrementAndGet();
synchronized (waitnotify) {
notInterrupted--;
waitnotify.notify();
}
}
Expand All @@ -83,7 +83,7 @@ static void breakHere () {}
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) {

Expand Down Expand Up @@ -122,8 +122,8 @@ public int runIt(String args[], PrintStream out) {

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) {
Expand Down

4 comments on commit c84866a

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@openjdk
Copy link

@openjdk openjdk bot commented on c84866a Jul 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@plummercj Could not automatically backport c84866ac to openjdk/jdk17u due to conflicts in the following files:

  • test/hotspot/jtreg/ProblemList.txt

Please fetch the appropriate branch/commit and manually resolve these conflicts by using the following commands in your personal fork of openjdk/jdk17u. Note: these commands are just some suggestions and you can use other equivalent commands you know.

# Fetch the up-to-date version of the target branch
$ git fetch --no-tags https://git.openjdk.org/jdk17u.git master:master

# Check out the target branch and create your own branch to backport
$ git checkout master
$ git checkout -b plummercj-backport-c84866ac

# Fetch the commit you want to backport
$ git fetch --no-tags https://git.openjdk.org/jdk.git c84866ac0dcda487fe2abc2a8841f237df0a395b

# Backport the commit
$ git cherry-pick --no-commit c84866ac0dcda487fe2abc2a8841f237df0a395b
# Resolve conflicts now

# Commit the files you have modified
$ git add files/with/resolved/conflicts
$ git commit -m 'Backport c84866ac0dcda487fe2abc2a8841f237df0a395b'

Once you have resolved the conflicts as explained above continue with creating a pull request towards the openjdk/jdk17u with the title Backport c84866ac0dcda487fe2abc2a8841f237df0a395b.

@plummercj
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/backport jdk21

@openjdk
Copy link

@openjdk openjdk bot commented on c84866a Jul 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@plummercj the backport was successfully created on the branch plummercj-backport-c84866ac in my personal fork of openjdk/jdk21. To create a pull request with this backport targeting openjdk/jdk21:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit c84866ac from the openjdk/jdk repository.

The commit being backported was authored by Chris Plummer on 14 Jul 2023 and was reviewed by Kevin Walls and Serguei Spitsyn.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk21:

$ git fetch https://github.com/openjdk-bots/jdk21.git plummercj-backport-c84866ac:plummercj-backport-c84866ac
$ git checkout plummercj-backport-c84866ac
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk21.git plummercj-backport-c84866ac

Please sign in to comment.