JDK-8273803 : Zero: Handle "zero" variant in CommandLineOptionTest.java
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: test
  • Affected Version: 11,17,18
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2021-09-15
  • Updated: 2023-12-05
  • Resolved: 2021-09-16
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 11 JDK 17 JDK 18
11.0.23Fixed 17.0.8-oracleFixed 18 b16Fixed
Related Reports
Relates :  
Description
This currently manifests if you run Zero with compiler/codecache/cli tests (part of tier1):

$ CONF=linux-x86_64-zero-fastdebug make exploded-test TEST=compiler/codecache/cli/

STDERR:
java.lang.RuntimeException: Unknown VM mode.
	at jdk.test.lib.cli.CommandLineOptionTest.getVMTypeOption(CommandLineOptionTest.java:504)
	at jdk.test.lib.cli.CommandLineOptionTest.verifyOptionValueForSameVM(CommandLineOptionTest.java:397)
	at compiler.codecache.cli.codeheapsize.GenericCodeHeapSizeRunner.run(GenericCodeHeapSizeRunner.java:42)
	at compiler.codecache.cli.common.CodeCacheCLITestCase.run(CodeCacheCLITestCase.java:62)
	at compiler.codecache.cli.common.CodeCacheCLITestBase.runTestCases(CodeCacheCLITestBase.java:58)
	at compiler.codecache.cli.codeheapsize.TestCodeHeapSizeOptions.main(TestCodeHeapSizeOptions.java:86)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:312)
	at java.base/java.lang.Thread.run(Thread.java:833)

While these tests are compiler tests, and they should arguably never run with Zero, the problem is in shared code, which can be used in future by other non-compiler tests.
Comments
[jdk11u-fix-request] Approval Request from Sonia "Fix Request 11u. Low risk as it affects tests only."
17-10-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk11u-dev/pull/2194 Date: 2023-10-17 18:51:52 +0000
17-10-2023

Fix Request 17u Backporting this for parity with oracle 17.0.8. Low risk as it affects tests only. Patch applies cleanly to 17u. Tier 1 passed with GitHub Actions. Worth noting that with the change, an assertion error warning “JVM should start with option ‘ReservedCodeCacheSize’ without errors” props up in CodeCacheCLITestCase. I assume this is a symptom of these tests not being intended for the zero JVM variant.
28-07-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk17u-dev/pull/1628 Date: 2023-07-26 20:01:45 +0000
26-07-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk17u-dev/pull/1627 Date: 2023-07-26 19:55:01 +0000
26-07-2023

Changeset: 2d13fb21 Author: Aleksey Shipilev <shade@openjdk.org> Date: 2021-09-16 07:51:17 +0000 URL: https://git.openjdk.java.net/jdk/commit/2d13fb21af783ebbe3dd5c2632aea11347317026
16-09-2021