This may be operator error in not being intimately familiar with jtreg, but I tried to use the rerun string from a JTREG run.
My jtreg test includes (note the @modules line):
* @library /lib/testlibrary
* @library /java/security/modules
* @modules java.base/jdk.internal.module
* @build CompilerUtils JarUtils
* @run testng TestJCEProviderModularTest
It failed with:
java.lang.IllegalAccessError: class ModularTest (in unnamed module @0x63a270c9) cannot access class jdk.internal.module.ModuleInfoWriter (in module java.base) because module java.base does not export jdk.internal.module to unnamed module @0x63a270c9
adding a:
% diff doit.sh doit-test.sh
25a26
> --add-exports java.base/jdk.internal.module=ALL-UNNAMED \
took care of the problem.
It does include:
-Dtest.modules=java.base/jdk.internal.module \
but this doesn't seem to allow for the access.
My jtreg test includes (note the @modules line):
* @library /lib/testlibrary
* @library /java/security/modules
* @modules java.base/jdk.internal.module
* @build CompilerUtils JarUtils
* @run testng TestJCEProviderModularTest
It failed with:
java.lang.IllegalAccessError: class ModularTest (in unnamed module @0x63a270c9) cannot access class jdk.internal.module.ModuleInfoWriter (in module java.base) because module java.base does not export jdk.internal.module to unnamed module @0x63a270c9
adding a:
% diff doit.sh doit-test.sh
25a26
> --add-exports java.base/jdk.internal.module=ALL-UNNAMED \
took care of the problem.
It does include:
-Dtest.modules=java.base/jdk.internal.module \
but this doesn't seem to allow for the access.