JDK-8305356 : Fix ignored bad CompileCommands in tests
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 21
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2023-03-31
  • Updated: 2023-12-22
  • Resolved: 2023-04-05
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 17 JDK 21
17.0.11-oracleFixed 21 b17Fixed
Related Reports
Relates :  
Description
Malformed CompileCommands are silently ignored in JTreg tests. This means we do not test what we think we test. We may be missing bugs this way.

The intent of this RFE is to go through all tests and fix malformed CompileCommands. To do that we could change the warning message of bad CompileCommands into an assert and run all tests with it. An assert will also prevent future CompileCommand mistakes.

An example of a wrong CompileCommand usage:

open/test/hotspot/jtreg/compiler/intrinsics/bigInteger/TestShift.java

When one runs it, you get:

Error: Option 'DisableIntrinsic' with type 'ccstrlist' doesn't match supplied type 'ccstr'
Line: 'option,compiler.intrinsics.bigInteger.TestShift::base_left_shift,ccstr,DisableIntrinsic,_bigIntegerLeftShiftWorker'

Usage: '-XX:CompileCommand=<option>,<method pattern>' - to set boolean option to true
Usage: '-XX:CompileCommand=<option>,<method pattern>,<value>'
Use:   '-XX:CompileCommand=help' for more information and to list all option.

CompileCommand: An error occurred during parsing
Error: Option 'DisableIntrinsic' with type 'ccstrlist' doesn't match supplied type 'ccstr'
Line: 'option,compiler.intrinsics.bigInteger.TestShift::base_right_shift,ccstr,DisableIntrinsic,_bigIntegerRightShiftWorker'

Usage: '-XX:CompileCommand=<option>,<method pattern>' - to set boolean option to true
Usage: '-XX:CompileCommand=<option>,<method pattern>,<value>'
Use:   '-XX:CompileCommand=help' for more information and to list all option.
Comments
Fix request [17u] I backport this for parity with 17.0.11-oracle. No risk, only a test change. Clean backport. Tests pass. SAP nightly testing passed.
22-12-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk17u-dev/pull/2065 Date: 2023-12-20 08:09:46 +0000
20-12-2023

Changeset: 0e0c022b Author: Tobias Holenstein <tholenstein@openjdk.org> Date: 2023-04-05 09:35:45 +0000 URL: https://git.openjdk.org/jdk/commit/0e0c022b1f870806963789afdef9298851719498
05-04-2023

The following tests fail with the assert because of a wrong CompileCommand: * `test/hotspot/jtreg/compiler/integerArithmetic/TestNegMultiply.java` * `test/hotspot/jtreg/compiler/integerArithmetic/TestNegAnd.java` * `test/hotspot/jtreg/compiler/loopopts/TestPeelingRemoveDominatedTest.java` * `test/hotspot/jtreg/compiler/intrinsics/bigInteger/TestMulAdd.java` * `test/hotspot/jtreg/compiler/intrinsics/bigInteger/TestMultiplyToLen.java` * `test/hotspot/jtreg/compiler/intrinsics/bigInteger/TestShift.java` * `test/hotspot/jtreg/compiler/intrinsics/bigInteger/TestSquareToLen.java` The following tests fail with the assert but it is expected: * `test/hotspot/jtreg/compiler/compilercontrol/mixed/RandomCommandsTest.java` * `test/hotspot/jtreg/compiler/compilercontrol/commands/ControlIntrinsicTest.java` * `test/hotspot/jtreg/compiler/compilercontrol/commands/OptionTest.java ` * `test/hotspot/jtreg/compiler/oracle/CheckCompileCommandOption.java` * `test/hotspot/jtreg/compiler/oracle/PrintIdealPhaseTest.java` * `test/hotspot/jtreg/compiler/oracle/TestInvalidCompileCommand.java` * `test/hotspot/jtreg/runtime/CommandLine/CompilerConfigFileWarning.java`
03-04-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/13297 Date: 2023-04-03 12:31:41 +0000
03-04-2023

ILW = Wrong test executions due to malformed CompileCommands (does not cause a test failure but we might miss real bugs), at least one case, no workaround = MLH = P4
31-03-2023