[9] RFR:8078813:Test JAAS with modules

Alan Bateman Alan.Bateman at oracle.com
Thu Oct 15 08:26:51 UTC 2015

On 15/10/2015 08:47, Wang Weijun wrote:
> Looks fine, and very interesting.
> Just some questions:
> 1. expectedResult is PASS in all test runs. Do you think it would be something else? Maybe compiler error and jar creation error? Could that happen?
> 2. Are the .class files always the same? If so, is it possible to compile them once, and use them to create different jars? In fact, maybe you don't need to create jars every time. It looks like UN_NAMED and AUTO use the same jar, and if only clientModuleType changes there is no need to recreate service jar.
> 3. UN_NAMED looks strange, maybe UNNAMED?
> 4. Very tiny concern, but you are looking for "No LoginModule found" in output messages. We have some bugs complaining certain text not found if test is not running in an English locale. Is there a way to avoid looking for these exact words? Or maybe you can just add "-Duser.language=en -Duser.region=US" to @main.
> 5. JigsawCommon.createModularjar() is quite useful. Maybe you can add it into test/jdk/jigsaw/lib/JarUtils.java?
Have you decided where these tests will be replaced? I assume 
test/java/security/jigsaw is temporary and you are scouting out a home 
under test/javax/security/auth/login, right?

In time then jtreg will have support for tests that are modules so it 
should help with tests like this.

I agree with your comment about renaming UN_NAMED to NAMED, I assume 
STRICT should be renamed to EXPLICIT too.

On JarUtils then if the test writes the module-info.class in the right 
location then it should just work. For the explicit module case I expect 
it should just work when exploded on the file system too, it doesn't 
strictly need to be a modular JAR.


More information about the security-dev mailing list