-
Notifications
You must be signed in to change notification settings - Fork 740
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set java.security.manager property for tests in JDK18+
Tests which use System.setSecurityManager need to explicitly set the java.security.manager property in JDK18+. Impacted Java8andUp tests: - JCL_TEST_Java-Security - JCL_TEST_Java-Lang - JCL_TEST_Java-Lang-Invoke - JCL_TEST_Java-Lang_ClassLoader - JCL_TEST_Java-Internals - JCL_TEST_IBM-VM - JCL_TEST_Java-Lang-Ref Impacted JLM_Tests: - JLM_Tests_IBMinternal - TestMemoryMXBean Impacted Jsr292 tests: - jsr292Test - jsr292BootstrapTest Impacted cmdLineTests: - J9security - proxyFieldAccess Signed-off-by: Babneet Singh <[email protected]>
- Loading branch information
Showing
8 changed files
with
68 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
############################################################################## | ||
# Copyright (c) 2022, 2022 IBM Corp. and others | ||
# | ||
# This program and the accompanying materials are made available under | ||
# the terms of the Eclipse Public License 2.0 which accompanies this | ||
# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ | ||
# or the Apache License, Version 2.0 which accompanies this distribution and | ||
# is available at https://www.apache.org/licenses/LICENSE-2.0. | ||
# | ||
# This Source Code may also be made available under the following | ||
# Secondary Licenses when the conditions for such availability set | ||
# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU | ||
# General Public License, version 2 with the GNU Classpath | ||
# Exception [1] and GNU General Public License, version 2 with the | ||
# OpenJDK Assembly Exception [2]. | ||
# | ||
# [1] https://www.gnu.org/software/classpath/license.html | ||
# [2] http://openjdk.java.net/legal/assembly-exception.html | ||
# | ||
# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 | ||
############################################################################## | ||
|
||
# In JDK18+, java.security.manager == null behaves as -Djava.security.manager=disallow. | ||
# In JDK17-, java.security.manager == null behaves as -Djava.security.manager=allow. | ||
# For OpenJ9 tests to work as expected, -Djava.security.manager=allow behaviour is | ||
# needed in JDK18+. | ||
JAVA_SECURITY_MANAGER= | ||
ifeq ($(filter 8 9 10 11 12 13 14 15 16 17, $(JDK_VERSION)),) | ||
JAVA_SECURITY_MANAGER=-Djava.security.manager=allow | ||
endif |