[11u] RFR 8244142: some hotspot/runtime tests don't check exit code of forked JVM

Severin Gehwolf sgehwolf at redhat.com
Wed Oct 28 09:12:29 UTC 2020


On Mon, 2020-10-19 at 16:58 +0200, Aleksey Shipilev wrote:
> Original fix:
>    https://bugs.openjdk.java.net/browse/JDK-8244142
>    https://hg.openjdk.java.net/jdk/jdk/rev/d194201e76ef
> 
> It applies cleanly, except the hunk from test/hotspot/jtreg/runtime/records/RedefineRecord.java, 
> which does not exist in 11u (added for Records).
> 
> 11u variant therefore is:
> 
> diff -r 73edf743a93a test/hotspot/jtreg/runtime/Metaspace/MaxMetaspaceSizeTest.java
> --- a/test/hotspot/jtreg/runtime/Metaspace/MaxMetaspaceSizeTest.java    Wed Sep 30 08:58:42 2020 +0200
> +++ b/test/hotspot/jtreg/runtime/Metaspace/MaxMetaspaceSizeTest.java    Mon Oct 19 16:58:00 2020 +0200
> @@ -44,4 +44,5 @@
>           OutputAnalyzer output = new OutputAnalyzer(pb.start());
>           output.shouldContain("MaxMetaspaceSize is too small.");
> +        output.shouldNotHaveExitValue(0);
>       }
>   }
> diff -r 73edf743a93a test/hotspot/jtreg/runtime/getSysPackage/GetPackageXbootclasspath.java
> --- a/test/hotspot/jtreg/runtime/getSysPackage/GetPackageXbootclasspath.java    Wed Sep 30 08:58:42 
> 2020 +0200
> +++ b/test/hotspot/jtreg/runtime/getSysPackage/GetPackageXbootclasspath.java    Mon Oct 19 16:58:00 
> 2020 +0200
> @@ -55,5 +55,6 @@
>           new OutputAnalyzer(ProcessTools.createJavaProcessBuilder(
>                   "-Xbootclasspath/a:" + test_classes, "P.Test")
> -            .start()).shouldContain("Test Passed");
> +            .start()).shouldContain("Test Passed")
> +            .shouldHaveExitValue(0);
>       }
>   }

This looks fine to me.

Thanks,
Severin



More information about the jdk-updates-dev mailing list