JDK-8078355 : JEP-JDK-8062493: [jvmci] Test task: security restrictions
Type:Task
Component:hotspot
Sub-Component:compiler
Affected Version:9
Priority:P1
Status:Resolved
Resolution:Fixed
Submitted:2015-04-22
Updated:2015-09-23
Resolved:2015-09-23
The Version table provides details related to the release that this issue/RFE will be addressed.
Unresolved : Release in which this issue/RFE will be addressed. Resolved: Release in which this issue/RFE has been resolved. Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.
to run jvm w/ security manager in jtreg test, one can use 'policy' and/or 'secure' run options
http://openjdk.java.net/jtreg/tag-spec.html
/policy=<file>
Define the Java system property "java.security.policy" to have the value "=${TESTSRC}/<file>", where TESTSRC is the name of the directory containing the defining file of the test. This definition has the effect of making the given file the sole source of security policies to be used by the security manager. In particular, the system security policy and the user's security policy will be ignored. If the /secure option is not used then the default security manager will be installed.
Property expansion will be performed in the policy file as usual; in particular, the "test.src" and "test.classes" properties will name the source and class directories of the test being run (see DIRECTORY CONTEXT below).
This option may only be used in conjunction with the /othervm option.
/secure=<class>
Specify a subclass of java.lang.SecurityManager to be installed as the security manager. An appropriate @build tag should be provided to ensure that the class is compiled. If the /secure option is used without the /policy option then the system's built-in policy, equivalent to the original sandbox policy, will be assumed.
This option may only be used in conjunction with the /othervm option.