From 4af24b6def11dfc620249d432bba1843356cf865 Mon Sep 17 00:00:00 2001 From: Alan Bateman Date: Tue, 5 Apr 2016 21:18:01 +0100 Subject: [PATCH] 8153370: Drop use of old style -XaddExports from tests Reviewed-by: mchung --- .../WrappedToolkitTest/WrappedToolkitTest.sh | 27 ++++++++++++------- .../FieldSetAccessibleTest.java | 4 +-- jdk/test/java/net/Authenticator/B4933582.sh | 2 +- .../Activatable/extLoadedImpl/ext.sh | 6 ++++- .../DownloadActivationGroup.java | 8 +++--- .../StubClassesPermitted.java | 9 ++++--- .../java/rmi/registry/readTest/readTest.sh | 6 ++++- .../rmi/transport/checkFQDN/CheckFQDN.java | 7 ++--- .../transport/dgcDeadLock/DGCDeadLock.java | 8 +++--- jdk/test/java/util/Locale/LocaleProviders.sh | 3 ++- .../java/util/PluggableLocale/ExecTest.sh | 3 ++- .../modules/etc/VerifyModuleDelegation.java | 2 +- .../jmxremote/bootstrap/RmiBootstrapTest.sh | 3 ++- .../bootstrap/RmiSslBootstrapTest.sh | 3 ++- .../bootstrap/RmiSslNoKeyStoreTest.sh | 3 ++- .../runtime/Log/6409194/NoConsoleOutput.java | 7 ++--- jdk/test/sun/security/krb5/tools/ktcheck.sh | 3 ++- jdk/test/sun/security/tools/jarsigner/ts.sh | 6 ++++- .../sun/security/tools/keytool/autotest.sh | 4 ++- .../sun/security/tools/keytool/standard.sh | 4 ++- jdk/test/tools/jimage/VerifyJimage.java | 1 + .../launcher/modules/patch/PatchTest.java | 11 +++----- 22 files changed, 83 insertions(+), 47 deletions(-) diff --git a/jdk/test/java/awt/Toolkit/Headless/WrappedToolkitTest/WrappedToolkitTest.sh b/jdk/test/java/awt/Toolkit/Headless/WrappedToolkitTest/WrappedToolkitTest.sh index 06bb522520e..b1930f0a728 100644 --- a/jdk/test/java/awt/Toolkit/Headless/WrappedToolkitTest/WrappedToolkitTest.sh +++ b/jdk/test/java/awt/Toolkit/Headless/WrappedToolkitTest/WrappedToolkitTest.sh @@ -113,7 +113,8 @@ fi case "$OS" in Windows* | CYGWIN* ) ${COMPILEJAVA}/bin/javac ${TESTJAVACOPTS} \ - -XaddExports:java.desktop/sun.awt=ALL-UNNAMED,java.desktop/sun.awt.windows=ALL-UNNAMED ${CP} \ + -XaddExports:java.desktop/sun.awt=ALL-UNNAMED \ + -XaddExports:java.desktop/sun.awt.windows=ALL-UNNAMED ${CP} \ *.java status=$? if [ ! $status -eq "0" ]; then @@ -123,7 +124,8 @@ case "$OS" in SunOS | Linux ) ${COMPILEJAVA}/bin/javac ${TESTJAVACOPTS} \ - -XaddExports:java.desktop/sun.awt=ALL-UNNAMED,java.desktop/sun.awt.X11=ALL-UNNAMED ${CP} \ + -XaddExports:java.desktop/sun.awt=ALL-UNNAMED \ + -XaddExports:java.desktop/sun.awt.X11=ALL-UNNAMED ${CP} \ *.java status=$? if [ ! $status -eq "0" ]; then @@ -133,7 +135,8 @@ case "$OS" in Darwin) ${COMPILEJAVA}/bin/javac ${TESTJAVACOPTS} \ - -XaddExports:java.desktop/sun.awt=ALL-UNNAMED,java.desktop/sun.lwawt.macosx=ALL-UNNAMED ${CP} \ + -XaddExports:java.desktop/sun.awt=ALL-UNNAMED \ + -XaddExports:java.desktop/sun.lwawt.macosx=ALL-UNNAMED ${CP} \ *.java status=$? if [ ! $status -eq "0" ]; then @@ -151,14 +154,16 @@ chmod 777 ./* case "$OS" in Windows* | CYGWIN* ) ${TESTJAVA}/bin/java ${TESTVMOPTS} -Djava.awt.headless=true \ - -XaddExports:java.desktop/sun.awt=ALL-UNNAMED,java.desktop/sun.awt.windows=ALL-UNNAMED ${CP} \ + -XaddExports:java.desktop/sun.awt=ALL-UNNAMED \ + -XaddExports:java.desktop/sun.awt.windows=ALL-UNNAMED ${CP} \ TestWrapped sun.awt.windows.WToolkit status=$? if [ ! $status -eq "0" ]; then fail "Test FAILED: toolkit wrapped into HeadlessToolkit is not an instance of sun.awt.windows.WToolkit"; fi ${TESTJAVA}/bin/java ${TESTVMOPTS} -Djava.awt.headless=true \ - -XaddExports:java.desktop/sun.awt=ALL-UNNAMED,java.desktop/sun.awt.windows=ALL-UNNAMED ${CP} \ + -XaddExports:java.desktop/sun.awt=ALL-UNNAMED \ + -XaddExports:java.desktop/sun.awt.windows=ALL-UNNAMED ${CP} \ -Dawt.toolkit=sun.awt.windows.WToolkit \ TestWrapped sun.awt.windows.WToolkit status=$? @@ -169,7 +174,8 @@ case "$OS" in SunOS | Linux ) ${TESTJAVA}/bin/java ${TESTVMOPTS} -Djava.awt.headless=true \ - -XaddExports:java.desktop/sun.awt=ALL-UNNAMED,java.desktop/sun.awt.X11=ALL-UNNAMED ${CP} \ + -XaddExports:java.desktop/sun.awt=ALL-UNNAMED \ + -XaddExports:java.desktop/sun.awt.X11=ALL-UNNAMED ${CP} \ -Dawt.toolkit=sun.awt.X11.XToolkit \ TestWrapped sun.awt.X11.XToolkit status=$? @@ -177,7 +183,8 @@ case "$OS" in fail "Test FAILED: toolkit wrapped into HeadlessToolkit is not an instance of sun.awt.xawt.XToolkit"; fi AWT_TOOLKIT=XToolkit ${TESTJAVA}/bin/java ${TESTVMOPTS} \ - -XaddExports:java.desktop/sun.awt=ALL-UNNAMED,java.desktop/sun.awt.X11=ALL-UNNAMED ${CP} \ + -XaddExports:java.desktop/sun.awt=ALL-UNNAMED \ + -XaddExports:java.desktop/sun.awt.X11=ALL-UNNAMED ${CP} \ -Djava.awt.headless=true \ TestWrapped sun.awt.X11.XToolkit status=$? @@ -188,14 +195,16 @@ case "$OS" in Darwin) ${TESTJAVA}/bin/java ${TESTVMOPTS} -Djava.awt.headless=true \ - -XaddExports:java.desktop/sun.awt=ALL-UNNAMED,java.desktop/sun.lwawt.macosx=ALL-UNNAMED ${CP} \ + -XaddExports:java.desktop/sun.awt=ALL-UNNAMED \ + -XaddExports:java.desktop/sun.lwawt.macosx=ALL-UNNAMED ${CP} \ TestWrapped sun.lwawt.macosx.LWCToolkit status=$? if [ ! $status -eq "0" ]; then fail "Test FAILED: toolkit wrapped into HeadlessToolkit is not an instance of sun.lwawt.macosx.LWCToolkit"; fi ${TESTJAVA}/bin/java ${TESTVMOPTS} -Djava.awt.headless=true \ - -XaddExports:java.desktop/sun.awt=ALL-UNNAMED,java.desktop/sun.lwawt.macosx=ALL-UNNAMED ${CP} \ + -XaddExports:java.desktop/sun.awt=ALL-UNNAMED \ + -XaddExports:java.desktop/sun.lwawt.macosx=ALL-UNNAMED ${CP} \ -Dawt.toolkit=sun.lwawt.macosx.LWCToolkit \ TestWrapped sun.lwawt.macosx.LWCToolkit status=$? diff --git a/jdk/test/java/lang/Class/getDeclaredField/FieldSetAccessibleTest.java b/jdk/test/java/lang/Class/getDeclaredField/FieldSetAccessibleTest.java index 45a7b8e2259..393f9c7c4c6 100644 --- a/jdk/test/java/lang/Class/getDeclaredField/FieldSetAccessibleTest.java +++ b/jdk/test/java/lang/Class/getDeclaredField/FieldSetAccessibleTest.java @@ -61,8 +61,8 @@ import jdk.internal.module.Modules; * loads all the classes in the BCL, get their declared fields, * and call setAccessible(false) followed by setAccessible(true); * @modules java.base/jdk.internal.module - * @run main/othervm FieldSetAccessibleTest UNSECURE - * @run main/othervm FieldSetAccessibleTest SECURE + * @run main/othervm -Djdk.launcher.addmods=ALL-SYSTEM FieldSetAccessibleTest UNSECURE + * @run main/othervm -Djdk.launcher.addmods=ALL-SYSTEM FieldSetAccessibleTest SECURE * * @author danielfuchs */ diff --git a/jdk/test/java/net/Authenticator/B4933582.sh b/jdk/test/java/net/Authenticator/B4933582.sh index 728de44a0c9..a9cff3e6a62 100644 --- a/jdk/test/java/net/Authenticator/B4933582.sh +++ b/jdk/test/java/net/Authenticator/B4933582.sh @@ -44,7 +44,7 @@ case "$OS" in ;; esac -EXTRAOPTS="-XaddExports:java.base/sun.net.www=ALL-UNNAMED,java.base/sun.net.www.protocol.http=ALL-UNNAMED" +EXTRAOPTS="-XaddExports:java.base/sun.net.www=ALL-UNNAMED -XaddExports:java.base/sun.net.www.protocol.http=ALL-UNNAMED" export EXTRAOPTS ${COMPILEJAVA}${FS}bin${FS}javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} ${EXTRAOPTS} -d . \ diff --git a/jdk/test/java/rmi/activation/Activatable/extLoadedImpl/ext.sh b/jdk/test/java/rmi/activation/Activatable/extLoadedImpl/ext.sh index 70e9c2b221b..ce870264855 100644 --- a/jdk/test/java/rmi/activation/Activatable/extLoadedImpl/ext.sh +++ b/jdk/test/java/rmi/activation/Activatable/extLoadedImpl/ext.sh @@ -51,6 +51,10 @@ rm classes/ExtLoadedImpl.class classes/ExtLoadedImpl_Stub.class classes/CheckLoa mkdir -p ext $COMPILEJAVA/bin/jar ${TESTTOOLVMOPTS} cf ext/ext.jar -C $TESTCLASSES ExtLoadedImpl.class -C $TESTCLASSES ExtLoadedImpl_Stub.class -C $TESTCLASSES CheckLoader.class -TESTVMOPTS="${TESTVMOPTS} -XaddExports:java.rmi/sun.rmi.registry=ALL-UNNAMED,java.rmi/sun.rmi.server=ALL-UNNAMED,java.rmi/sun.rmi.transport=ALL-UNNAMED,java.rmi/sun.rmi.transport.tcp=ALL-UNNAMED" +TESTVMOPTS="${TESTVMOPTS} \ + -XaddExports:java.rmi/sun.rmi.registry=ALL-UNNAMED \ + -XaddExports:java.rmi/sun.rmi.server=ALL-UNNAMED \ + -XaddExports:java.rmi/sun.rmi.transport=ALL-UNNAMED \ + -XaddExports:java.rmi/sun.rmi.transport.tcp=ALL-UNNAMED" $TESTJAVA/bin/java ${TESTVMOPTS} -cp classes -Dtest.src=$TESTSRC -Dtest.classes=$TESTCLASSES -Djava.security.policy=$TESTSRC/security.policy -Djava.ext.dirs=ext ExtLoadedImplTest diff --git a/jdk/test/java/rmi/activation/ActivationGroup/downloadActivationGroup/DownloadActivationGroup.java b/jdk/test/java/rmi/activation/ActivationGroup/downloadActivationGroup/DownloadActivationGroup.java index 1b2288c7786..5906f991a40 100644 --- a/jdk/test/java/rmi/activation/ActivationGroup/downloadActivationGroup/DownloadActivationGroup.java +++ b/jdk/test/java/rmi/activation/ActivationGroup/downloadActivationGroup/DownloadActivationGroup.java @@ -138,9 +138,11 @@ public class DownloadActivationGroup p.put("java.security.policy", TestParams.defaultGroupPolicy); CommandEnvironment cmd = new ActivationGroupDesc.CommandEnvironment( null, - new String[] { "-XaddExports:java.rmi/sun.rmi.registry=ALL-UNNAMED," - + "java.rmi/sun.rmi.server=ALL-UNNAMED,java.rmi/sun.rmi.transport=ALL-UNNAMED," - + "java.rmi/sun.rmi.transport.tcp=ALL-UNNAMED" }); + new String[] { + "-XaddExports:java.rmi/sun.rmi.registry=ALL-UNNAMED", + "-XaddExports:java.rmi/sun.rmi.server=ALL-UNNAMED", + "-XaddExports:java.rmi/sun.rmi.transport=ALL-UNNAMED", + "-XaddExports:java.rmi/sun.rmi.transport.tcp=ALL-UNNAMED" }); ActivationGroupDesc groupDesc = new ActivationGroupDesc("MyActivationGroupImpl", diff --git a/jdk/test/java/rmi/activation/ActivationSystem/stubClassesPermitted/StubClassesPermitted.java b/jdk/test/java/rmi/activation/ActivationSystem/stubClassesPermitted/StubClassesPermitted.java index 2ee592f7591..393db7ee6fc 100644 --- a/jdk/test/java/rmi/activation/ActivationSystem/stubClassesPermitted/StubClassesPermitted.java +++ b/jdk/test/java/rmi/activation/ActivationSystem/stubClassesPermitted/StubClassesPermitted.java @@ -120,9 +120,12 @@ public class StubClassesPermitted // System.err.println("Create activation group, in a new VM"); CommandEnvironment cmd = new ActivationGroupDesc.CommandEnvironment(null, - new String[] { "-XaddExports:java.base/sun.security.provider=ALL-UNNAMED," - + "java.rmi/sun.rmi.registry=ALL-UNNAMED,java.rmi/sun.rmi.server=ALL-UNNAMED," - + "java.rmi/sun.rmi.transport=ALL-UNNAMED,java.rmi/sun.rmi.transport.tcp=ALL-UNNAMED" }); + new String[] { + "-XaddExports:java.base/sun.security.provider=ALL-UNNAMED", + "-XaddExports:java.rmi/sun.rmi.registry=ALL-UNNAMED", + "-XaddExports:java.rmi/sun.rmi.server=ALL-UNNAMED", + "-XaddExports:java.rmi/sun.rmi.transport=ALL-UNNAMED", + "-XaddExports:java.rmi/sun.rmi.transport.tcp=ALL-UNNAMED" }); ActivationGroupDesc groupDesc = new ActivationGroupDesc(p, cmd); diff --git a/jdk/test/java/rmi/registry/readTest/readTest.sh b/jdk/test/java/rmi/registry/readTest/readTest.sh index 5c5490eceb4..3bee78b65e4 100644 --- a/jdk/test/java/rmi/registry/readTest/readTest.sh +++ b/jdk/test/java/rmi/registry/readTest/readTest.sh @@ -98,7 +98,11 @@ case "$OS" in ;; esac # trailing / after code base is important for rmi codebase property. -TESTVMOPTS="${TESTVMOPTS} -XaddExports:java.rmi/sun.rmi.registry=ALL-UNNAMED,java.rmi/sun.rmi.server=ALL-UNNAMED,java.rmi/sun.rmi.transport=ALL-UNNAMED,java.rmi/sun.rmi.transport.tcp=ALL-UNNAMED" +TESTVMOPTS="${TESTVMOPTS} \ + -XaddExports:java.rmi/sun.rmi.registry=ALL-UNNAMED \ + -XaddExports:java.rmi/sun.rmi.server=ALL-UNNAMED \ + -XaddExports:java.rmi/sun.rmi.transport=ALL-UNNAMED \ + -XaddExports:java.rmi/sun.rmi.transport.tcp=ALL-UNNAMED" ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -cp $TEST_CLASSPATH ${ARGS} -Djava.rmi.server.codebase=${FILEURL}$CODEBASE/ readTest > OUT.TXT 2>&1 & TEST_PID=$! #bulk of testcase - let it run for a while diff --git a/jdk/test/java/rmi/transport/checkFQDN/CheckFQDN.java b/jdk/test/java/rmi/transport/checkFQDN/CheckFQDN.java index 1dc6d1fbc07..289772a3782 100644 --- a/jdk/test/java/rmi/transport/checkFQDN/CheckFQDN.java +++ b/jdk/test/java/rmi/transport/checkFQDN/CheckFQDN.java @@ -123,9 +123,10 @@ public class CheckFQDN extends UnicastRemoteObject propOption + property + equal + propertyValue + extraProp + - " -XaddExports:java.rmi/sun.rmi.registry=ALL-UNNAMED," - + "java.rmi/sun.rmi.server=ALL-UNNAMED,java.rmi/sun.rmi.transport=ALL-UNNAMED," - + "java.rmi/sun.rmi.transport.tcp=ALL-UNNAMED" + + " -XaddExports:java.rmi/sun.rmi.registry=ALL-UNNAMED" + + " -XaddExports:java.rmi/sun.rmi.server=ALL-UNNAMED" + + " -XaddExports:java.rmi/sun.rmi.transport=ALL-UNNAMED" + + " -XaddExports:java.rmi/sun.rmi.transport.tcp=ALL-UNNAMED" + " -Drmi.registry.port=" + REGISTRY_PORT, ""); diff --git a/jdk/test/java/rmi/transport/dgcDeadLock/DGCDeadLock.java b/jdk/test/java/rmi/transport/dgcDeadLock/DGCDeadLock.java index a02e6a39273..fc7ae3cd818 100644 --- a/jdk/test/java/rmi/transport/dgcDeadLock/DGCDeadLock.java +++ b/jdk/test/java/rmi/transport/dgcDeadLock/DGCDeadLock.java @@ -74,10 +74,10 @@ public class DGCDeadLock implements Runnable { try { String options = " -Djava.security.policy=" + TestParams.defaultPolicy + - " -XaddExports:java.rmi/sun.rmi.registry=ALL-UNNAMED," + - "java.rmi/sun.rmi.server=ALL-UNNAMED," + - "java.rmi/sun.rmi.transport=ALL-UNNAMED," + - "java.rmi/sun.rmi.transport.tcp=ALL-UNNAMED" + + " -XaddExports:java.rmi/sun.rmi.registry=ALL-UNNAMED" + + " -XaddExports:java.rmi/sun.rmi.server=ALL-UNNAMED" + + " -XaddExports:java.rmi/sun.rmi.transport=ALL-UNNAMED" + + " -XaddExports:java.rmi/sun.rmi.transport.tcp=ALL-UNNAMED" + " -Djava.rmi.dgc.leaseValue=500000" + " -Dsun.rmi.dgc.checkInterval=" + (HOLD_TARGET_TIME - 5000) + diff --git a/jdk/test/java/util/Locale/LocaleProviders.sh b/jdk/test/java/util/Locale/LocaleProviders.sh index cddb4274805..07f8f00eae2 100644 --- a/jdk/test/java/util/Locale/LocaleProviders.sh +++ b/jdk/test/java/util/Locale/LocaleProviders.sh @@ -122,7 +122,8 @@ tznp tznp8013086 EOF -EXTRAOPTS="-XaddExports:java.base/sun.util.locale=ALL-UNNAMED,java.base/sun.util.locale.provider=ALL-UNNAMED" +EXTRAOPTS="-XaddExports:java.base/sun.util.locale=ALL-UNNAMED \ + -XaddExports:java.base/sun.util.locale.provider=ALL-UNNAMED" ${COMPILEJAVA}${FS}bin${FS}javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d ${SPIDIR}${FS}dest \ ${SPIDIR}${FS}src${FS}tznp.java \ diff --git a/jdk/test/java/util/PluggableLocale/ExecTest.sh b/jdk/test/java/util/PluggableLocale/ExecTest.sh index 190d5abb7fd..643895ed75f 100644 --- a/jdk/test/java/util/PluggableLocale/ExecTest.sh +++ b/jdk/test/java/util/PluggableLocale/ExecTest.sh @@ -93,7 +93,8 @@ case "$1" in esac -EXTRA_OPTS="-XaddExports:java.base/sun.util.locale.provider=ALL-UNNAMED,java.base/sun.util.resources=ALL-UNNAMED" +EXTRA_OPTS="-XaddExports:java.base/sun.util.locale.provider=ALL-UNNAMED \ + -XaddExports:java.base/sun.util.resources=ALL-UNNAMED" # compile cp ${TESTSRC}${FS}ProviderTest.java . diff --git a/jdk/test/jdk/modules/etc/VerifyModuleDelegation.java b/jdk/test/jdk/modules/etc/VerifyModuleDelegation.java index 6594a5ca449..4c40455cf62 100644 --- a/jdk/test/jdk/modules/etc/VerifyModuleDelegation.java +++ b/jdk/test/jdk/modules/etc/VerifyModuleDelegation.java @@ -26,7 +26,7 @@ * @summary Verify the defining class loader of each module never delegates * to its child class loader. Also sanity check java.compact2 * requires. - * @run testng VerifyModuleDelegation + * @run testng/othervm -Djdk.launcher.addmods=ALL-SYSTEM VerifyModuleDelegation */ import java.lang.module.ModuleDescriptor; diff --git a/jdk/test/sun/management/jmxremote/bootstrap/RmiBootstrapTest.sh b/jdk/test/sun/management/jmxremote/bootstrap/RmiBootstrapTest.sh index 5efd6e2400e..f0a93a6f78a 100644 --- a/jdk/test/sun/management/jmxremote/bootstrap/RmiBootstrapTest.sh +++ b/jdk/test/sun/management/jmxremote/bootstrap/RmiBootstrapTest.sh @@ -51,7 +51,8 @@ chmod -R 777 ${TESTCLASSES}/ssl DEBUGOPTIONS="" export DEBUGOPTIONS -EXTRAOPTIONS="-XaddExports:java.management/sun.management=ALL-UNNAMED,java.management/sun.management.jmxremote=ALL-UNNAMED" +EXTRAOPTIONS="-XaddExports:java.management/sun.management=ALL-UNNAMED \ + -XaddExports:java.management/sun.management.jmxremote=ALL-UNNAMED" export EXTRAOPTIONS # Call the common generic test diff --git a/jdk/test/sun/management/jmxremote/bootstrap/RmiSslBootstrapTest.sh b/jdk/test/sun/management/jmxremote/bootstrap/RmiSslBootstrapTest.sh index 16db84cb5d1..30f3a179149 100644 --- a/jdk/test/sun/management/jmxremote/bootstrap/RmiSslBootstrapTest.sh +++ b/jdk/test/sun/management/jmxremote/bootstrap/RmiSslBootstrapTest.sh @@ -49,7 +49,8 @@ chmod -R 777 ${TESTCLASSES}/ssl DEBUGOPTIONS="" export DEBUGOPTIONS -EXTRAOPTIONS="-XaddExports:java.management/sun.management=ALL-UNNAMED,java.management/sun.management.jmxremote=ALL-UNNAMED" +EXTRAOPTIONS="-XaddExports:java.management/sun.management=ALL-UNNAMED \ + -XaddExports:java.management/sun.management.jmxremote=ALL-UNNAMED" export EXTRAOPTIONS # Call the common generic test diff --git a/jdk/test/sun/management/jmxremote/bootstrap/RmiSslNoKeyStoreTest.sh b/jdk/test/sun/management/jmxremote/bootstrap/RmiSslNoKeyStoreTest.sh index 86ab964c85f..8cccc837ba0 100644 --- a/jdk/test/sun/management/jmxremote/bootstrap/RmiSslNoKeyStoreTest.sh +++ b/jdk/test/sun/management/jmxremote/bootstrap/RmiSslNoKeyStoreTest.sh @@ -48,7 +48,8 @@ chmod -R 777 ${TESTCLASSES}/ssl DEBUGOPTIONS="" export DEBUGOPTIONS -EXTRAOPTIONS="-XaddExports:java.management/sun.management=ALL-UNNAMED,java.management/sun.management.jmxremote=ALL-UNNAMED" +EXTRAOPTIONS="-XaddExports:java.management/sun.management=ALL-UNNAMED \ + -XaddExports:java.management/sun.management.jmxremote=ALL-UNNAMED" export EXTRAOPTIONS # Call the common generic test diff --git a/jdk/test/sun/rmi/runtime/Log/6409194/NoConsoleOutput.java b/jdk/test/sun/rmi/runtime/Log/6409194/NoConsoleOutput.java index 36414cc087b..a75a0420678 100644 --- a/jdk/test/sun/rmi/runtime/Log/6409194/NoConsoleOutput.java +++ b/jdk/test/sun/rmi/runtime/Log/6409194/NoConsoleOutput.java @@ -68,9 +68,10 @@ public class NoConsoleOutput { // (neither on standard output, nor on standard err streams). JavaVM vm = new JavaVM( DoRMIStuff.class.getName(), - "-XaddExports:java.rmi/sun.rmi.registry=ALL-UNNAMED," - + "java.rmi/sun.rmi.server=ALL-UNNAMED,java.rmi/sun.rmi.transport=ALL-UNNAMED," - + "java.rmi/sun.rmi.transport.tcp=ALL-UNNAMED" + "-XaddExports:java.rmi/sun.rmi.registry=ALL-UNNAMED" + + " -XaddExports:java.rmi/sun.rmi.server=ALL-UNNAMED" + + " -XaddExports:java.rmi/sun.rmi.transport=ALL-UNNAMED" + + " -XaddExports:java.rmi/sun.rmi.transport.tcp=ALL-UNNAMED" + " -Djava.util.logging.config.file=" + loggingPropertiesFile, "", out, err); vm.execute(); diff --git a/jdk/test/sun/security/krb5/tools/ktcheck.sh b/jdk/test/sun/security/krb5/tools/ktcheck.sh index 48a01a78e6b..e7077b42e89 100644 --- a/jdk/test/sun/security/krb5/tools/ktcheck.sh +++ b/jdk/test/sun/security/krb5/tools/ktcheck.sh @@ -61,7 +61,8 @@ rm $KEYTAB EXTRA_OPTIONS="-Djava.security.krb5.conf=${TESTSRC}${FS}onlythree.conf" KTAB="${TESTJAVA}${FS}bin${FS}ktab -J${EXTRA_OPTIONS} -k $KEYTAB -f" CHECK="${TESTJAVA}${FS}bin${FS}java -cp ${TESTCLASSES} ${TESTVMOPTS} ${EXTRA_OPTIONS} \ - -XaddExports:java.security.jgss/sun.security.krb5.internal.ktab=ALL-UNNAMED,java.security.jgss/sun.security.krb5=ALL-UNNAMED \ + -XaddExports:java.security.jgss/sun.security.krb5.internal.ktab=ALL-UNNAMED \ + -XaddExports:java.security.jgss/sun.security.krb5=ALL-UNNAMED \ KtabCheck $KEYTAB" echo ${EXTRA_OPTIONS} diff --git a/jdk/test/sun/security/tools/jarsigner/ts.sh b/jdk/test/sun/security/tools/jarsigner/ts.sh index 9b7bd89af1d..001d00da22a 100644 --- a/jdk/test/sun/security/tools/jarsigner/ts.sh +++ b/jdk/test/sun/security/tools/jarsigner/ts.sh @@ -95,7 +95,11 @@ $KT -alias tsbad3 -certreq | \ $KT -alias ca -gencert -ext eku:critical=cs | \ $KT -alias tsbad3 -importcert -EXTRAOPTS="-XaddExports:java.base/sun.misc=ALL-UNNAMED,java.base/sun.security.pkcs=ALL-UNNAMED,java.base/sun.security.timestamp=ALL-UNNAMED,java.base/sun.security.x509=ALL-UNNAMED,java.base/sun.security.util=ALL-UNNAMED" +EXTRAOPTS="-XaddExports:java.base/sun.misc=ALL-UNNAMED \ + -XaddExports:java.base/sun.security.pkcs=ALL-UNNAMED \ + -XaddExports:java.base/sun.security.timestamp=ALL-UNNAMED \ + -XaddExports:java.base/sun.security.x509=ALL-UNNAMED \ + -XaddExports:java.base/sun.security.util=ALL-UNNAMED" $JAVAC ${EXTRAOPTS} -d . ${TESTSRC}/TimestampCheck.java $JAVA ${TESTVMOPTS} ${EXTRAOPTS} "-Dtest.tool.vm.opts=${TESTTOOLVMOPTS}" TimestampCheck diff --git a/jdk/test/sun/security/tools/keytool/autotest.sh b/jdk/test/sun/security/tools/keytool/autotest.sh index d798f7a811e..de8d94ffa5d 100644 --- a/jdk/test/sun/security/tools/keytool/autotest.sh +++ b/jdk/test/sun/security/tools/keytool/autotest.sh @@ -100,7 +100,9 @@ fi echo "Using NSS lib at $LIBNAME" -EXTRAOPTS="-XaddExports:java.base/sun.security.tools.keytool=ALL-UNNAMED,java.base/sun.security.util=ALL-UNNAMED,java.base/sun.security.x509=ALL-UNNAMED" +EXTRAOPTS="-XaddExports:java.base/sun.security.tools.keytool=ALL-UNNAMED \ + -XaddExports:java.base/sun.security.util=ALL-UNNAMED \ + -XaddExports:java.base/sun.security.x509=ALL-UNNAMED" ${COMPILEJAVA}${FS}bin${FS}javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} ${EXTRAOPTS} -d . -XDignore.symbol.file \ ${TESTSRC}${FS}KeyToolTest.java || exit 10 diff --git a/jdk/test/sun/security/tools/keytool/standard.sh b/jdk/test/sun/security/tools/keytool/standard.sh index f84bd1930ed..8106ee44dcb 100644 --- a/jdk/test/sun/security/tools/keytool/standard.sh +++ b/jdk/test/sun/security/tools/keytool/standard.sh @@ -57,7 +57,9 @@ case "$OS" in ;; esac -EXTRAOPTS="-XaddExports:java.base/sun.security.tools.keytool=ALL-UNNAMED,java.base/sun.security.util=ALL-UNNAMED,java.base/sun.security.x509=ALL-UNNAMED" +EXTRAOPTS="-XaddExports:java.base/sun.security.tools.keytool=ALL-UNNAMED \ + -XaddExports:java.base/sun.security.util=ALL-UNNAMED \ + -XaddExports:java.base/sun.security.x509=ALL-UNNAMED" ${COMPILEJAVA}${FS}bin${FS}javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} ${EXTRAOPTS} -d . -XDignore.symbol.file ${TESTSRC}${FS}KeyToolTest.java || exit 10 diff --git a/jdk/test/tools/jimage/VerifyJimage.java b/jdk/test/tools/jimage/VerifyJimage.java index c31eb883fba..9c33cc3fa74 100644 --- a/jdk/test/tools/jimage/VerifyJimage.java +++ b/jdk/test/tools/jimage/VerifyJimage.java @@ -49,6 +49,7 @@ import jdk.internal.jimage.ImageLocation; * @test * @summary Verify jimage * @modules java.base/jdk.internal.jimage + * @run main/othervm -Djdk.launcher.addmods=ALL-SYSTEM VerifyJimage */ /** diff --git a/jdk/test/tools/launcher/modules/patch/PatchTest.java b/jdk/test/tools/launcher/modules/patch/PatchTest.java index 215882f1e4b..ba0ce877145 100644 --- a/jdk/test/tools/launcher/modules/patch/PatchTest.java +++ b/jdk/test/tools/launcher/modules/patch/PatchTest.java @@ -128,18 +128,15 @@ public class PatchTest { // value for -Xpatch String patchPath = PATCHES1_DIR + File.pathSeparator + PATCHES2_DIR; - // value for -XaddExports - String addExportsValue = "java.base/java.lang2=test" - + ",jdk.naming.dns/com.sun.jndi.dns=test" - + ",jdk.naming.dns/com.sun.jndi.dns2=test" - + ",jdk.compiler/com.sun.tools.javac2=test"; - // the argument to the test is the list of classes overridden or added String arg = Stream.of(CLASSES).collect(Collectors.joining(",")); int exitValue = executeTestJava("-Xpatch:" + patchPath, - "-XaddExports:" + addExportsValue, + "-XaddExports:java.base/java.lang2=test", + "-XaddExports:jdk.naming.dns/com.sun.jndi.dns=test", + "-XaddExports:jdk.naming.dns/com.sun.jndi.dns2=test", + "-XaddExports:jdk.compiler/com.sun.tools.javac2=test", "-addmods", "jdk.naming.dns,jdk.compiler", "-mp", MODS_DIR.toString(), "-m", "test/jdk.test.Main", arg)