RFR(M): 8078896: Add @modules as needed to the jdk_svc tests

Yekaterina Kantserova yekaterina.kantserova at oracle.com
Tue May 5 09:04:20 UTC 2015


Could I please have a review of this fix.

bug: https://bugs.openjdk.java.net/browse/JDK-8078896
webrev: http://cr.openjdk.java.net/~ykantser/8078896

The push will be pushed to jdk9/dev.


Alan's clarification from same change in hotspot (RFR: JDK-8075586: add 
@modules as needed to the open hotspot tests)

Just to put more context on this patch and similar patches that will be 
proposed for tests in other repos. The new @modules tag can be used for 
test selection (e.g. no point running a test that make use of types in 
module java.management if the runtime under test does not have the 
management module), and additionally to declare a dependency on 
JDK-internal APIs. If my test uses sun.misc.Unsafe for example then the 
runtime under test needs to export that API for the test to compile and 
run. Clearly the latter requires the module system in JDK 9 so consider 
this part as just preparing the tests for when that day comes.

One other thing to say to say is that Alex has tooling to examine the 
test tree and create or change the @modules tag as needed. The intention 
is that this should run periodically to refresh the @modules tags. In 
this period before the module system then we can't expect everyone that 
is adding or changing tests to have internalized the module graph [1] 
and furthermore know which APIs are exported or not. In other words, the 
intention is not to needlessly burden anyone that adds or changes tests.

Clearly making use of a new jtreg tag means everyone with a local copy 
of jtreg should grab a recent build.

Finally, I hope in time that the TEST.groups files can be cleaned up to 
remove the needs_* groups, this is important for the group definitions 
in the jdk repo mostly (but there are some in the hotspot TEST.groups too).


More information about the core-libs-dev mailing list