From ac2a93101596434ac8bae6f0228c7a0d680902d0 Mon Sep 17 00:00:00 2001 From: mbalao Date: Wed, 30 Oct 2019 14:47:30 -0300 Subject: [PATCH] 8231995: two jtreg tests failed after 8229366 is fixed Reviewed-by: jbachorik --- src/share/classes/jdk/jfr/internal/JVMUpcalls.java | 9 +++++++++ src/share/lib/security/java.security-aix | 5 ++++- src/share/lib/security/java.security-linux | 5 ++++- src/share/lib/security/java.security-macosx | 5 ++++- src/share/lib/security/java.security-solaris | 6 ++++-- src/share/lib/security/java.security-windows | 5 ++++- test/java/lang/SecurityManager/CheckPackageAccess.java | 3 +++ test/jdk/jfr/api/event/TestAbstractEvent.java | 1 + test/jdk/jfr/api/event/TestEventFactory.java | 1 + test/jdk/jfr/api/event/TestEventFactoryRegistration.java | 1 + test/jdk/jfr/event/runtime/TestClassDefineEvent.java | 1 + 11 files changed, 36 insertions(+), 6 deletions(-) diff --git a/src/share/classes/jdk/jfr/internal/JVMUpcalls.java b/src/share/classes/jdk/jfr/internal/JVMUpcalls.java index 37071aafb..7e2d6fd81 100644 --- a/src/share/classes/jdk/jfr/internal/JVMUpcalls.java +++ b/src/share/classes/jdk/jfr/internal/JVMUpcalls.java @@ -140,4 +140,13 @@ final class JVMUpcalls { static Thread createRecorderThread(ThreadGroup systemThreadGroup, ClassLoader contextClassLoader) { return SecuritySupport.createRecorderThread(systemThreadGroup, contextClassLoader); } + + /** + * Called by the JVM to initialize the EventHandlerProxy class. + * + * @return the EventHandlerProxy class + */ + static Class getEventHandlerProxyClass() { + return EventHandlerProxyCreator.proxyClass; + } } diff --git a/src/share/lib/security/java.security-aix b/src/share/lib/security/java.security-aix index 9e9bd5984..e3abff3d8 100644 --- a/src/share/lib/security/java.security-aix +++ b/src/share/lib/security/java.security-aix @@ -276,7 +276,10 @@ package.definition=sun.,\ jdk.nashorn.internal.,\ jdk.nashorn.tools.,\ jdk.xml.internal.,\ - com.sun.activation.registries. + com.sun.activation.registries.,\ + jdk.jfr.events.,\ + jdk.jfr.internal.,\ + jdk.management.jfr.internal. # # Determines whether this properties file can be appended to diff --git a/src/share/lib/security/java.security-linux b/src/share/lib/security/java.security-linux index 44f9109bb..2c7673a06 100644 --- a/src/share/lib/security/java.security-linux +++ b/src/share/lib/security/java.security-linux @@ -276,7 +276,10 @@ package.definition=sun.,\ jdk.nashorn.internal.,\ jdk.nashorn.tools.,\ jdk.xml.internal.,\ - com.sun.activation.registries. + com.sun.activation.registries.,\ + jdk.jfr.events.,\ + jdk.jfr.internal.,\ + jdk.management.jfr.internal. # # Determines whether this properties file can be appended to diff --git a/src/share/lib/security/java.security-macosx b/src/share/lib/security/java.security-macosx index 180db8e68..01e58c281 100644 --- a/src/share/lib/security/java.security-macosx +++ b/src/share/lib/security/java.security-macosx @@ -279,7 +279,10 @@ package.definition=sun.,\ jdk.nashorn.tools.,\ jdk.xml.internal.,\ com.sun.activation.registries.,\ - apple. + apple.,\ + jdk.jfr.events.,\ + jdk.jfr.internal.,\ + jdk.management.jfr.internal. # # Determines whether this properties file can be appended to diff --git a/src/share/lib/security/java.security-solaris b/src/share/lib/security/java.security-solaris index e1ce31851..c5bcd7acd 100644 --- a/src/share/lib/security/java.security-solaris +++ b/src/share/lib/security/java.security-solaris @@ -278,8 +278,10 @@ package.definition=sun.,\ jdk.nashorn.internal.,\ jdk.nashorn.tools.,\ jdk.xml.internal.,\ - com.sun.activation.registries. - + com.sun.activation.registries.,\ + jdk.jfr.events.,\ + jdk.jfr.internal.,\ + jdk.management.jfr.internal. # # Determines whether this properties file can be appended to # or overridden on the command line via -Djava.security.properties diff --git a/src/share/lib/security/java.security-windows b/src/share/lib/security/java.security-windows index 0d392fcfd..fd186ad1e 100644 --- a/src/share/lib/security/java.security-windows +++ b/src/share/lib/security/java.security-windows @@ -279,7 +279,10 @@ package.definition=sun.,\ jdk.nashorn.tools.,\ jdk.xml.internal.,\ com.sun.activation.registries.,\ - com.sun.java.accessibility. + com.sun.java.accessibility.,\ + jdk.jfr.events.,\ + jdk.jfr.internal.,\ + jdk.management.jfr.internal. # # Determines whether this properties file can be appended to diff --git a/test/java/lang/SecurityManager/CheckPackageAccess.java b/test/java/lang/SecurityManager/CheckPackageAccess.java index 73a2d7068..3365ae6a0 100644 --- a/test/java/lang/SecurityManager/CheckPackageAccess.java +++ b/test/java/lang/SecurityManager/CheckPackageAccess.java @@ -86,6 +86,9 @@ public class CheckPackageAccess { "oracle.jrockit.jfr.", "org.jcp.xml.dsig.internal.", "jdk.internal.", + "jdk.jfr.events.", + "jdk.jfr.internal.", + "jdk.management.jfr.internal.", "jdk.nashorn.internal.", "jdk.nashorn.tools.", "jdk.xml.internal.", diff --git a/test/jdk/jfr/api/event/TestAbstractEvent.java b/test/jdk/jfr/api/event/TestAbstractEvent.java index 94d8a6598..af2760327 100644 --- a/test/jdk/jfr/api/event/TestAbstractEvent.java +++ b/test/jdk/jfr/api/event/TestAbstractEvent.java @@ -44,6 +44,7 @@ import jdk.test.lib.jfr.Events; * * @library /lib / * @run main/othervm jdk.jfr.api.event.TestAbstractEvent + * @run main/othervm -XX:+AllowParallelDefineClass jdk.jfr.api.event.TestAbstractEvent */ public class TestAbstractEvent { diff --git a/test/jdk/jfr/api/event/TestEventFactory.java b/test/jdk/jfr/api/event/TestEventFactory.java index ebf39a64d..60b2f9051 100644 --- a/test/jdk/jfr/api/event/TestEventFactory.java +++ b/test/jdk/jfr/api/event/TestEventFactory.java @@ -44,6 +44,7 @@ import jdk.test.lib.Asserts; * * @library /lib / * @run main/othervm jdk.jfr.api.event.TestEventFactory + * @run main/othervm -XX:+AllowParallelDefineClass jdk.jfr.api.event.TestEventFactory */ public class TestEventFactory { diff --git a/test/jdk/jfr/api/event/TestEventFactoryRegistration.java b/test/jdk/jfr/api/event/TestEventFactoryRegistration.java index 1f6df8697..7d7c6890e 100644 --- a/test/jdk/jfr/api/event/TestEventFactoryRegistration.java +++ b/test/jdk/jfr/api/event/TestEventFactoryRegistration.java @@ -44,6 +44,7 @@ import jdk.test.lib.Asserts; * * @library /lib / * @run main/othervm jdk.jfr.api.event.TestEventFactoryRegistration + * @run main/othervm -XX:+AllowParallelDefineClass jdk.jfr.api.event.TestEventFactoryRegistration */ public class TestEventFactoryRegistration { diff --git a/test/jdk/jfr/event/runtime/TestClassDefineEvent.java b/test/jdk/jfr/event/runtime/TestClassDefineEvent.java index 761bf87ab..30f9320af 100644 --- a/test/jdk/jfr/event/runtime/TestClassDefineEvent.java +++ b/test/jdk/jfr/event/runtime/TestClassDefineEvent.java @@ -43,6 +43,7 @@ import jdk.test.lib.jfr.TestClassLoader; * @library /lib / * @build jdk.jfr.event.runtime.TestClasses * @run main/othervm jdk.jfr.event.runtime.TestClassDefineEvent + * @run main/othervm -XX:+AllowParallelDefineClass jdk.jfr.event.runtime.TestClassDefineEvent */ public final class TestClassDefineEvent { -- GitLab