changeset 16037:7ee327a10059

8169231: Fix tests to add @compile --add-modules to workaround jtreg bug Reviewed-by: jjg
author mchung
date Fri, 04 Nov 2016 15:49:31 -0700
parents 93e7c16fd885
children 06195d1ca9ce
files test/ProblemList.txt test/com/sun/jndi/dns/Parser.java test/com/sun/jndi/rmi/registry/RegistryContext/ContextWithNullProperties.java test/java/lang/ClassLoader/platformClassLoader/DefinePlatformClass.java test/sun/security/ec/TestEC.java test/sun/security/mscapi/IsSunMSCAPIAvailable.java test/sun/security/pkcs11/ec/TestCurves.java test/tools/launcher/MiscTests.java
diffstat 8 files changed, 12 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/test/ProblemList.txt	Fri Nov 04 14:29:34 2016 -0700
+++ b/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/test/com/sun/jndi/dns/Parser.java	Fri Nov 04 14:29:34 2016 -0700
+++ b/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/test/com/sun/jndi/rmi/registry/RegistryContext/ContextWithNullProperties.java	Fri Nov 04 14:29:34 2016 -0700
+++ b/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/test/java/lang/ClassLoader/platformClassLoader/DefinePlatformClass.java	Fri Nov 04 14:29:34 2016 -0700
+++ b/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/test/sun/security/ec/TestEC.java	Fri Nov 04 14:29:34 2016 -0700
+++ b/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/test/sun/security/mscapi/IsSunMSCAPIAvailable.java	Fri Nov 04 14:29:34 2016 -0700
+++ b/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/test/sun/security/pkcs11/ec/TestCurves.java	Fri Nov 04 14:29:34 2016 -0700
+++ b/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/test/tools/launcher/MiscTests.java	Fri Nov 04 14:29:34 2016 -0700
+++ b/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();