Skip to content

Commit

Permalink
Merge branch 'master' into patch-13
Browse files Browse the repository at this point in the history
  • Loading branch information
TheShermanTanker authored Nov 15, 2024
2 parents dc2421a + 1866c0c commit c2235ad
Show file tree
Hide file tree
Showing 4,547 changed files with 170,359 additions and 157,137 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
20 changes: 2 additions & 18 deletions .github/actions/build-jtreg/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,24 +52,8 @@ runs:

- name: 'Build JTReg'
run: |
# Try building JTReg several times, backing off exponentially on failure.
# ~500 seconds in total should be enough to capture most of the transient
# failures.
for I in `seq 0 8`; do
rm -rf build/images/jtreg
bash make/build.sh --jdk "$JAVA_HOME_17_X64" && break
S=$(( 2 ** $I ))
echo "Failure. Waiting $S seconds before retrying"
sleep $S
done
# Check if build was successful
if [ ! -d build/images/jtreg ]; then
echo "Build failed"
exit 1;
fi
# Move files to the proper locations
# Build JTReg and move files to the proper locations
bash make/build.sh --jdk "$JAVA_HOME_17_X64"
mkdir ../installed
mv build/images/jtreg/* ../installed
working-directory: jtreg/src
Expand Down
49 changes: 3 additions & 46 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ jobs:
with:
platform: macos-aarch64
runs-on: 'macos-14'
xcode-toolset-version: '14.3.1'
xcode-toolset-version: '15.4'
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
if: needs.prepare.outputs.macos-aarch64 == 'true'
Expand Down Expand Up @@ -354,6 +354,7 @@ jobs:
platform: macos-x64
bootjdk-platform: macos-x64
runs-on: macos-13
xcode-toolset-version: '14.3.1'

test-macos-aarch64:
name: macos-aarch64
Expand All @@ -364,6 +365,7 @@ jobs:
platform: macos-aarch64
bootjdk-platform: macos-aarch64
runs-on: macos-14
xcode-toolset-version: '15.4'

test-windows-x64:
name: windows-x64
Expand All @@ -374,48 +376,3 @@ jobs:
platform: windows-x64
bootjdk-platform: windows-x64
runs-on: windows-2019

# Remove bundles so they are not misconstrued as binary distributions from the JDK project
remove-bundles:
name: 'Remove bundle artifacts'
runs-on: ubuntu-22.04
if: always()
needs:
- build-linux-x64
- build-linux-x86-hs
- build-linux-x64-hs-nopch
- build-linux-x64-hs-zero
- build-linux-x64-hs-minimal
- build-linux-x64-hs-optimized
- build-linux-cross-compile
- build-alpine-linux-x64
- build-macos-x64
- build-macos-aarch64
- build-windows-x64
- build-windows-aarch64
- test-linux-x64
- test-macos-x64
- test-macos-aarch64
- test-windows-x64

steps:
- name: 'Remove bundle artifacts'
run: |
# Find and remove all bundle artifacts
# See: https://docs.github.com/en/rest/actions/artifacts?apiVersion=2022-11-28
ALL_ARTIFACT_IDS="$(curl -sL \
-H 'Accept: application/vnd.github+json' \
-H 'Authorization: Bearer ${{ github.token }}' \
-H 'X-GitHub-Api-Version: 2022-11-28' \
'${{ github.api_url }}/repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts?per_page=100')"
BUNDLE_ARTIFACT_IDS="$(echo "$ALL_ARTIFACT_IDS" | jq -r -c '.artifacts | map(select(.name|startswith("bundles-"))) | .[].id')"
for id in $BUNDLE_ARTIFACT_IDS; do
echo "Removing $id"
curl -sL \
-X DELETE \
-H 'Accept: application/vnd.github+json' \
-H 'Authorization: Bearer ${{ github.token }}' \
-H 'X-GitHub-Api-Version: 2022-11-28' \
"${{ github.api_url }}/repos/${{ github.repository }}/actions/artifacts/$id" \
|| echo "Failed to remove bundle"
done
5 changes: 4 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ on:
runs-on:
required: true
type: string
xcode-toolset-version:
required: false
type: string

env:
# These are needed to make the MSYS2 bash work properly
Expand Down Expand Up @@ -147,7 +150,7 @@ jobs:
run: |
# On macOS we need to install some dependencies for testing
brew install make
sudo xcode-select --switch /Applications/Xcode_14.3.1.app/Contents/Developer
sudo xcode-select --switch /Applications/Xcode_${{ inputs.xcode-toolset-version }}.app/Contents/Developer
# This will make GNU make available as 'make' and not only as 'gmake'
echo '/usr/local/opt/make/libexec/gnubin' >> $GITHUB_PATH
if: runner.os == 'macOS'
Expand Down
15 changes: 15 additions & 0 deletions doc/testing.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ <h1 class="title">Testing the JDK</h1>
<li><a href="#non-us-locale" id="toc-non-us-locale">Non-US
locale</a></li>
<li><a href="#pkcs11-tests" id="toc-pkcs11-tests">PKCS11 Tests</a></li>
<li><a href="#testing-with-alternative-security-providers"
id="toc-testing-with-alternative-security-providers">Testing with
alternative security providers</a></li>
<li><a href="#client-ui-tests" id="toc-client-ui-tests">Client UI
Tests</a></li>
</ul></li>
Expand Down Expand Up @@ -586,6 +589,18 @@ <h3 id="pkcs11-tests">PKCS11 Tests</h3>
JTREG=&quot;JAVA_OPTIONS=-Djdk.test.lib.artifacts.nsslib-linux_aarch64=/path/to/NSS-libs&quot;</code></pre>
<p>For more notes about the PKCS11 tests, please refer to
test/jdk/sun/security/pkcs11/README.</p>
<h3 id="testing-with-alternative-security-providers">Testing with
alternative security providers</h3>
<p>Some security tests use a hardcoded provider for
<code>KeyFactory</code>, <code>Cipher</code>,
<code>KeyPairGenerator</code>, <code>KeyGenerator</code>,
<code>AlgorithmParameterGenerator</code>, <code>KeyAgreement</code>,
<code>Mac</code>, <code>MessageDigest</code>, <code>SecureRandom</code>,
<code>Signature</code>, <code>AlgorithmParameters</code>,
<code>Configuration</code>, <code>Policy</code>, or
<code>SecretKeyFactory</code> objects. Specify the
<code>-Dtest.provider.name=NAME</code> property to use a different
provider for the service(s).</p>
<h3 id="client-ui-tests">Client UI Tests</h3>
<h4 id="system-key-shortcuts">System key shortcuts</h4>
<p>Some Client UI tests use key sequences which may be reserved by the
Expand Down
9 changes: 9 additions & 0 deletions doc/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,15 @@ $ make test TEST="jtreg:sun/security/pkcs11/Secmod/AddTrustedCert.java" \
For more notes about the PKCS11 tests, please refer to
test/jdk/sun/security/pkcs11/README.

### Testing with alternative security providers

Some security tests use a hardcoded provider for `KeyFactory`, `Cipher`,
`KeyPairGenerator`, `KeyGenerator`, `AlgorithmParameterGenerator`,
`KeyAgreement`, `Mac`, `MessageDigest`, `SecureRandom`, `Signature`,
`AlgorithmParameters`, `Configuration`, `Policy`, or `SecretKeyFactory` objects.
Specify the `-Dtest.provider.name=NAME` property to use a different provider for
the service(s).

### Client UI Tests

#### System key shortcuts
Expand Down
2 changes: 1 addition & 1 deletion make/Global.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ help:
$(info $(_) # method is 'auto', 'ignore' or 'fail' (default))
$(info $(_) TEST="test1 ..." # Use the given test descriptor(s) for testing, e.g.)
$(info $(_) # make test TEST="jdk_lang gtest:all")
$(info $(_) TEST_DEPS="dependency1 ..." # Specify additional dependencies for running tests, e.g docs-jdk
$(info $(_) TEST_DEPS="dependency1 ..." # Specify additional dependencies for running tests, e.g docs-jdk)
$(info $(_) JTREG="OPT1=x;OPT2=y" # Control the JTREG test harness, use 'make test-only JTREG=help' to list)
$(info $(_) GTEST="OPT1=x;OPT2=y" # Control the GTEST test harness, use 'make test-only GTEST=help' to list)
$(info $(_) MICRO="OPT1=x;OPT2=y" # Control the MICRO test harness, use 'make test-only MICRO=help' to list)
Expand Down
24 changes: 21 additions & 3 deletions make/Images.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ JLINK_DISABLE_WARNINGS := | ( $(GREP) -v -e "WARNING: Using incubator module" ||
JDK_IMAGE_SUPPORT_DIR := $(SUPPORT_OUTPUTDIR)/images/jdk
JRE_IMAGE_SUPPORT_DIR := $(SUPPORT_OUTPUTDIR)/images/jre

ifeq ($(JLINK_PRODUCE_LINKABLE_RUNTIME), true)
JLINK_JDK_EXTRA_OPTS += --generate-linkable-runtime
endif

$(eval $(call SetupExecute, jlink_jdk, \
WARN := Creating jdk image, \
DEPS := $(JDK_JMODS) $(BASE_RELEASE_FILE) \
Expand Down Expand Up @@ -132,10 +136,16 @@ CDS_DUMP_FLAGS = -Xmx128M -Xms128M
# Helper function for creating the CDS archives for the JDK and JRE
#
# Param1 - VM variant (e.g., server, client, zero, ...)
# Param2 - _nocoops, or empty
# Param2 - _nocoops, _coh, _nocoops_coh, or empty
define CreateCDSArchive
$1_$2_DUMP_EXTRA_ARG := $(if $(filter _nocoops, $2), -XX:-UseCompressedOops, )
$1_$2_DUMP_TYPE := $(if $(filter _nocoops, $2), -NOCOOPS, )
$1_$2_COOPS_OPTION := $(if $(findstring _nocoops, $2),-XX:-UseCompressedOops)
# enable and also explicitly disable coh as needed.
ifeq ($(call isTargetCpuBits, 64), true)
$1_$2_COH_OPTION := -XX:+UnlockExperimentalVMOptions \
$(if $(findstring _coh, $2),-XX:+UseCompactObjectHeaders,-XX:-UseCompactObjectHeaders)
endif
$1_$2_DUMP_EXTRA_ARG := $$($1_$2_COOPS_OPTION) $$($1_$2_COH_OPTION)
$1_$2_DUMP_TYPE := $(if $(findstring _nocoops, $2),-NOCOOPS,)$(if $(findstring _coh, $2),-COH,)

# Only G1 supports dumping the shared heap, so explicitly use G1 if the JVM supports it.
$1_$2_CDS_DUMP_FLAGS := $(CDS_DUMP_FLAGS) $(if $(filter g1gc, $(JVM_FEATURES_$1)), -XX:+UseG1GC)
Expand Down Expand Up @@ -190,6 +200,14 @@ ifeq ($(BUILD_CDS_ARCHIVE), true)
$(foreach v, $(JVM_VARIANTS), \
$(eval $(call CreateCDSArchive,$v,_nocoops)) \
)
ifeq ($(BUILD_CDS_ARCHIVE_COH), true)
$(foreach v, $(JVM_VARIANTS), \
$(eval $(call CreateCDSArchive,$v,_coh)) \
)
$(foreach v, $(JVM_VARIANTS), \
$(eval $(call CreateCDSArchive,$v,_nocoops_coh)) \
)
endif
endif
endif

Expand Down
12 changes: 6 additions & 6 deletions make/RunTests.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ define SetupRunMicroTestBody
$1_JMH_JVM_ARGS += $$(MICRO_VM_OPTIONS) $$(MICRO_JAVA_OPTIONS)
endif

$1_MICRO_VM_OPTIONS := -jvmArgs $(call ShellQuote,$$($1_JMH_JVM_ARGS))
$1_MICRO_VM_OPTIONS := -jvmArgsPrepend $(call ShellQuote,$$($1_JMH_JVM_ARGS))

ifneq ($$(MICRO_ITER), )
$1_MICRO_ITER := -i $$(MICRO_ITER)
Expand Down Expand Up @@ -853,11 +853,11 @@ define SetupRunJtregTestBody
endif

ifneq ($$(findstring -XX:+UseZGC, $$(JTREG_ALL_OPTIONS)), )
ifneq ($$(findstring -XX:-ZGenerational, $$(JTREG_ALL_OPTIONS)), )
JTREG_AUTO_PROBLEM_LISTS += ProblemList-zgc.txt
else
JTREG_AUTO_PROBLEM_LISTS += ProblemList-generational-zgc.txt
endif
JTREG_AUTO_PROBLEM_LISTS += ProblemList-zgc.txt
endif

ifneq ($$(findstring -XX:+UseShenandoahGC, $$(JTREG_ALL_OPTIONS)), )
JTREG_AUTO_PROBLEM_LISTS += ProblemList-shenandoah.txt
endif

ifneq ($$(JTREG_EXTRA_PROBLEM_LISTS), )
Expand Down
3 changes: 3 additions & 0 deletions make/autoconf/basic.m4
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ AC_DEFUN_ONCE([BASIC_SETUP_PATHS],
fi
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
AC_MSG_ERROR([32-bit Windows builds are not supported])
fi
BASIC_SETUP_PATHS_WINDOWS
fi
Expand Down
1 change: 1 addition & 0 deletions make/autoconf/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ JDKOPT_ENABLE_DISABLE_GENERATE_CLASSLIST
JDKOPT_EXCLUDE_TRANSLATIONS
JDKOPT_ENABLE_DISABLE_MANPAGES
JDKOPT_ENABLE_DISABLE_CDS_ARCHIVE
JDKOPT_ENABLE_DISABLE_CDS_ARCHIVE_COH
JDKOPT_ENABLE_DISABLE_COMPATIBLE_CDS_ALIGNMENT
JDKOPT_SETUP_MACOSX_SIGNING

Expand Down
30 changes: 30 additions & 0 deletions make/autoconf/flags-cflags.m4
Original file line number Diff line number Diff line change
Expand Up @@ -912,6 +912,36 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
IF_FALSE: [$2FDLIBM_CFLAGS=""])
fi
AC_SUBST($2FDLIBM_CFLAGS)
# Check whether the compiler supports the Arm C Language Extensions (ACLE)
# for SVE. Set SVE_CFLAGS to -march=armv8-a+sve if it does.
# ACLE and this flag are required to build the aarch64 SVE related functions in
# libvectormath.
if test "x$OPENJDK_TARGET_CPU" = "xaarch64"; then
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
AC_LANG_PUSH(C)
OLD_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -march=armv8-a+sve"
AC_MSG_CHECKING([if Arm SVE ACLE is supported])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <arm_sve.h>],
[
svint32_t r = svdup_n_s32(1);
return 0;
])],
[
AC_MSG_RESULT([yes])
$2SVE_CFLAGS="-march=armv8-a+sve"
],
[
AC_MSG_RESULT([no])
$2SVE_CFLAGS=""
]
)
CFLAGS="$OLD_CFLAGS"
AC_LANG_POP(C)
fi
fi
AC_SUBST($2SVE_CFLAGS)
])

# FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
Expand Down
4 changes: 3 additions & 1 deletion make/autoconf/flags-ldflags.m4
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER],
if test "x$OPENJDK_TARGET_OS" = xlinux; then
# Clang needs the lld linker to work correctly
BASIC_LDFLAGS="-fuse-ld=lld -Wl,--exclude-libs,ALL"
UTIL_REQUIRE_PROGS(LLD, lld)
if test "x$CXX_IS_USER_SUPPLIED" = xfalse && test "x$CC_IS_USER_SUPPLIED" = xfalse; then
UTIL_REQUIRE_PROGS(LLD, lld, $TOOLCHAIN_PATH:$PATH)
fi
fi
if test "x$OPENJDK_TARGET_OS" = xaix; then
BASIC_LDFLAGS="-Wl,-b64 -Wl,-brtl -Wl,-bnorwexec -Wl,-bnolibpath -Wl,-bnoexpall \
Expand Down
Loading

0 comments on commit c2235ad

Please sign in to comment.