VMConnection runs debuggee using "test.classes" as a classpath for debuggee classes. It works fine when test and TestScaffold.java are located in the same directory and are both compiled into "test.classes" location. However, it causes test failures when the virtual thread factory (wrapper) is enabled and the test is not located in the same directory as TestScaffold. Such tests use TestScaffold as a testlibrary. (They have ' * @library ..' or something like similar).
So TestScaffold is not included in 'test.classes' which include tests only. However, it is included as all testlibrary classes in "test.class.path" classparth.
It is needed to use "test.class.path" to be able to use TestScaffolld as debugee wrapper. It might be better to always use "test.class.path" as classpath for debugee to minimize the difference between standard and "virtual" execution.
So TestScaffold is not included in 'test.classes' which include tests only. However, it is included as all testlibrary classes in "test.class.path" classparth.
It is needed to use "test.class.path" to be able to use TestScaffolld as debugee wrapper. It might be better to always use "test.class.path" as classpath for debugee to minimize the difference between standard and "virtual" execution.
- duplicates
-
JDK-8285423 [LOOM] com/sun/sde tests fail with the vthread wrapper due to using a custom classpath
-
- Closed
-