8169231: Fix tests to add @compile --add-modules to workaround jtreg bug
authormchung
Fri, 04 Nov 2016 15:49:31 -0700
changeset 41915 ffd2dc160173
parent 41914 b09ce4c1536e
child 41916 eb4aa81c6c5f
8169231: Fix tests to add @compile --add-modules to workaround jtreg bug Reviewed-by: jjg
jdk/test/ProblemList.txt
jdk/test/com/sun/jndi/dns/Parser.java
jdk/test/com/sun/jndi/rmi/registry/RegistryContext/ContextWithNullProperties.java
jdk/test/java/lang/ClassLoader/platformClassLoader/DefinePlatformClass.java
jdk/test/sun/security/ec/TestEC.java
jdk/test/sun/security/mscapi/IsSunMSCAPIAvailable.java
jdk/test/sun/security/pkcs11/ec/TestCurves.java
jdk/test/tools/launcher/MiscTests.java
--- a/jdk/test/ProblemList.txt	Fri Nov 04 14:29:34 2016 -0700
+++ b/jdk/test/ProblemList.txt	Fri Nov 04 15:49:31 2016 -0700
@@ -184,6 +184,8 @@
 java/nio/file/WatchService/MayFlies.java                        7158947 solaris-all Solaris 11
 java/nio/file/WatchService/LotsOfEvents.java                    7158947 solaris-all Solaris 11
 
+sun/nio/cs/OLD/TestIBMDB.java                                   8167525 generic-all
+
 ############################################################################
 
 # jdk_rmi
--- a/jdk/test/com/sun/jndi/dns/Parser.java	Fri Nov 04 14:29:34 2016 -0700
+++ b/jdk/test/com/sun/jndi/dns/Parser.java	Fri Nov 04 15:49:31 2016 -0700
@@ -26,6 +26,7 @@
  * @bug 8035105
  * @summary DNS resource record parsing
  * @modules jdk.naming.dns/com.sun.jndi.dns
+ * @compile --add-modules jdk.naming.dns Parser.java
  */
 
 import com.sun.jndi.dns.ResourceRecord;
--- a/jdk/test/com/sun/jndi/rmi/registry/RegistryContext/ContextWithNullProperties.java	Fri Nov 04 14:29:34 2016 -0700
+++ b/jdk/test/com/sun/jndi/rmi/registry/RegistryContext/ContextWithNullProperties.java	Fri Nov 04 15:49:31 2016 -0700
@@ -28,7 +28,7 @@
  * @modules jdk.naming.rmi/com.sun.jndi.rmi.registry java.rmi/sun.rmi.registry
  *     java.rmi/sun.rmi.server java.rmi/sun.rmi.transport java.rmi/sun.rmi.transport.tcp
  * @library ../../../../../../java/rmi/testlibrary
- * @build TestLibrary
+ * @compile --add-modules jdk.naming.rmi ContextWithNullProperties.java
  * @run main ContextWithNullProperties
  */
 
--- a/jdk/test/java/lang/ClassLoader/platformClassLoader/DefinePlatformClass.java	Fri Nov 04 14:29:34 2016 -0700
+++ b/jdk/test/java/lang/ClassLoader/platformClassLoader/DefinePlatformClass.java	Fri Nov 04 15:49:31 2016 -0700
@@ -24,8 +24,9 @@
 /*
  * @test
  * @summary Test java.* class defined by the platform class loader
- * @build jdk.zipfs/java.fake.Fake
  * @modules jdk.zipfs/java.fake
+ * @build   jdk.zipfs/java.fake.Fake
+ * @compile --add-modules jdk.zipfs DefinePlatformClass.java
  * @run main DefinePlatformClass
  */
 
--- a/jdk/test/sun/security/ec/TestEC.java	Fri Nov 04 14:29:34 2016 -0700
+++ b/jdk/test/sun/security/ec/TestEC.java	Fri Nov 04 15:49:31 2016 -0700
@@ -35,7 +35,7 @@
  * @library ../pkcs11/sslecc
  * @library ../../../java/security/testlibrary
  * @modules jdk.crypto.pkcs11/sun.security.pkcs11.wrapper
- * @compile -XDignore.symbol.file TestEC.java
+ * @compile --add-modules jdk.crypto.pkcs11 TestEC.java
  * @run main/othervm -Djdk.tls.namedGroups="secp256r1,sect193r1" TestEC
  * @run main/othervm/java.security.policy=TestEC.policy -Djdk.tls.namedGroups="secp256r1,sect193r1" TestEC
  */
--- a/jdk/test/sun/security/mscapi/IsSunMSCAPIAvailable.java	Fri Nov 04 14:29:34 2016 -0700
+++ b/jdk/test/sun/security/mscapi/IsSunMSCAPIAvailable.java	Fri Nov 04 15:49:31 2016 -0700
@@ -26,6 +26,7 @@
  * @bug 6318171 6931562
  * @requires os.family == "windows"
  * @modules jdk.crypto.mscapi/sun.security.mscapi
+ * @compile --add-modules jdk.crypto.mscapi IsSunMSCAPIAvailable.java
  * @run main/othervm IsSunMSCAPIAvailable
  */
 
--- a/jdk/test/sun/security/pkcs11/ec/TestCurves.java	Fri Nov 04 14:29:34 2016 -0700
+++ b/jdk/test/sun/security/pkcs11/ec/TestCurves.java	Fri Nov 04 15:49:31 2016 -0700
@@ -28,7 +28,7 @@
  * @author Andreas Sterbenz
  * @library ..
  * @modules jdk.crypto.pkcs11/sun.security.pkcs11.wrapper
- * @compile -XDignore.symbol.file TestCurves.java
+ * @compile --add-modules jdk.crypto.pkcs11 TestCurves.java
  * @run main/othervm TestCurves
  * @run main/othervm TestCurves sm
  * @key randomness
--- a/jdk/test/tools/launcher/MiscTests.java	Fri Nov 04 14:29:34 2016 -0700
+++ b/jdk/test/tools/launcher/MiscTests.java	Fri Nov 04 15:49:31 2016 -0700
@@ -69,8 +69,6 @@
     static void test6856415() throws IOException {
 
         final String mainClass = "Foo6856415";
-        final String exportOpts
-            = "--add-exports=jdk.crypto.pkcs11/sun.security.pkcs11=ALL-UNNAMED";
 
         List<String> scratch = new ArrayList<>();
         scratch.add("public class Foo6856415 {");
@@ -81,7 +79,9 @@
         scratch.add("}");
         createFile(new File(mainClass + ".java"), scratch);
 
-        compile(mainClass + ".java", exportOpts);
+        compile(mainClass + ".java",
+                "--add-modules=jdk.crypto.pkcs11",
+                "--add-exports=jdk.crypto.pkcs11/sun.security.pkcs11=ALL-UNNAMED");
 
         File testJar = new File("Foo.jar");
         testJar.delete();