JDK-8143836 : [TESTBUG] runtime/CommandLine/IgnoreUnrecognizedVMOptions fails in jdk9/dev
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2015-11-23
  • Updated: 2015-12-10
  • Resolved: 2015-11-24
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9 b96Fixed
Related Reports
Relates :  
Description
Running runtime/CommandLine/IgnoreUnrecognizedVMOptions test against clean jdk9/dev fails in both local build, and JPRT.

$ rm -rf JT*; jtreg -jdk:/home/shade/trunks/jdk9-dev/build/linux-x86_64-normal-server-release/images/jdk/ runtime/CommandLine/IgnoreUnrecognizedVMOptions.java 
java.lang.RuntimeException: Expected to get exit value of [1]

Apparently fails when trying to do:
    runJavaAndCheckExitValue(false, "-XX:+IgnoreUnrecognizedVMOptions", "-XX:-UnlockCommercialFeatures", "-XX:+FlightRecorder", "-version");

Indeed, running this command line manually produces the zero exit code:

$ /home/shade/trunks/jdk9-dev/build/linux-x86_64-normal-server-release/images/jdk/bin/java -XX:+IgnoreUnrecognizedVMOptions -XX:-UnlockCommercialFeatures -XX:+FlightRecorder -version
openjdk version "1.9.0-internal"
OpenJDK Runtime Environment (build 1.9.0-internal-shade_2015_11_23_21_41-b00)
OpenJDK 64-Bit Server VM (build 1.9.0-internal-shade_2015_11_23_21_41-b00, mixed mode)

$ echo $?
0

This makes projects in development to always fail JPRT. jdk9/sandbox is synced with jdk9/dev, so many projects there picked up this failure.
Comments
Removing problem tests from open test file
23-11-2015

I think that problem is that for OpenJDK build "UnlockCommercialFeatures" flag is unknown and thus ignored. I think test should be modified to check for OpenJDK build and exclude such test cases which uses commercial flags.
23-11-2015