Skip to content

Commit eb42869

Browse files
authored
Merge pull request #1924 from SAP/pr-jdk-17.0.15+2
Merge to tag jdk-17.0.15+2
2 parents 7eaf00a + 3184aa9 commit eb42869

File tree

31 files changed

+1372
-356
lines changed

31 files changed

+1372
-356
lines changed
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
#
2+
# Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved.
3+
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4+
#
5+
# This code is free software; you can redistribute it and/or modify it
6+
# under the terms of the GNU General Public License version 2 only, as
7+
# published by the Free Software Foundation. Oracle designates this
8+
# particular file as subject to the "Classpath" exception as provided
9+
# by Oracle in the LICENSE file that accompanied this code.
10+
#
11+
# This code is distributed in the hope that it will be useful, but WITHOUT
12+
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13+
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14+
# version 2 for more details (a copy is included in the LICENSE file that
15+
# accompanied this code).
16+
#
17+
# You should have received a copy of the GNU General Public License version
18+
# 2 along with this work; if not, write to the Free Software Foundation,
19+
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20+
#
21+
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22+
# or visit www.oracle.com if you need additional information or have any
23+
# questions.
24+
#
25+
26+
name: 'Build JTReg'
27+
description: 'Build JTReg'
28+
29+
runs:
30+
using: composite
31+
steps:
32+
- name: 'Get JTReg version configuration'
33+
id: version
34+
uses: ./.github/actions/config
35+
with:
36+
var: JTREG_VERSION
37+
38+
- name: 'Check cache for already built JTReg'
39+
id: get-cached
40+
uses: actions/cache@v4
41+
with:
42+
path: jtreg/installed
43+
key: jtreg-${{ steps.version.outputs.value }}
44+
45+
- name: 'Checkout the JTReg source'
46+
uses: actions/checkout@v4
47+
with:
48+
repository: openjdk/jtreg
49+
ref: jtreg-${{ steps.version.outputs.value }}
50+
path: jtreg/src
51+
if: (steps.get-cached.outputs.cache-hit != 'true')
52+
53+
- name: 'Build JTReg'
54+
run: |
55+
# Build JTReg and move files to the proper locations
56+
bash make/build.sh --jdk "$JAVA_HOME_17_X64"
57+
mkdir ../installed
58+
mv build/images/jtreg/* ../installed
59+
working-directory: jtreg/src
60+
shell: bash
61+
if: (steps.get-cached.outputs.cache-hit != 'true')
62+
63+
- name: 'Upload JTReg artifact'
64+
uses: actions/upload-artifact@v4
65+
with:
66+
name: bundles-jtreg-${{ steps.version.outputs.value }}
67+
path: jtreg/installed
68+
retention-days: 1

.github/actions/get-jtreg/action.yml

Lines changed: 5 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#
2525

2626
name: 'Get JTReg'
27-
description: 'Download JTReg from cache or source location'
27+
description: 'Get JTReg'
2828
outputs:
2929
path:
3030
description: 'Path to the installed JTReg'
@@ -39,36 +39,12 @@ runs:
3939
with:
4040
var: JTREG_VERSION
4141

42-
- name: 'Check cache for JTReg'
43-
id: get-cached-jtreg
44-
uses: actions/cache@v4
42+
- name: 'Download JTReg artifact'
43+
id: download-jtreg
44+
uses: actions/download-artifact@v4
4545
with:
46+
name: bundles-jtreg-${{ steps.version.outputs.value }}
4647
path: jtreg/installed
47-
key: jtreg-${{ steps.version.outputs.value }}
48-
49-
- name: 'Checkout the JTReg source'
50-
uses: actions/checkout@v4
51-
with:
52-
repository: openjdk/jtreg
53-
ref: jtreg-${{ steps.version.outputs.value }}
54-
path: jtreg/src
55-
if: steps.get-cached-jtreg.outputs.cache-hit != 'true'
56-
57-
- name: 'Build JTReg'
58-
run: |
59-
# If runner architecture is x64 set JAVA_HOME_17_X64 otherwise set to JAVA_HOME_17_arm64
60-
if [[ '${{ runner.arch }}' == 'X64' ]]; then
61-
JDK="$JAVA_HOME_17_X64"
62-
else
63-
JDK="$JAVA_HOME_17_arm64"
64-
fi
65-
# Build JTReg and move files to the proper locations
66-
bash make/build.sh --jdk "$JDK"
67-
mkdir ../installed
68-
mv build/images/jtreg/* ../installed
69-
working-directory: jtreg/src
70-
shell: bash
71-
if: steps.get-cached-jtreg.outputs.cache-hit != 'true'
7248

7349
- name: 'Export path to where JTReg is installed'
7450
id: path-name

.github/workflows/main.yml

Lines changed: 37 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ jobs:
5858
### Determine platforms to include
5959
###
6060

61-
select:
62-
name: 'Select platforms'
61+
prepare:
62+
name: 'Prepare the run'
6363
# SapMachine 2022-06-23: On 'pull_request' we only want to run GHA if the PR comes from a remote repo. Otherwise we have the run on 'push' already as a check.
6464
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name }}
6565
runs-on: ubuntu-22.04
@@ -74,7 +74,19 @@ jobs:
7474
windows-aarch64: ${{ steps.include.outputs.windows-aarch64 }}
7575

7676
steps:
77-
# This function must be inlined in main.yml, or we'd be forced to checkout the repo
77+
- name: 'Checkout the scripts'
78+
uses: actions/checkout@v4
79+
with:
80+
sparse-checkout: |
81+
.github
82+
make/conf/github-actions.conf
83+
84+
- name: 'Build JTReg'
85+
id: jtreg
86+
uses: ./.github/actions/build-jtreg
87+
88+
# TODO: Now that we are checking out the repo scripts, we can put the following code
89+
# into a separate file
7890
- name: 'Check what jobs to run'
7991
id: include
8092
run: |
@@ -131,18 +143,18 @@ jobs:
131143

132144
build-linux-x64:
133145
name: linux-x64
134-
needs: select
146+
needs: prepare
135147
uses: ./.github/workflows/build-linux.yml
136148
with:
137149
platform: linux-x64
138150
gcc-major-version: '10'
139151
configure-arguments: ${{ github.event.inputs.configure-arguments }}
140152
make-arguments: ${{ github.event.inputs.make-arguments }}
141-
if: needs.select.outputs.linux-x64 == 'true'
153+
if: needs.prepare.outputs.linux-x64 == 'true'
142154

143155
build-linux-x86-hs:
144156
name: linux-x86-hs
145-
needs: select
157+
needs: prepare
146158
uses: ./.github/workflows/build-linux.yml
147159
with:
148160
platform: linux-x86
@@ -156,11 +168,11 @@ jobs:
156168
extra-conf-options: '--with-target-bits=32'
157169
configure-arguments: ${{ github.event.inputs.configure-arguments }}
158170
make-arguments: ${{ github.event.inputs.make-arguments }}
159-
if: needs.select.outputs.linux-x86-hs == 'true'
171+
if: needs.prepare.outputs.linux-x86-hs == 'true'
160172

161173
build-linux-x64-hs-nopch:
162174
name: linux-x64-hs-nopch
163-
needs: select
175+
needs: prepare
164176
uses: ./.github/workflows/build-linux.yml
165177
with:
166178
platform: linux-x64
@@ -170,11 +182,11 @@ jobs:
170182
extra-conf-options: '--disable-precompiled-headers'
171183
configure-arguments: ${{ github.event.inputs.configure-arguments }}
172184
make-arguments: ${{ github.event.inputs.make-arguments }}
173-
if: needs.select.outputs.linux-x64-variants == 'true'
185+
if: needs.prepare.outputs.linux-x64-variants == 'true'
174186

175187
build-linux-x64-hs-zero:
176188
name: linux-x64-hs-zero
177-
needs: select
189+
needs: prepare
178190
uses: ./.github/workflows/build-linux.yml
179191
with:
180192
platform: linux-x64
@@ -184,11 +196,11 @@ jobs:
184196
extra-conf-options: '--with-jvm-variants=zero --disable-precompiled-headers'
185197
configure-arguments: ${{ github.event.inputs.configure-arguments }}
186198
make-arguments: ${{ github.event.inputs.make-arguments }}
187-
if: needs.select.outputs.linux-x64-variants == 'true'
199+
if: needs.prepare.outputs.linux-x64-variants == 'true'
188200

189201
build-linux-x64-hs-minimal:
190202
name: linux-x64-hs-minimal
191-
needs: select
203+
needs: prepare
192204
uses: ./.github/workflows/build-linux.yml
193205
with:
194206
platform: linux-x64
@@ -198,11 +210,11 @@ jobs:
198210
extra-conf-options: '--with-jvm-variants=minimal --disable-precompiled-headers'
199211
configure-arguments: ${{ github.event.inputs.configure-arguments }}
200212
make-arguments: ${{ github.event.inputs.make-arguments }}
201-
if: needs.select.outputs.linux-x64-variants == 'true'
213+
if: needs.prepare.outputs.linux-x64-variants == 'true'
202214

203215
build-linux-x64-hs-optimized:
204216
name: linux-x64-hs-optimized
205-
needs: select
217+
needs: prepare
206218
uses: ./.github/workflows/build-linux.yml
207219
with:
208220
platform: linux-x64
@@ -213,58 +225,57 @@ jobs:
213225
extra-conf-options: '--with-debug-level=optimized --disable-precompiled-headers'
214226
configure-arguments: ${{ github.event.inputs.configure-arguments }}
215227
make-arguments: ${{ github.event.inputs.make-arguments }}
216-
if: needs.select.outputs.linux-x64-variants == 'true'
228+
if: needs.prepare.outputs.linux-x64-variants == 'true'
217229

218230
build-linux-cross-compile:
219231
name: linux-cross-compile
220-
needs:
221-
- select
232+
needs: prepare
222233
uses: ./.github/workflows/build-cross-compile.yml
223234
with:
224235
gcc-major-version: '10'
225236
configure-arguments: ${{ github.event.inputs.configure-arguments }}
226237
make-arguments: ${{ github.event.inputs.make-arguments }}
227-
if: needs.select.outputs.linux-cross-compile == 'true'
238+
if: needs.prepare.outputs.linux-cross-compile == 'true'
228239

229240
build-macos-x64:
230241
name: macos-x64
231-
needs: select
242+
needs: prepare
232243
uses: ./.github/workflows/build-macos.yml
233244
with:
234245
platform: macos-x64
235246
runs-on: 'macos-13'
236247
xcode-toolset-version: '14.3.1'
237248
configure-arguments: ${{ github.event.inputs.configure-arguments }}
238249
make-arguments: ${{ github.event.inputs.make-arguments }}
239-
if: needs.select.outputs.macos-x64 == 'true'
250+
if: needs.prepare.outputs.macos-x64 == 'true'
240251

241252
build-macos-aarch64:
242253
name: macos-aarch64
243-
needs: select
254+
needs: prepare
244255
uses: ./.github/workflows/build-macos.yml
245256
with:
246257
platform: macos-aarch64
247258
runs-on: 'macos-14'
248259
xcode-toolset-version: '15.4'
249260
configure-arguments: ${{ github.event.inputs.configure-arguments }}
250261
make-arguments: ${{ github.event.inputs.make-arguments }}
251-
if: needs.select.outputs.macos-aarch64 == 'true'
262+
if: needs.prepare.outputs.macos-aarch64 == 'true'
252263

253264
build-windows-x64:
254265
name: windows-x64
255-
needs: select
266+
needs: prepare
256267
uses: ./.github/workflows/build-windows.yml
257268
with:
258269
platform: windows-x64
259270
msvc-toolset-version: '14.29'
260271
msvc-toolset-architecture: 'x86.x64'
261272
configure-arguments: ${{ github.event.inputs.configure-arguments }}
262273
make-arguments: ${{ github.event.inputs.make-arguments }}
263-
if: needs.select.outputs.windows-x64 == 'true'
274+
if: needs.prepare.outputs.windows-x64 == 'true'
264275

265276
build-windows-aarch64:
266277
name: windows-aarch64
267-
needs: select
278+
needs: prepare
268279
uses: ./.github/workflows/build-windows.yml
269280
with:
270281
platform: windows-aarch64
@@ -274,7 +285,7 @@ jobs:
274285
extra-conf-options: '--openjdk-target=aarch64-unknown-cygwin'
275286
configure-arguments: ${{ github.event.inputs.configure-arguments }}
276287
make-arguments: ${{ github.event.inputs.make-arguments }}
277-
if: needs.select.outputs.windows-aarch64 == 'true'
288+
if: needs.prepare.outputs.windows-aarch64 == 'true'
278289

279290
###
280291
### Test jobs

src/java.desktop/share/classes/com/sun/imageio/plugins/wbmp/WBMPImageReader.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2003, 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
@@ -244,8 +244,8 @@ public BufferedImage read(int imageIndex, ImageReadParam param)
244244
}
245245

246246
// If noTransform is necessary, read the data.
247-
iis.read(((DataBufferByte)tile.getDataBuffer()).getData(),
248-
0, height*sm.getScanlineStride());
247+
iis.readFully(((DataBufferByte)tile.getDataBuffer()).getData(),
248+
0, height*sm.getScanlineStride());
249249
processImageUpdate(bi,
250250
0, 0,
251251
width, height, 1, 1,
@@ -280,7 +280,7 @@ public BufferedImage read(int imageIndex, ImageReadParam param)
280280

281281
if (abortRequested())
282282
break;
283-
iis.read(buf, 0, len);
283+
iis.readFully(buf, 0, len);
284284
for (int i = 0; i < destinationRegion.width; i++) {
285285
//get the bit and assign to the data buffer of the raster
286286
int v = (buf[srcPos[i]] >> srcOff[i]) & 1;

test/failure_handler/src/share/classes/jdk/test/failurehandler/action/ActionSet.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2015, 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2015, 2024, 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
@@ -104,8 +104,11 @@ private List<PatternAction> getPatternActions(PrintWriter log,
104104

105105
private String[] getTools(PrintWriter writer, Properties p, String key) {
106106
String value = p.getProperty(key);
107-
if (value == null || value.isEmpty()) {
108-
writer.printf("ERROR: '%s' property is empty%n", key);
107+
if (value == null) {
108+
writer.printf("ERROR: '%s' property is not set%n", key);
109+
return new String[]{};
110+
}
111+
if (value.isEmpty()) {
109112
return new String[]{};
110113
}
111114
return value.split(" ");

test/failure_handler/src/share/conf/linux.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ native.locks.app=lslocks
4949
native.locks.args=-u --pid %p
5050

5151
native.stack.app=gdb
52-
native.stack.args=--pid=%p\0-batch\0-ex\0thread apply all backtrace
52+
native.stack.args=--pid=%p\0-batch\0-ex\0info threads\0-ex\0thread apply all backtrace
5353
native.stack.args.delimiter=\0
5454
native.stack.params.repeat=6
5555

@@ -60,7 +60,7 @@ native.core.args=-ABRT %p
6060
cores=native.gdb
6161
native.gdb.app=gdb
6262
# Assume that java standard laucher has been used
63-
native.gdb.args=%java\0-c\0%p\0-batch\0-ex\0thread apply all backtrace
63+
native.gdb.args=%java\0-c\0%p\0-batch\0-ex\0info threads\0-ex\0thread apply all backtrace
6464
native.gdb.args.delimiter=\0
6565

6666
################################################################################

test/failure_handler/src/share/conf/windows.properties

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2015, 2021, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2015, 2024, 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
@@ -57,8 +57,10 @@ native.stack.args=-c "~*kP n;qd" -p %p
5757
native.stack.params.repeat=6
5858

5959
native.core.app=cdb
60-
native.core.args=-c ".dump /f core.%p;qd" -p %p
61-
native.core.params.timeout=3600000
60+
native.core.args=-c ".dump /mA core.%p;qd" -p %p
61+
native.core.params.timeout=600000
62+
63+
cores=
6264
################################################################################
6365
# environment info to gather
6466
################################################################################

0 commit comments

Comments
 (0)