-
Enhancement
-
Resolution: Fixed
-
P4
-
25
-
master
There is nsk/jdi superclass called JDIBase that many tests inherit from. It provides common functionality like log support, basic event handling, support for setting a breakpoint, and support for the communcation breakpoint that the debugger and debuggee used to synchronize with. addthreadfilter001 does not inherit from JDIBase and instead implements all this functionality in the test. The reason is because it provides a slightly modified version of the JDIBase.breakpointForCommunication() method.
} else if (event instanceof ThreadStartEvent) {
// It might be the case that while the thread start request was enabled
// some threads not related to the test ( e.g. JVMCI threads) were started
// and generated thread start events. We ignore these thread start events
// and keep waiting for a breakpoint event.
ThreadStartEvent tse = (ThreadStartEvent) event;
log2("ThreadStartEvent is received while waiting for a breakpoint" +
" event, thread: : " + tse.thread().name());
continue;
}
However, this code seems to predate adding similar code to the JDIBase version of breakpointForCommunication():
if (EventFilters.filtered(event)) {
// We filter out spurious ThreadStartEvents
continue;
}
This test should use JDIBase and get rid of all the overrides it has in place, and also be updated to use the new JDIBase.breakpointForCommunication() method.
} else if (event instanceof ThreadStartEvent) {
// It might be the case that while the thread start request was enabled
// some threads not related to the test ( e.g. JVMCI threads) were started
// and generated thread start events. We ignore these thread start events
// and keep waiting for a breakpoint event.
ThreadStartEvent tse = (ThreadStartEvent) event;
log2("ThreadStartEvent is received while waiting for a breakpoint" +
" event, thread: : " + tse.thread().name());
continue;
}
However, this code seems to predate adding similar code to the JDIBase version of breakpointForCommunication():
if (EventFilters.filtered(event)) {
// We filter out spurious ThreadStartEvents
continue;
}
This test should use JDIBase and get rid of all the overrides it has in place, and also be updated to use the new JDIBase.breakpointForCommunication() method.
- relates to
-
JDK-8222667 vmTestbase/nsk/jdi/ThreadStartRequest/addThreadFilter/addthreadfilter002/TestDescription.java failed with "event IS NOT a breakpoint"
-
- Resolved
-
-
JDK-8355071 Fix nsk/jdi test to not require lookup of main thread in order to set the breakpoint used for communication
-
- Resolved
-
- links to
-
Commit(master) openjdk/jdk/77f5a246
-
Review(master) openjdk/jdk/24812