-
Enhancement
-
Resolution: Fixed
-
P4
-
11, 17, 21, 22
-
b13
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8318167 | 21.0.2 | Aleksey Shipilev | P4 | Resolved | Fixed | b03 |
JDK-8318286 | 17.0.10 | Aleksey Shipilev | P4 | Resolved | Fixed | b01 |
JDK-8318287 | 11.0.22 | Aleksey Shipilev | P4 | Resolved | Fixed | b01 |
Runtime/cds/appcds/dynamicArchive/TestAutoCreateSharedArchiveUpgrade.java
It's fine to run it on my local linux environment. If we run it locally, the building script will assign the right java property for me and it's an absolute path.
$make test TEST="runtime/cds/appcds/dynamicArchive/TestAutoCreateSharedArchiveUpgrade.java" CONF=linux-x86_64-server-fastdebug
In GHA, the java property is gained from environment variable BOOT_JDK.
BOOT_JDK=${{ steps.bootjdk.outputs.path }}
https://github.com/openjdk/jdk/blob/master/.github/workflows/test.yml#L156
it's from a custom action called 'get-bootjdk'. it is a relative path.
Unit test TestAutoCreateSharedArchiveUpgrade.java will have problem to find the executable if BOOT_JDK is a relative path.
https://github.com/openjdk/jdk/blob/master/test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/TestAutoCreateSharedArchiveUpgrade.java#L111C13-L111C19
If we don't want to change action 'get-bootjdk', there are 2 alternatives:
1) we hack environment variable 'PATH'. Not only it's not portable, we will have difficulty to deal with 'jtreg'. I found it always changes CWD and reset to PATH=/bin:/usr/bin:/usr/sbin
2) change task definition. change BOOT_JDK to `pwd`/${{ steps.bootjdk.outputs.path }}. This approach isn't future-proof. We have multiple tasks which define BOOT_JDK, so we have to change them all and keep tabs on it in the future.
https://github.com/openjdk/jdk/blob/master/.github/workflows/test.yml#L156
I would recommend changing the action get-bootjdk. we just return the absolute path. we tried that it doesn't have problem on all platforms.
- backported by
-
JDK-8318167 [GHA] get-bootjdk action should return the abolute path
- Resolved
-
JDK-8318286 [GHA] get-bootjdk action should return the abolute path
- Resolved
-
JDK-8318287 [GHA] get-bootjdk action should return the abolute path
- Resolved
- links to
-
Commit openjdk/jdk11u-dev/92a47bc7
-
Commit openjdk/jdk17u-dev/1c5d92f9
-
Commit openjdk/jdk21u/252fe467
-
Commit openjdk/jdk/99ea8bf2
-
Review openjdk/jdk11u-dev/2176
-
Review openjdk/jdk17u-dev/1871
-
Review openjdk/jdk21u/247
-
Review openjdk/jdk/15435