Skip to content

Commit 3625385

Browse files
committed
Merge tag 'jdk-17.0.3-ga' into upstream-update
Added tag jdk-17.0.3-ga for changeset c1a8749
2 parents da9988c + c1a8749 commit 3625385

File tree

1,469 files changed

+61459
-29627
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,469 files changed

+61459
-29627
lines changed

.github/workflows/submit.yml

Lines changed: 108 additions & 13 deletions
Large diffs are not rendered by default.

.jcheck/conf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[general]
2-
project=jdk
2+
project=jdk-updates
33
jbs=JDK
4+
version=17.0.3
45

56
[checks]
67
error=author,committer,reviewers,merge,issues,executable,symlink,message,hg-tag,whitespace,problemlists

doc/building.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ <h4 id="advanced-make-control-variables">Advanced Make Control Variables</h4>
506506
</ul>
507507
<h2 id="running-tests">Running Tests</h2>
508508
<p>Most of the JDK tests are using the <a href="http://openjdk.java.net/jtreg">JTReg</a> test framework. Make sure that your configuration knows where to find your installation of JTReg. If this is not picked up automatically, use the <code>--with-jtreg=&lt;path to jtreg home&gt;</code> option to point to the JTReg framework. Note that this option should point to the JTReg home, i.e. the top directory, containing <code>lib/jtreg.jar</code> etc.</p>
509-
<p>The <a href="https://wiki.openjdk.java.net/display/Adoption">Adoption Group</a> provides recent builds of jtreg <a href="https://ci.adoptopenjdk.net/view/Dependencies/job/jtreg/lastSuccessfulBuild/artifact">here</a>. Download the latest <code>.tar.gz</code> file, unpack it, and point <code>--with-jtreg</code> to the <code>jtreg</code> directory that you just unpacked.</p>
509+
<p>The <a href="https://wiki.openjdk.java.net/display/Adoption">Adoption Group</a> provides recent builds of jtreg <a href="https://ci.adoptopenjdk.net/view/Dependencies/job/dependency_pipeline/lastSuccessfulBuild/artifact/jtreg/">here</a>. Download the latest <code>.tar.gz</code> file, unpack it, and point <code>--with-jtreg</code> to the <code>jtreg</code> directory that you just unpacked.</p>
510510
<p>Building of Hotspot Gtest suite requires the source code of Google Test framework. The top directory, which contains both <code>googletest</code> and <code>googlemock</code> directories, should be specified via <code>--with-gtest</code>. The supported version of Google Test is 1.8.1, whose source code can be obtained:</p>
511511
<ul>
512512
<li>by downloading and unpacking the source bundle from <a href="https://github.com/google/googletest/releases/tag/release-1.8.1">here</a></li>

doc/building.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -848,7 +848,7 @@ containing `lib/jtreg.jar` etc.
848848
849849
The [Adoption Group](https://wiki.openjdk.java.net/display/Adoption) provides
850850
recent builds of jtreg [here](
851-
https://ci.adoptopenjdk.net/view/Dependencies/job/jtreg/lastSuccessfulBuild/artifact).
851+
https://ci.adoptopenjdk.net/view/Dependencies/job/dependency_pipeline/lastSuccessfulBuild/artifact/jtreg/).
852852
Download the latest `.tar.gz` file, unpack it, and point `--with-jtreg` to the
853853
`jtreg` directory that you just unpacked.
854854

doc/testing.html

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ <h1 class="title">Testing the JDK</h1>
2727
<li><a href="#configuration">Configuration</a></li>
2828
</ul></li>
2929
<li><a href="#test-selection">Test selection</a><ul>
30+
<li><a href="#common-test-groups">Common Test Groups</a></li>
3031
<li><a href="#jtreg">JTReg</a></li>
3132
<li><a href="#gtest">Gtest</a></li>
3233
<li><a href="#microbenchmarks">Microbenchmarks</a></li>
@@ -67,6 +68,19 @@ <h2 id="test-selection">Test selection</h2>
6768
<p>All functionality is available using the <code>test</code> make target. In this use case, the test or tests to be executed is controlled using the <code>TEST</code> variable. To speed up subsequent test runs with no source code changes, <code>test-only</code> can be used instead, which do not depend on the source and test image build.</p>
6869
<p>For some common top-level tests, direct make targets have been generated. This includes all JTReg test groups, the hotspot gtest, and custom tests (if present). This means that <code>make test-tier1</code> is equivalent to <code>make test TEST=&quot;tier1&quot;</code>, but the latter is more tab-completion friendly. For more complex test runs, the <code>test TEST=&quot;x&quot;</code> solution needs to be used.</p>
6970
<p>The test specifications given in <code>TEST</code> is parsed into fully qualified test descriptors, which clearly and unambigously show which tests will be run. As an example, <code>:tier1</code> will expand to <code>jtreg:$(TOPDIR)/test/hotspot/jtreg:tier1 jtreg:$(TOPDIR)/test/jdk:tier1 jtreg:$(TOPDIR)/test/langtools:tier1 jtreg:$(TOPDIR)/test/nashorn:tier1 jtreg:$(TOPDIR)/test/jaxp:tier1</code>. You can always submit a list of fully qualified test descriptors in the <code>TEST</code> variable if you want to shortcut the parser.</p>
71+
<h3 id="common-test-groups">Common Test Groups</h3>
72+
<p>Ideally, all tests are run for every change but this may not be practical due to the limited testing resources, the scope of the change, etc.</p>
73+
<p>The source tree currently defines a few common test groups in the relevant <code>TEST.groups</code> files. There are test groups that cover a specific component, for example <code>hotspot_gc</code>. It is a good idea to look into <code>TEST.groups</code> files to get a sense what tests are relevant to a particular JDK component.</p>
74+
<p>Component-specific tests may miss some unintended consequences of a change, so other tests should also be run. Again, it might be impractical to run all tests, and therefore <em>tiered</em> test groups exist. Tiered test groups are not component-specific, but rather cover the significant parts of the entire JDK.</p>
75+
<p>Multiple tiers allow balancing test coverage and testing costs. Lower test tiers are supposed to contain the simpler, quicker and more stable tests. Higher tiers are supposed to contain progressively more thorough, slower, and sometimes less stable tests, or the tests that require special configuration.</p>
76+
<p>Contributors are expected to run the tests for the areas that are changed, and the first N tiers they can afford to run, but at least tier1.</p>
77+
<p>A brief description of the tiered test groups:</p>
78+
<ul>
79+
<li><p><code>tier1</code>: This is the lowest test tier. Multiple developers run these tests every day. Because of the widespread use, the tests in <code>tier1</code> are carefully selected and optimized to run fast, and to run in the most stable manner. The test failures in <code>tier1</code> are usually followed up on quickly, either with fixes, or adding relevant tests to problem list. GitHub Actions workflows, if enabled, run <code>tier1</code> tests.</p></li>
80+
<li><p><code>tier2</code>: This test group covers even more ground. These contain, among other things, tests that either run for too long to be at <code>tier1</code>, or may require special configuration, or tests that are less stable, or cover the broader range of non-core JVM and JDK features/components (for example, XML).</p></li>
81+
<li><p><code>tier3</code>: This test group includes more stressful tests, the tests for corner cases not covered by previous tiers, plus the tests that require GUIs. As such, this suite should either be run with low concurrency (<code>TEST_JOBS=1</code>), or without headful tests (<code>JTREG_KEYWORDS=\!headful</code>), or both.</p></li>
82+
<li><p><code>tier4</code>: This test group includes every other test not covered by previous tiers. It includes, for example, <code>vmTestbase</code> suites for Hotspot, which run for many hours even on large machines. It also runs GUI tests, so the same <code>TEST_JOBS</code> and <code>JTREG_KEYWORDS</code> caveats apply.</p></li>
83+
</ul>
7084
<h3 id="jtreg">JTReg</h3>
7185
<p>JTReg tests can be selected either by picking a JTReg test group, or a selection of files or directories containing JTReg tests.</p>
7286
<p>JTReg test groups can be specified either without a test root, e.g. <code>:tier1</code> (or <code>tier1</code>, the initial colon is optional), or with, e.g. <code>hotspot:tier1</code>, <code>test/jdk:jdk_util</code> or <code>$(TOPDIR)/test/hotspot/jtreg:hotspot_all</code>. The test root can be specified either as an absolute path, or a path relative to the JDK top directory, or the <code>test</code> directory. For simplicity, the hotspot JTReg test root, which really is <code>hotspot/jtreg</code> can be abbreviated as just <code>hotspot</code>.</p>
@@ -179,7 +193,9 @@ <h4 id="launcher_options">LAUNCHER_OPTIONS</h4>
179193
<h4 id="aot_modules-1">AOT_MODULES</h4>
180194
<p>Generate AOT modules before testing for the specified module, or set of modules. If multiple modules are specified, they should be separated by space (or, to help avoid quoting issues, the special value <code>%20</code>).</p>
181195
<h4 id="retry_count">RETRY_COUNT</h4>
182-
<p>Retry failed tests up to a set number of times. Defaults to 0.</p>
196+
<p>Retry failed tests up to a set number of times, until they pass. This allows to pass the tests with intermittent failures. Defaults to 0.</p>
197+
<h4 id="repeat_count">REPEAT_COUNT</h4>
198+
<p>Repeat the tests up to a set number of times, stopping at first failure. This helps to reproduce intermittent test failures. Defaults to 0.</p>
183199
<h3 id="gtest-keywords">Gtest keywords</h3>
184200
<h4 id="repeat">REPEAT</h4>
185201
<p>The number of times to repeat the tests (<code>--gtest_repeat</code>).</p>

doc/testing.md

Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,52 @@ jtreg:$(TOPDIR)/test/nashorn:tier1 jtreg:$(TOPDIR)/test/jaxp:tier1`. You can
6464
always submit a list of fully qualified test descriptors in the `TEST` variable
6565
if you want to shortcut the parser.
6666

67+
### Common Test Groups
68+
69+
Ideally, all tests are run for every change but this may not be practical due to the limited
70+
testing resources, the scope of the change, etc.
71+
72+
The source tree currently defines a few common test groups in the relevant `TEST.groups`
73+
files. There are test groups that cover a specific component, for example `hotspot_gc`.
74+
It is a good idea to look into `TEST.groups` files to get a sense what tests are relevant
75+
to a particular JDK component.
76+
77+
Component-specific tests may miss some unintended consequences of a change, so other
78+
tests should also be run. Again, it might be impractical to run all tests, and therefore
79+
_tiered_ test groups exist. Tiered test groups are not component-specific, but rather cover
80+
the significant parts of the entire JDK.
81+
82+
Multiple tiers allow balancing test coverage and testing costs. Lower test tiers are supposed to
83+
contain the simpler, quicker and more stable tests. Higher tiers are supposed to contain
84+
progressively more thorough, slower, and sometimes less stable tests, or the tests that require
85+
special configuration.
86+
87+
Contributors are expected to run the tests for the areas that are changed, and the first N tiers
88+
they can afford to run, but at least tier1.
89+
90+
A brief description of the tiered test groups:
91+
92+
- `tier1`: This is the lowest test tier. Multiple developers run these tests every day.
93+
Because of the widespread use, the tests in `tier1` are carefully selected and optimized to run
94+
fast, and to run in the most stable manner. The test failures in `tier1` are usually followed up
95+
on quickly, either with fixes, or adding relevant tests to problem list. GitHub Actions workflows,
96+
if enabled, run `tier1` tests.
97+
98+
- `tier2`: This test group covers even more ground. These contain, among other things,
99+
tests that either run for too long to be at `tier1`, or may require special configuration,
100+
or tests that are less stable, or cover the broader range of non-core JVM and JDK features/components
101+
(for example, XML).
102+
103+
- `tier3`: This test group includes more stressful tests, the tests for corner cases
104+
not covered by previous tiers, plus the tests that require GUIs. As such, this suite
105+
should either be run with low concurrency (`TEST_JOBS=1`), or without headful tests
106+
(`JTREG_KEYWORDS=\!headful`), or both.
107+
108+
- `tier4`: This test group includes every other test not covered by previous tiers. It includes,
109+
for example, `vmTestbase` suites for Hotspot, which run for many hours even on large
110+
machines. It also runs GUI tests, so the same `TEST_JOBS` and `JTREG_KEYWORDS` caveats
111+
apply.
112+
67113
### JTReg
68114

69115
JTReg tests can be selected either by picking a JTReg test group, or a selection
@@ -373,7 +419,15 @@ modules. If multiple modules are specified, they should be separated by space
373419

374420
#### RETRY_COUNT
375421

376-
Retry failed tests up to a set number of times. Defaults to 0.
422+
Retry failed tests up to a set number of times, until they pass.
423+
This allows to pass the tests with intermittent failures.
424+
Defaults to 0.
425+
426+
#### REPEAT_COUNT
427+
428+
Repeat the tests up to a set number of times, stopping at first failure.
429+
This helps to reproduce intermittent test failures.
430+
Defaults to 0.
377431

378432
### Gtest keywords
379433

make/Main.gmk

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ $(eval $(call SetupTarget, vscode-project-ccls, \
324324
# aren't built until after libjava and libjvm are available to link to.
325325
$(eval $(call SetupTarget, demos-jdk, \
326326
MAKEFILE := CompileDemos, \
327-
DEPS := java.base-libs exploded-image, \
327+
DEPS := java.base-libs exploded-image buildtools-jdk, \
328328
))
329329

330330
$(eval $(call SetupTarget, test-image-demos-jdk, \
@@ -383,12 +383,12 @@ bootcycle-images:
383383

384384
$(eval $(call SetupTarget, zip-security, \
385385
MAKEFILE := ZipSecurity, \
386-
DEPS := java.base-java java.security.jgss-java java.security.jgss-libs, \
386+
DEPS := buildtools-jdk java.base-java java.security.jgss-java java.security.jgss-libs, \
387387
))
388388

389389
$(eval $(call SetupTarget, zip-source, \
390390
MAKEFILE := ZipSource, \
391-
DEPS := gensrc, \
391+
DEPS := buildtools-jdk gensrc, \
392392
))
393393

394394
$(eval $(call SetupTarget, jrtfs-jar, \
@@ -508,13 +508,13 @@ $(eval $(call SetupTarget, docs-jdk-index, \
508508
$(eval $(call SetupTarget, docs-zip, \
509509
MAKEFILE := Docs, \
510510
TARGET := docs-zip, \
511-
DEPS := docs-jdk, \
511+
DEPS := docs-jdk buildtools-jdk, \
512512
))
513513

514514
$(eval $(call SetupTarget, docs-specs-zip, \
515515
MAKEFILE := Docs, \
516516
TARGET := docs-specs-zip, \
517-
DEPS := docs-jdk-specs, \
517+
DEPS := docs-jdk-specs buildtools-jdk, \
518518
))
519519

520520
$(eval $(call SetupTarget, update-build-docs, \

make/RunTests.gmk

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ $(eval $(call SetTestOpt,FAILURE_HANDLER_TIMEOUT,JTREG))
200200
$(eval $(call ParseKeywordVariable, JTREG, \
201201
SINGLE_KEYWORDS := JOBS TIMEOUT_FACTOR FAILURE_HANDLER_TIMEOUT \
202202
TEST_MODE ASSERT VERBOSE RETAIN MAX_MEM RUN_PROBLEM_LISTS \
203-
RETRY_COUNT MAX_OUTPUT, \
203+
RETRY_COUNT REPEAT_COUNT MAX_OUTPUT, \
204204
STRING_KEYWORDS := OPTIONS JAVA_OPTIONS VM_OPTIONS KEYWORDS \
205205
EXTRA_PROBLEM_LISTS LAUNCHER_OPTIONS, \
206206
))
@@ -744,6 +744,15 @@ define SetupRunJtregTestBody
744744
JTREG_RETAIN ?= fail,error
745745
JTREG_RUN_PROBLEM_LISTS ?= false
746746
JTREG_RETRY_COUNT ?= 0
747+
JTREG_REPEAT_COUNT ?= 0
748+
749+
ifneq ($$(JTREG_RETRY_COUNT), 0)
750+
ifneq ($$(JTREG_REPEAT_COUNT), 0)
751+
$$(info Error: Cannot use both JTREG_RETRY_COUNT and JTREG_REPEAT_COUNT together.)
752+
$$(info Please choose one or the other.)
753+
$$(error Cannot continue)
754+
endif
755+
endif
747756

748757
ifneq ($$(JTREG_LAUNCHER_OPTIONS), )
749758
$1_JTREG_LAUNCHER_OPTIONS += $$(JTREG_LAUNCHER_OPTIONS)
@@ -866,6 +875,18 @@ define SetupRunJtregTestBody
866875
done
867876
endif
868877

878+
ifneq ($$(JTREG_REPEAT_COUNT), 0)
879+
$1_COMMAND_LINE := \
880+
for i in {1..$$(JTREG_REPEAT_COUNT)}; do \
881+
$$(PRINTF) "\nRepeating Jtreg run: $$$$i out of $$(JTREG_REPEAT_COUNT)\n"; \
882+
$$($1_COMMAND_LINE); \
883+
if [ "`$$(CAT) $$($1_EXITCODE)`" != "0" ]; then \
884+
$$(PRINTF) "\nFailures detected, no more repeats.\n"; \
885+
break; \
886+
fi; \
887+
done
888+
endif
889+
869890
run-test-$1: pre-run-test clean-workdir-$1
870891
$$(call LogWarn)
871892
$$(call LogWarn, Running test '$$($1_TEST)')

make/ToolsJdk.gmk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ TOOL_GENERATECACERTS = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_class
8080
TOOL_GENERATEEMOJIDATA = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
8181
build.tools.generateemojidata.GenerateEmojiData
8282

83+
TOOL_MAKEZIPREPRODUCIBLE = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
84+
build.tools.makezipreproducible.MakeZipReproducible
8385

8486
# TODO: There are references to the jdwpgen.jar in jdk/make/netbeans/jdwpgen/build.xml
8587
# and nbproject/project.properties in the same dir. Needs to be looked at.

make/autoconf/basic.m4

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
33
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
#
55
# This code is free software; you can redistribute it and/or modify it
@@ -94,11 +94,6 @@ AC_DEFUN_ONCE([BASIC_SETUP_PATHS],
9494
9595
# Locate the directory of this script.
9696
AUTOCONF_DIR=$TOPDIR/make/autoconf
97-
98-
# Setup username (for use in adhoc version strings etc)
99-
# Outer [ ] to quote m4.
100-
[ USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'` ]
101-
AC_SUBST(USERNAME)
10297
])
10398

10499
###############################################################################

0 commit comments

Comments
 (0)