usage of user modules leads to CNF if a test is run in agentvm, because jtreg doesn't communicate module path to agents.
A similar problem exists in driver actions, even in othervm execution mode, as DriverAction filters out --module-path and other related flags (rerun section, though, has them listed which made it hard to comprehend)
http://cr.openjdk.java.net/~iignatyev//jtreg/modules-in-agent/webrev.00.test contains tests that illustrate the issue. e.g. mainAction/usermods/RunUserMod, when run w/ -agentvm, fails due to:
java.lang.ClassNotFoundException: um1_p1.um1_p1_M1
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:466)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:563)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496)
at com.sun.javatest.regtest.agent.MainActionHelper.runClass(MainActionHelper.java:143)
at com.sun.javatest.regtest.agent.AgentServer.doMain(AgentServer.java:301)
at com.sun.javatest.regtest.agent.AgentServer.run(AgentServer.java:232)
at com.sun.javatest.regtest.agent.AgentServer.main(AgentServer.java:69)
JavaTest Message: main() method must be in a public class named
JavaTest Message: um1_p1.um1_p1_M1 in file um1_p1.um1_p1_M1.java
A similar problem exists in driver actions, even in othervm execution mode, as DriverAction filters out --module-path and other related flags (rerun section, though, has them listed which made it hard to comprehend)
http://cr.openjdk.java.net/~iignatyev//jtreg/modules-in-agent/webrev.00.test contains tests that illustrate the issue. e.g. mainAction/usermods/RunUserMod, when run w/ -agentvm, fails due to:
java.lang.ClassNotFoundException: um1_p1.um1_p1_M1
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:466)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:563)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496)
at com.sun.javatest.regtest.agent.MainActionHelper.runClass(MainActionHelper.java:143)
at com.sun.javatest.regtest.agent.AgentServer.doMain(AgentServer.java:301)
at com.sun.javatest.regtest.agent.AgentServer.run(AgentServer.java:232)
at com.sun.javatest.regtest.agent.AgentServer.main(AgentServer.java:69)
JavaTest Message: main() method must be in a public class named
JavaTest Message: um1_p1.um1_p1_M1 in file um1_p1.um1_p1_M1.java
- blocks
-
JDK-8211358 modularize test libraries
- New
- relates to
-
JDK-8263158 [TESTBUG] FAILED: runtime/cds/appcds/OldClassTest.java
- Closed
-
JDK-8267629 misc tests fail in 'othervm' mode and pass in 'agentvm' mode
- Closed