[8u] RFR 8229501: jdk/test/lib/testlibrary/ClassFileInstaller.java should match hotspot//test/testlibrary version
Hohensee, Paul
hohensee at amazon.com
Tue Aug 27 20:05:16 UTC 2019
There's perhaps some confusion here. The file to be patched is in the jdk repo, not the hotspot repo, i.e., jdk/test/lib/testlibrary/ClassFileInstaller.java, not hotspot/test/testlibrary/ClassFileInstaller.java. The former is quite small and contains only a "main" method, while the latter is much bigger with much more functionality.
The patch for https://bugs.openjdk.java.net/browse/JDK-8005056 went into hs25 and therefore can't be left over after 8189762. I.e., it patches a few lines in the hotspot version, vis
@@ -45,7 +45,9 @@
// Create the class file's package directory
Path p = Paths.get(pathName);
- Files.createDirectories(p.getParent());
+ if (pathName.contains("/")) {
+ Files.createDirectories(p.getParent());
+ }
// Create the class file
Files.copy(is, p, StandardCopyOption.REPLACE_EXISTING);
}
The above patched code is what's in the current jdk8u version of hotspot/test/testlibrary/ClassFileInstaller.java.
"hg log" on jdk8u/hotspot/test/testlibrary/ClassFileInstaller produces
changeset: 8710:4141ef4c8ba8
user: vaibhav
date: Thu Jul 26 06:16:09 2018 -0400
summary: 8189762: [TESTBUG] Create tests for JDK-8146115 container awareness and resource configuration
changeset: 4665:43083e670adf
user: coleenp
date: Mon May 13 15:37:08 2013 -0400
summary: 8005056: NPG: Crash after redefining java.lang.Object
changeset: 4202:1b0dc9f87e75
parent: 4175:1048edb5434a
user: mgerdin
date: Tue Feb 19 18:45:49 2013 +0100
summary: 8006753: fix failed for JDK-8002415 White box testing API for HotSpot
The 8189762 backport patch is at http://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/rev/4141ef4c8ba8, and updates the hotspot version to be identical to what's in jdk10 and tip. There is no change to the jdk version at jdk/test/lib/testlibrary/ClassFileInstaller.java.
We therefore want to update the jdk version to be the same as the hotspot version, but 8189762 already has a jdk8u backport issue associated with it. Shall we add an openjdk8u232 backport to it that patches the jdk version of ClassFileInstaller.java? We thought that would be confusing, so we filed a new bug to do so, namely https://bugs.openjdk.java.net/browse/JDK-8229501. Which would you prefer?
Thanks,
Paul
On 8/27/19, 11:33 AM, "jdk8u-dev on behalf of Verghese, Clive" <jdk8u-dev-bounces at openjdk.java.net on behalf of verghese at amazon.com> wrote:
Hi Andrew,
We have updated the webrev with the bug ids,
http://cr.openjdk.java.net/~phh/8189762/webrev.8u.00/
Testing
Validated that the test depending on ClassFileInstaller pass.
Regards,
Clive Verghese
On 8/23/19, 10:43 AM, "jdk8u-dev on behalf of Verghese, Clive" <jdk8u-dev-bounces at openjdk.java.net on behalf of verghese at amazon.com> wrote:
Hi Andrew Hughes,
Thank you for the detailed feedback, I will update the webrev with the bug id's.
Regards,
Clive Verghese
On 8/21/19, 8:58 AM, "Andrew John Hughes" <gnu.andrew at redhat.com> wrote:
On 13/08/2019 23:12, Verghese, Clive wrote:
> Hi,
>
> Requesting review for webrev : http://cr.openjdk.java.net/~phh/8229501/webrev.8u.00/
> JBS Issue : https://bugs.openjdk.java.net/browse/JDK-8229501
> Email discussion : https://mail.openjdk.java.net/pipermail/jdk8u-dev/2019-August/010029.html
>
> hotspot/test/testlibrary/ClassFileInstaller.java and jdk/test/lib/testlibrary/ClassFileInstaller were merged as part of the JDK10 repo merge. For 8u, we should sync the JDK version with the Hotspot version in order to facilitate backports of patches such as the one for JDK-8216401<https://bugs.openjdk.java.net/browse/JDK-8216401> that assume the merged version.
>
> Testing
> Validated that the test depending on ClassFileInstaller pass.
>
>
> Regards,
> Clive Verghese
>
This appears to just be the result of:
$ diff -u hotspot/test/testlibrary/ClassFileInstaller.java
jdk/test/lib/testlibrary/ClassFileInstaller.java
I don't think a code dump with a unique bug ID is the correct way to fix
this.
The actual changes come from two HotSpot changes:
changeset: 8710:4141ef4c8ba8
user: vaibhav
date: Thu Jul 26 06:16:09 2018 -0400
summary: 8189762: [TESTBUG] Create tests for JDK-8146115 container
awareness and resource configuration
changeset: 4665:43083e670adf
user: coleenp
date: Mon May 13 15:37:08 2013 -0400
summary: 8005056: NPG: Crash after redefining java.lang.Object
The appropriate course of action here is to apply the
test/testlibrary/ClassFileInstaller.java changes from these changesets
to the copy under test/lib/testlibrary/ClassFileInstaller.java under
their appropriate bug IDs, as should have been done to begin with and, I
presume, is intended for future changes to keep these in sync. This then
associates the changes with their original review and motivation.
I just tried this with 8189762 and it applies cleanly, leaving just the
changes in 8005056 as the diff.
I'd prefer they were separate changesets, but the current webrev could
be used with these two bug IDs rather than 8229501.
--
Andrew :)
Senior Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)
PGP Key: ed25519/0xCFDA0F9B35964222 (hkp://keys.gnupg.net)
Fingerprint = 5132 579D D154 0ED2 3E04 C5A0 CFDA 0F9B 3596 4222
https://keybase.io/gnu_andrew
More information about the jdk8u-dev
mailing list