8150998: Fix module dependences in java/lang tests
authorshurailine
Thu, 03 Mar 2016 15:13:55 -0800
changeset 36237 963d1115678b
parent 36236 eec5770c5b01
child 36238 d8a9f24b8b38
8150998: Fix module dependences in java/lang tests Reviewed-by: mchung
jdk/test/java/lang/ProcessHandle/Basic.java
jdk/test/java/lang/ProcessHandle/InfoTest.java
jdk/test/java/lang/ProcessHandle/OnExitTest.java
jdk/test/java/lang/ProcessHandle/TreeTest.java
jdk/test/java/lang/StackWalker/StackStreamTest.java
jdk/test/java/lang/System/Logger/Level/LoggerLevelTest.java
jdk/test/java/lang/System/Logger/default/DefaultLoggerTest.java
jdk/test/java/lang/System/LoggerFinder/DefaultLoggerFinderTest/DefaultLoggerFinderTest.java
jdk/test/java/lang/System/LoggerFinder/internal/BootstrapLogger/BootstrapLoggerTest.java
jdk/test/java/lang/System/LoggerFinder/internal/LoggerBridgeTest/LoggerBridgeTest.java
jdk/test/java/lang/System/LoggerFinder/internal/PlatformLoggerBridgeTest/PlatformLoggerBridgeTest.java
jdk/test/java/lang/System/LoggerFinder/internal/api/LoggerFinderAPITest.java
jdk/test/java/lang/System/MacEncoding/TestFileEncoding.java
jdk/test/java/lang/instrument/ManyMethodsBenchmarkAgent.java
jdk/test/java/lang/instrument/RetransformAgent.java
jdk/test/java/lang/invoke/lambda/LambdaAccessControlDoPrivilegedTest.java
jdk/test/java/lang/invoke/lambda/LambdaAsm.java
jdk/test/java/lang/invoke/lambda/LogGeneratedClassesTest.java
jdk/test/java/lang/ref/CleanerTest.java
--- a/jdk/test/java/lang/ProcessHandle/Basic.java	Thu Mar 03 09:47:40 2016 -0800
+++ b/jdk/test/java/lang/ProcessHandle/Basic.java	Thu Mar 03 15:13:55 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -37,6 +37,7 @@
 /*
  * @test
  * @library /test/lib/share/classes
+ * @modules jdk.management
  * @run testng Basic
  * @summary Basic tests for ProcessHandler
  * @author Roger Riggs
--- a/jdk/test/java/lang/ProcessHandle/InfoTest.java	Thu Mar 03 09:47:40 2016 -0800
+++ b/jdk/test/java/lang/ProcessHandle/InfoTest.java	Thu Mar 03 15:13:55 2016 -0800
@@ -49,6 +49,7 @@
  * @test
  * @bug 8077350 8081566 8081567 8098852 8136597
  * @library /test/lib/share/classes
+ * @modules jdk.management
  * @build jdk.test.lib.Platform jdk.test.lib.Utils
  * @run testng InfoTest
  * @summary Functions of ProcessHandle.Info
--- a/jdk/test/java/lang/ProcessHandle/OnExitTest.java	Thu Mar 03 09:47:40 2016 -0800
+++ b/jdk/test/java/lang/ProcessHandle/OnExitTest.java	Thu Mar 03 15:13:55 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -39,6 +39,7 @@
 /*
  * @test
  * @library /test/lib/share/classes
+ * @modules jdk.management
  * @build jdk.test.lib.Platform jdk.test.lib.Utils
  * @run testng OnExitTest
  * @summary Functions of Process.onExit and ProcessHandle.onExit
--- a/jdk/test/java/lang/ProcessHandle/TreeTest.java	Thu Mar 03 09:47:40 2016 -0800
+++ b/jdk/test/java/lang/ProcessHandle/TreeTest.java	Thu Mar 03 15:13:55 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -45,6 +45,7 @@
 /*
  * @test
  * @library /test/lib/share/classes
+ * @modules jdk.management
  * @build jdk.test.lib.Utils
  * @run testng/othervm TreeTest
  * @summary Test counting and JavaChild.spawning and counting of Processes.
--- a/jdk/test/java/lang/StackWalker/StackStreamTest.java	Thu Mar 03 09:47:40 2016 -0800
+++ b/jdk/test/java/lang/StackWalker/StackStreamTest.java	Thu Mar 03 15:13:55 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,6 +33,7 @@
  * @test
  * @bug 8140450
  * @summary Stack Stream Test
+ * @modules java.logging
  * @run main/othervm StackStreamTest
  */
 public class StackStreamTest {
--- a/jdk/test/java/lang/System/Logger/Level/LoggerLevelTest.java	Thu Mar 03 09:47:40 2016 -0800
+++ b/jdk/test/java/lang/System/Logger/Level/LoggerLevelTest.java	Thu Mar 03 15:13:55 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -30,6 +30,7 @@
  * @bug 8140364
  * @summary Tests System.Logger.Level names and severity.
  * @author danielfuchs
+ * @modules java.logging
  */
 public class LoggerLevelTest {
     public static void main(String[] args) {
--- a/jdk/test/java/lang/System/Logger/default/DefaultLoggerTest.java	Thu Mar 03 09:47:40 2016 -0800
+++ b/jdk/test/java/lang/System/Logger/default/DefaultLoggerTest.java	Thu Mar 03 15:13:55 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -56,7 +56,7 @@
  * @summary Tests default loggers returned by System.getLogger, and in
  *          particular the implementation of the the System.Logger method
  *          performed by the default binding.
- *
+ * @modules java.logging
  * @build DefaultLoggerTest AccessSystemLogger
  * @run driver AccessSystemLogger
  * @run main/othervm -Xbootclasspath/a:boot DefaultLoggerTest NOSECURITY
--- a/jdk/test/java/lang/System/LoggerFinder/DefaultLoggerFinderTest/DefaultLoggerFinderTest.java	Thu Mar 03 09:47:40 2016 -0800
+++ b/jdk/test/java/lang/System/LoggerFinder/DefaultLoggerFinderTest/DefaultLoggerFinderTest.java	Thu Mar 03 15:13:55 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -52,6 +52,7 @@
  * @bug     8140364
  * @summary Tests the default implementation of System.Logger, when
  *          JUL is the default backend.
+ * @modules java.logging
  * @build AccessSystemLogger DefaultLoggerFinderTest
  * @run  driver AccessSystemLogger
  * @run  main/othervm -Xbootclasspath/a:boot DefaultLoggerFinderTest NOSECURITY
--- a/jdk/test/java/lang/System/LoggerFinder/internal/BootstrapLogger/BootstrapLoggerTest.java	Thu Mar 03 09:47:40 2016 -0800
+++ b/jdk/test/java/lang/System/LoggerFinder/internal/BootstrapLogger/BootstrapLoggerTest.java	Thu Mar 03 15:13:55 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -52,6 +52,7 @@
             Tests the behavior of bootstrap loggers (and SimpleConsoleLoggers
  *          too).
  * @modules java.base/jdk.internal.logger
+ *          java.logging
  * @build BootstrapLoggerUtils LogStream
  * @run main/othervm BootstrapLoggerTest NO_SECURITY
  * @run main/othervm BootstrapLoggerTest SECURE
--- a/jdk/test/java/lang/System/LoggerFinder/internal/LoggerBridgeTest/LoggerBridgeTest.java	Thu Mar 03 09:47:40 2016 -0800
+++ b/jdk/test/java/lang/System/LoggerFinder/internal/LoggerBridgeTest/LoggerBridgeTest.java	Thu Mar 03 15:13:55 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -58,7 +58,9 @@
  * @summary JDK implementation specific unit test for JDK internal artifacts.
  *          Tests all bridge methods with the a custom backend whose
  *          loggers implement PlatformLogger.Bridge.
- * @modules java.base/sun.util.logging java.base/jdk.internal.logger
+ * @modules java.base/sun.util.logging
+ *          java.base/jdk.internal.logger
+ *          java.logging
  * @build CustomSystemClassLoader LoggerBridgeTest
  * @run  main/othervm -Djava.system.class.loader=CustomSystemClassLoader LoggerBridgeTest NOSECURITY
  * @run  main/othervm -Djava.system.class.loader=CustomSystemClassLoader LoggerBridgeTest NOPERMISSIONS
--- a/jdk/test/java/lang/System/LoggerFinder/internal/PlatformLoggerBridgeTest/PlatformLoggerBridgeTest.java	Thu Mar 03 09:47:40 2016 -0800
+++ b/jdk/test/java/lang/System/LoggerFinder/internal/PlatformLoggerBridgeTest/PlatformLoggerBridgeTest.java	Thu Mar 03 15:13:55 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -57,6 +57,7 @@
  *          Tests all bridge methods from PlatformLogger with the a custom
  *          backend whose loggers implement PlatformLogger.Bridge.
  * @modules java.base/sun.util.logging
+ *          java.logging
  * @build CustomSystemClassLoader PlatformLoggerBridgeTest
  * @run  main/othervm -Djava.system.class.loader=CustomSystemClassLoader PlatformLoggerBridgeTest NOSECURITY
  * @run  main/othervm -Djava.system.class.loader=CustomSystemClassLoader PlatformLoggerBridgeTest NOPERMISSIONS
--- a/jdk/test/java/lang/System/LoggerFinder/internal/api/LoggerFinderAPITest.java	Thu Mar 03 09:47:40 2016 -0800
+++ b/jdk/test/java/lang/System/LoggerFinder/internal/api/LoggerFinderAPITest.java	Thu Mar 03 15:13:55 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -29,6 +29,7 @@
  *          Tests the consistency of the LoggerFinder and JDK extensions.
  * @modules java.base/sun.util.logging
  *          java.base/jdk.internal.logger
+ *          java.logging
  * @run  main LoggerFinderAPITest
  */
 
--- a/jdk/test/java/lang/System/MacEncoding/TestFileEncoding.java	Thu Mar 03 09:47:40 2016 -0800
+++ b/jdk/test/java/lang/System/MacEncoding/TestFileEncoding.java	Thu Mar 03 15:13:55 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
  * @bug 8011194
  * @summary Test value of file.encoding for corresponding value of LANG, etc
  * @library ../../../../tools/launcher/ ../
+ * @modules jdk.compiler
  * @build TestHelper TestFileEncoding ExpectedEncoding
  * @run main TestFileEncoding UTF-8
  * @run main/othervm -Dfile.encoding=MyEncoding -DuserEncoding=MyEncoding TestFileEncoding MyEncoding
--- a/jdk/test/java/lang/instrument/ManyMethodsBenchmarkAgent.java	Thu Mar 03 09:47:40 2016 -0800
+++ b/jdk/test/java/lang/instrument/ManyMethodsBenchmarkAgent.java	Thu Mar 03 15:13:55 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,9 +27,8 @@
  * @summary Tests and benchmarks the JVMTI RedefineClasses when a
  *          single class (and its parent) contains many methods.
  *
- * @modules java.compiler
+ * @modules jdk.compiler
  *          java.instrument
- *          jdk.compiler
  * @run build ManyMethodsBenchmarkApp ManyMethodsBenchmarkAgent
  * @run shell MakeJAR3.sh ManyMethodsBenchmarkAgent 'Can-Retransform-Classes: true'
  * @run main/othervm -javaagent:ManyMethodsBenchmarkAgent.jar ManyMethodsBenchmarkApp
--- a/jdk/test/java/lang/instrument/RetransformAgent.java	Thu Mar 03 09:47:40 2016 -0800
+++ b/jdk/test/java/lang/instrument/RetransformAgent.java	Thu Mar 03 15:13:55 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
  * @author Robert Field, Sun Microsystems
  *
  * @modules java.base/jdk.internal.org.objectweb.asm
+ *          java.instrument
  * @run shell/timeout=240 MakeJAR2.sh RetransformAgent RetransformApp 'Can-Retransform-Classes: true'
  * @run main/othervm -javaagent:RetransformAgent.jar RetransformApp
  */
--- a/jdk/test/java/lang/invoke/lambda/LambdaAccessControlDoPrivilegedTest.java	Thu Mar 03 09:47:40 2016 -0800
+++ b/jdk/test/java/lang/invoke/lambda/LambdaAccessControlDoPrivilegedTest.java	Thu Mar 03 15:13:55 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
  * @summary tests DoPrivileged action (implemented as lambda expressions) by
  * inserting them into the BootClassPath.
  * @modules jdk.compiler
+ *          jdk.zipfs
  * @compile -XDignore.symbol.file LambdaAccessControlDoPrivilegedTest.java LUtils.java
  * @run main/othervm LambdaAccessControlDoPrivilegedTest
  */
--- a/jdk/test/java/lang/invoke/lambda/LambdaAsm.java	Thu Mar 03 09:47:40 2016 -0800
+++ b/jdk/test/java/lang/invoke/lambda/LambdaAsm.java	Thu Mar 03 15:13:55 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
  * generate  bytecodes with correct constant pool references
  * @modules java.base/jdk.internal.org.objectweb.asm
  *          jdk.jdeps/com.sun.tools.classfile
+ *          jdk.zipfs
  * @compile -XDignore.symbol.file LambdaAsm.java LUtils.java
  * @run main/othervm LambdaAsm
  */
--- a/jdk/test/java/lang/invoke/lambda/LogGeneratedClassesTest.java	Thu Mar 03 09:47:40 2016 -0800
+++ b/jdk/test/java/lang/invoke/lambda/LogGeneratedClassesTest.java	Thu Mar 03 15:13:55 2016 -0800
@@ -26,6 +26,8 @@
  * @bug 8023524
  * @summary tests logging generated classes for lambda
  * @library /java/nio/file
+ * @modules jdk.compiler
+ *          jdk.zipfs
  * @run testng LogGeneratedClassesTest
  */
 import java.io.File;
--- a/jdk/test/java/lang/ref/CleanerTest.java	Thu Mar 03 09:47:40 2016 -0800
+++ b/jdk/test/java/lang/ref/CleanerTest.java	Thu Mar 03 15:13:55 2016 -0800
@@ -52,7 +52,10 @@
  * @library /test/lib/share/classes /lib/testlibrary /test/lib
  * @build sun.hotspot.WhiteBox
  * @build jdk.test.lib.Utils
- * @modules java.base/jdk.internal.misc java.base/jdk.internal.ref
+ * @modules java.base/jdk.internal
+ *          java.base/jdk.internal.misc
+ *          java.base/jdk.internal.ref
+ *          java.management
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  * @run testng/othervm
  *      -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.