changeset 13816:232843a54696

8150998: Fix module dependences in java/lang tests Reviewed-by: mchung
author shurailine
date Thu, 03 Mar 2016 15:13:55 -0800
parents 721288127c82
children 70e358e75ba5
files test/java/lang/ProcessHandle/Basic.java test/java/lang/ProcessHandle/InfoTest.java test/java/lang/ProcessHandle/OnExitTest.java test/java/lang/ProcessHandle/TreeTest.java test/java/lang/StackWalker/StackStreamTest.java test/java/lang/System/Logger/Level/LoggerLevelTest.java test/java/lang/System/Logger/default/DefaultLoggerTest.java test/java/lang/System/LoggerFinder/DefaultLoggerFinderTest/DefaultLoggerFinderTest.java test/java/lang/System/LoggerFinder/internal/BootstrapLogger/BootstrapLoggerTest.java test/java/lang/System/LoggerFinder/internal/LoggerBridgeTest/LoggerBridgeTest.java test/java/lang/System/LoggerFinder/internal/PlatformLoggerBridgeTest/PlatformLoggerBridgeTest.java test/java/lang/System/LoggerFinder/internal/api/LoggerFinderAPITest.java test/java/lang/System/MacEncoding/TestFileEncoding.java test/java/lang/instrument/ManyMethodsBenchmarkAgent.java test/java/lang/instrument/RetransformAgent.java test/java/lang/invoke/lambda/LambdaAccessControlDoPrivilegedTest.java test/java/lang/invoke/lambda/LambdaAsm.java test/java/lang/invoke/lambda/LogGeneratedClassesTest.java test/java/lang/ref/CleanerTest.java
diffstat 19 files changed, 41 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/test/java/lang/ProcessHandle/Basic.java	Thu Mar 03 09:47:40 2016 -0800
+++ b/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/test/java/lang/ProcessHandle/InfoTest.java	Thu Mar 03 09:47:40 2016 -0800
+++ b/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/test/java/lang/ProcessHandle/OnExitTest.java	Thu Mar 03 09:47:40 2016 -0800
+++ b/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/test/java/lang/ProcessHandle/TreeTest.java	Thu Mar 03 09:47:40 2016 -0800
+++ b/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/test/java/lang/StackWalker/StackStreamTest.java	Thu Mar 03 09:47:40 2016 -0800
+++ b/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/test/java/lang/System/Logger/Level/LoggerLevelTest.java	Thu Mar 03 09:47:40 2016 -0800
+++ b/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/test/java/lang/System/Logger/default/DefaultLoggerTest.java	Thu Mar 03 09:47:40 2016 -0800
+++ b/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/test/java/lang/System/LoggerFinder/DefaultLoggerFinderTest/DefaultLoggerFinderTest.java	Thu Mar 03 09:47:40 2016 -0800
+++ b/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/test/java/lang/System/LoggerFinder/internal/BootstrapLogger/BootstrapLoggerTest.java	Thu Mar 03 09:47:40 2016 -0800
+++ b/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/test/java/lang/System/LoggerFinder/internal/LoggerBridgeTest/LoggerBridgeTest.java	Thu Mar 03 09:47:40 2016 -0800
+++ b/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/test/java/lang/System/LoggerFinder/internal/PlatformLoggerBridgeTest/PlatformLoggerBridgeTest.java	Thu Mar 03 09:47:40 2016 -0800
+++ b/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/test/java/lang/System/LoggerFinder/internal/api/LoggerFinderAPITest.java	Thu Mar 03 09:47:40 2016 -0800
+++ b/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/test/java/lang/System/MacEncoding/TestFileEncoding.java	Thu Mar 03 09:47:40 2016 -0800
+++ b/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/test/java/lang/instrument/ManyMethodsBenchmarkAgent.java	Thu Mar 03 09:47:40 2016 -0800
+++ b/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/test/java/lang/instrument/RetransformAgent.java	Thu Mar 03 09:47:40 2016 -0800
+++ b/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/test/java/lang/invoke/lambda/LambdaAccessControlDoPrivilegedTest.java	Thu Mar 03 09:47:40 2016 -0800
+++ b/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/test/java/lang/invoke/lambda/LambdaAsm.java	Thu Mar 03 09:47:40 2016 -0800
+++ b/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/test/java/lang/invoke/lambda/LogGeneratedClassesTest.java	Thu Mar 03 09:47:40 2016 -0800
+++ b/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/test/java/lang/ref/CleanerTest.java	Thu Mar 03 09:47:40 2016 -0800
+++ b/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:.