8149391: Fix module dependences in java/util tests

Reviewed-by: mchung
This commit is contained in:
Alexandre Iline 2016-02-08 18:14:48 -08:00
parent 915de61609
commit 451a576a42
38 changed files with 81 additions and 35 deletions

View File

@ -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
@ -25,6 +25,8 @@
* @test
* @bug 8072909
* @library /lib/testlibrary /test/lib
* @modules java.management
* java.base/jdk.internal
* @build jdk.testlibrary.*
* @build TimSortStackSize2
* @run main ClassFileInstaller sun.hotspot.WhiteBox

View File

@ -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
@ -25,6 +25,7 @@
* @test
* @bug 6902861
* @summary Test for a workaround when WEEK_OF_YEAR and YEAR are out of sync.
* @modules jdk.localedata
*/
import java.util.*;

View File

@ -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
@ -26,6 +26,7 @@
* @bug 8004489 8006509 8008577
* @summary Unit test for CLDR FormatData resources
* @modules java.base/sun.util.locale.provider
* jdk.localedata
* @compile -XDignore.symbol.file CldrFormatNamesTest.java
* @run main/othervm -Djava.locale.providers=CLDR CldrFormatNamesTest
*/

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 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
@ -26,6 +26,7 @@
* @bug 8001562
* @summary Verify that getAvailableLocales() in locale sensitive services
* classes return compatible set of locales as in JDK7.
* @modules jdk.localedata
* @run main Bug8001562
*/

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 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
@ -24,6 +24,7 @@
* @test
* @bug 4944561
* @summary Test hashCode() to have less than 10% of hash code conflicts.
* @modules jdk.localedata
*/
import java.util.*;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 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
@ -26,6 +26,8 @@
* @summary Basic acceptance test for international J2RE. Verifies that the
* most important locale data and character converters exist and are
* minimally functional.
* @modules jdk.localedata
* jdk.charsets
* @run main/othervm -Djava.locale.providers=JRE,SPI InternationalBAT
*/

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 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
@ -46,6 +46,7 @@ import java.util.Set;
* @bug 6875847 6992272 7002320 7015500 7023613 7032820 7033504 7004603
* 7044019 8008577
* @summary test API changes to Locale
* @modules jdk.localedata
* @compile LocaleEnhanceTest.java
* @run main/othervm -Djava.locale.providers=JRE,SPI -esa LocaleEnhanceTest
*/

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 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 @@
* 4147315 4147317 4147552 4335196 4778440 4940539 5010672 6475525 6544471 6627549
* 6786276 7066203 7085757 8008577 8030696
* @summary test Locales
* @modules jdk.localedata
* @run main/othervm -Djava.locale.providers=JRE,SPI LocaleTest
*/
/*

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 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
@ -24,7 +24,7 @@
* @test
* @bug 4474409
* @author John O'Conner
*
* @modules jdk.localedata
*/
import java.util.*;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 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
@ -26,6 +26,7 @@
* @summary Make sure that getBundle doesn't cause a security error
* with a security manager when instantialing RBClassLoader (internal
* classloader).
* @modules java.xml
* @run main/othervm Bug6359330
*/

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 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
@ -24,6 +24,7 @@
* @bug 6530694
* @summary Checks that sun.util.CoreResourceBundleControl does not apply
* to the application provided Swing resources.
* @modules java.desktop
* @run main/othervm -Djava.awt.headless=true Bug6530694
*/

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 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 @@
* 8072722
* @summary Basic tests of java.util.Scanner methods
* @key randomness
* @modules jdk.localedata
* @run main/othervm ScanTest
*/

View File

@ -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
@ -24,6 +24,7 @@
/*
* @test
* @bug 8005471 8008577 8129881 8130845 8136518
* @modules jdk.localedata
* @run main/othervm -Djava.locale.providers=CLDR CLDRDisplayNamesTest
* @summary Make sure that localized time zone names of CLDR are used
* if specified.

View File

@ -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
@ -46,6 +46,7 @@ import java.util.stream.Stream;
* @run testng/timeout=1200 ConcurrentAssociateTest
* @summary Test that association operations, such as put and compute,
* place entries in the map
* @modules java.management
*/
@Test
public class ConcurrentAssociateTest {

View File

@ -37,6 +37,7 @@
* @key intermittent
* @summary Basic tests for Phaser
* @author Chris Hegarty
* @modules java.management
*/
import static java.util.concurrent.TimeUnit.MILLISECONDS;

View File

@ -35,6 +35,7 @@
* @test
* @bug 8074773
* @summary Stress test looks for lost unparks
* @modules java.management
* @run main/timeout=1200 ParkLoops
*/

View File

@ -36,6 +36,7 @@
/*
* @test
* @summary JSR-166 tck tests
* @modules java.management
* @build *
* @run junit/othervm/timeout=1000 -Djsr166.testImplementationDetails=true JSR166TestCase
*/

View File

@ -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
@ -33,6 +33,7 @@ import sun.util.logging.PlatformLogger;
* @summary Add loggers to custom log manager
*
* @modules java.base/sun.util.logging
* java.logging
* @compile -XDignore.symbol.file CustomLogManagerTest.java CustomLogManager.java
* @run main/othervm -Djava.util.logging.manager=CustomLogManager CustomLogManagerTest
*/

View File

@ -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
@ -34,6 +34,8 @@ import java.util.Map;
* @bug 8010939
* @summary check for deadlock between findLogger() and drainLoggerRefQueueBounded()
* @author jim.gish@oracle.com
* @modules java.logging
* java.management
* @build DrainFindDeadlockTest
* @run main/othervm DrainFindDeadlockTest
* @key randomness

View File

@ -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
@ -46,6 +46,8 @@ import java.util.logging.Logger;
* focuses more particularly on potential deadlock in
* drainLoggerRefQueueBounded / readConfiguration / reset
* todo: add at randomness
* @modules java.logging
* java.management
* @run main/othervm TestConfigurationLock
* @author danielfuchs
*/

View File

@ -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
@ -36,6 +36,7 @@ import java.util.logging.LoggingPermission;
* @bug 8026499
* @summary checks that Logger.getLogger("").setLevel() is working correctly.
* @modules java.base/sun.util.logging
* java.logging
* @build TestRootLoggerLevel
* @run main/othervm -Dtest.security=on TestRootLoggerLevel
* @run main/othervm -Dtest.security=off TestRootLoggerLevel

View File

@ -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
@ -44,6 +44,8 @@ import jdk.internal.misc.SharedSecrets;
* @summary check that when LogManager is initialized, a deadlock similar
* to that described in 8065709 will not occur.
* @modules java.base/jdk.internal.misc
* java.logging
* java.management
* @run main/othervm LogManagerAppContextDeadlock UNSECURE
* @run main/othervm LogManagerAppContextDeadlock SECURE
*

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 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 Deadlock between LogManager.<clinit> and Logger.getLogger()
* @author Daniel D. Daugherty
* @modules java.base/sun.util.logging
* java.logging
* @compile -XDignore.symbol.file LoggingDeadlock4.java
* @run main/othervm/timeout=15 LoggingDeadlock4
*/

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 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,7 +27,8 @@
*
* @summary Basic Test for LoggingMXBean via MBeanServer
* @author Ron Mann
*
* @modules java.logging
* java.management
* @build LoggingMXBeanTest
* @run main LoggingMXBeanTest
*/

View File

@ -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
@ -43,6 +43,7 @@ import jdk.internal.misc.SharedSecrets;
* @summary Tests that setting .level=FINEST for the root logger in logging
* configuration file does work.
* @modules java.base/jdk.internal.misc
* java.logging
* @run main/othervm RootLevelInConfigFile
*
* @author danielfuchs

View File

@ -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
@ -32,6 +32,7 @@ import sun.util.logging.PlatformLogger;
* logger (see the subclassing information in the Logger class specification)
*
* @modules java.base/sun.util.logging
* java.logging
* @compile -XDignore.symbol.file CustomLogManager.java SimpleLogManager.java
* @run main/othervm -Djava.util.logging.manager=SimpleLogManager SimpleLogManager
*/

View File

@ -0,0 +1 @@
modules = java.logging

View File

@ -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
@ -43,6 +43,7 @@ import jdk.internal.misc.SharedSecrets;
* LogManager.getLogManager().getLogger
*
* @modules java.base/jdk.internal.misc
* java.logging
* @run main/othervm -Dtest.security=off TestAppletLoggerContext LoadingApplet
* @run main/othervm -Dtest.security=on TestAppletLoggerContext LoadingApplet
* @run main/othervm -Dtest.security=off TestAppletLoggerContext LoadingMain

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2014, 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
@ -36,6 +36,7 @@ import jdk.internal.misc.SharedSecrets;
* @summary NPE with logging while launching webstart
*
* @modules java.base/jdk.internal.misc
* java.logging
* @build TestGetLoggerNPE
* @run main/othervm TestGetLoggerNPE getLogger
* @run main/othervm TestGetLoggerNPE getLogManager

View File

@ -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
@ -38,6 +38,8 @@ import java.util.logging.Logger;
* @summary Synchronization issues in Logger and LogManager. This test
* focusses more particularly on potential deadlock in
* drainLoggerRefQueueBounded / readConfiguration
* @modules java.logging
* java.management
* @run main/othervm TestLogConfigurationDeadLock
* @author danielfuchs
*/

View File

@ -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
@ -44,6 +44,8 @@ import java.util.logging.Logger;
* @bug 8027670 8029281
* @summary Deadlock in drainLoggerRefQueueBounded / readConfiguration
* caused by synchronization issues in Logger and LogManager.
* @modules java.logging
* java.management
* @run main/othervm TestLogConfigurationDeadLockWithConf
* @author danielfuchs
* @key randomness

View File

@ -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
@ -53,6 +53,8 @@ import java.util.logging.Logger;
* java/util/logging/Logger/setResourceBundle/TestSetResourceBundle.java.
* Note that this is a best effort test. Running it in a loop to
* reproduce intermittent issues can be a good idea.
* @modules java.logging
* java.management
* @run main/othervm TestLoggerBundleSync
* @author danielfuchs
*/

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 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 @@ import sun.tools.attach.HotSpotVirtualMachine;
* @summary Check for WeakReference leak in Logger and anonymous Logger objects
* @library /lib/testlibrary
* @modules jdk.attach/sun.tools.attach
* java.logging
* @build jdk.testlibrary.ProcessTools
* @run main/othervm TestLoggerWeakRefLeak Logger
* @run main/othervm TestLoggerWeakRefLeak AnonymousLogger

View File

@ -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
@ -31,6 +31,8 @@ import javax.imageio.ImageIO;
* @summary Test that the default user context is used when in the main
* application context. This test must not be run in same VM or agent
* VM mode: it would not test the intended behavior.
* @modules java.desktop
* java.logging
* @run main/othervm TestLoggingWithMainAppContext
*/
public class TestLoggingWithMainAppContext {

View File

@ -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
@ -31,6 +31,7 @@ import sun.awt.SunToolkit;
* @summary checks that calling getLogger() from a Thread whose ThreadGroup is
* a child of the main root group doesn't throw an exception.
* @modules java.desktop/sun.awt
* java.logging
* @build TestMainAppContext
* @run main/othervm TestMainAppContext
* @author danielfuchs

View File

@ -0,0 +1 @@
modules = java.prefs

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2009, 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
@ -25,6 +25,7 @@
* @test
* @bug 4244499 4532049 4700978 4820807 4980042
* @summary Test ZipInputStream, ZipOutputStream and ZipFile with non-UTF8 encoding
* @modules jdk.charsets
*/
import java.io.*;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 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
@ -26,6 +26,7 @@
@summary Make sure URL-downloaded jar files (jar_cache files)
will be deleted when VM exits.
@modules jdk.httpserver
@build DeleteTempJar
@run shell deletetempjar.sh
*/