JDK 14 RFR (XXS) of JDK-8235499: Change HotSpot jtreg records test to better handle JDK updates
Igor Ignatyev
igor.ignatyev at oracle.com
Fri Dec 6 19:12:59 UTC 2019
Hi Joe,
the fix looks good to me.
thanks,
-- Igor
> On Dec 6, 2019, at 10:48 AM, Joe Darcy <joe.darcy at oracle.com> wrote:
>
> Hello,
>
> Several of the HotSpot tests for records need small changes to more gracefully handle JDK updates, such as JDK 14 -> 15 coming up soon!
>
> http://cr.openjdk.java.net/~darcy/8235499.0/
>
> Patch below.
>
> (Some updates will be need to make all the tests in this directory pass on 15, but these small updates are valid independently.)
>
> Thanks,
>
> -Joe
>
> --- old/test/hotspot/jtreg/runtime/records/ignoreRecordAttribute.java 2019-12-06 10:44:14.592741024 -0800
> +++ new/test/hotspot/jtreg/runtime/records/ignoreRecordAttribute.java 2019-12-06 10:44:14.264741024 -0800
> @@ -35,7 +35,7 @@
> public class ignoreRecordAttribute {
>
> public static void main(String[] args) throws Exception {
> -
> + String MAJOR_VERSION = Integer.toString(44 + Runtime.version().feature());
> ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("--enable-preview",
> "-Xlog:class+record", "-Xshare:off", "superNotJLRecord");
> OutputAnalyzer output = new OutputAnalyzer(pb.start());
> @@ -46,7 +46,7 @@
> "-Xlog:class+record", "-Xshare:off", "recordIgnoredVersion");
> output = new OutputAnalyzer(pb.start());
> output.shouldContain("Ignoring Record attribute");
> - output.shouldContain("because class file version is not 58.65535");
> + output.shouldContain("because class file version is not " + MAJOR_VERSION + ".65535");
> }
>
> }
> --- old/test/hotspot/jtreg/runtime/records/recordReflectionTest.java 2019-12-06 10:44:15.276741024 -0800
> +++ new/test/hotspot/jtreg/runtime/records/recordReflectionTest.java 2019-12-06 10:44:15.036741024 -0800
> @@ -23,7 +23,7 @@
>
> /*
> * @test
> - * @compile --enable-preview --source 14 recordReflectionTest.java
> + * @compile --enable-preview --source ${jdk.version} recordReflectionTest.java
> * @run main/othervm --enable-preview recordReflectionTest
> */
>
>
More information about the hotspot-dev
mailing list