On Sat, 9 Mar 2024 05:27:43 GMT, Leonid Mesnik <lmes...@openjdk.org> wrote:

>> vmtestbase nsk/jdi tests run 2 processes: debugger and debugee.
>> There is not need to start  debugger in the separate process for each test. 
>> Also, no need to run it with "-Xcomp" because the main goal is to test 
>> debugee behavior with different VM flags.
>> This fix updates tests to run debugger as driver to optimize execution time.
>> The fix also eliminates System.exit() which is not compatible with 
>> driver/agentvm mode and update shared classes to correctly add classpath 
>> when running debugee.
>> There were few tests which still execute using othervm mode. They require 
>> some specific classpath/settings. 
>> Tested by running all tests, with '-Xcomp' and virtual thread test factory.
>
> Leonid Mesnik has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   reverted failing tests.

That's a more generic question. 
The driver and main (default mode) actions might be executed in 2 modes: 
agentvm or othervm. So each driver (or main)  action might reuse jvm or start a 
new one each time. This is controlled by -agetnvm flag in jtreg. While othervm 
mode in tests is used for tests that couldn't be executed in agentvm mode (use 
some specific VM options). We don't force /othrevm option in tests because 
something might be broken and affect other tests execution. (Really it means 
that every test that doesn't start new process should be othrevm).
Each time when we run jtreg in agentvm we allow tests to reuse the same JVM and 
taking risks of possible incosistency of the future tests execution. So if test 
manages to break some part of JVM/JDK (it might be thread state, compile, gc, 
debugger,classoader, java.util or javac) we have a risk that next tests have 
jdk in inconsistent state. 

I think that the debugger might be treated as any other component.  If we need 
more isolation then it is needed to use othervm mode for jtreg. 

And using of agentvm/othervm mode for VM testing might be separate topic.

I can do more testing in different modes to see if we have any new failures 
after update.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/18174#issuecomment-1998190351

Reply via email to