Skip to content

cvm/overlay: Fix gc/arguments related tests#137

Merged
duanyangjing merged 2 commits into
bytedance:jdk17u-target8from
duanyangjing:aime/1779093880-hotspot8-fixes
May 20, 2026
Merged

cvm/overlay: Fix gc/arguments related tests#137
duanyangjing merged 2 commits into
bytedance:jdk17u-target8from
duanyangjing:aime/1779093880-hotspot8-fixes

Conversation

@duanyangjing
Copy link
Copy Markdown
Collaborator

@duanyangjing duanyangjing commented May 18, 2026

  1. TestAggressiveHeap.java: 放宽正则匹配以兼容 JDK 17 中 -XX:+PrintFlagsFinal 打印命令行参数时使用 '=' 而非 ':='。
  2. TestG1ConcRefinementThreads.java: 适配 JDK 17 保留 G1ConcRefinementThreads=0 显式配置的行为。
  3. TestG1HeapRegionSize.java: 将测试的 G1HeapRegionSize 上限从 64m 调低至 32m,规避 JVM 初始化失败。
  4. TestHeapFreeRatio.java: 改用泛化正则兼容 JDK 17 改变的非法 Heap Free Ratio 报错格式。
  5. TestInitialTenuringThreshold.java: 兼容 JDK 17 允许 MaxTenuringThreshold=16 结合 InitialTenuringThreshold=8 的启动行为。
  6. TestSurvivorAlignmentInBytesOption.java: 为 jdk17 中删掉的选项,在 issue 中记录,不做修改。
  7. TestUnrecognizedVMOptionsHandling.java: 适配 CompoundVM 对 PrintGc 等 legacy option aliases 的兼容,调整预期为正常退出。
  8. TestUseCompressedOopsErgoTools.java: 使用正则精准提取堆内存数值,避免 JDK 17 WhiteBox 注册告警污染 stdout 导致 NumberFormatException。

@duanyangjing duanyangjing force-pushed the aime/1779093880-hotspot8-fixes branch 3 times, most recently from 98d5c9a to 3c85759 Compare May 18, 2026 11:44
@duanyangjing duanyangjing force-pushed the aime/1779093880-hotspot8-fixes branch from 3c85759 to 83c6294 Compare May 19, 2026 03:00
Baseline files for original jdk8 gc/arguments tests
@duanyangjing duanyangjing force-pushed the aime/1779093880-hotspot8-fixes branch from 83c6294 to 2c0b9e8 Compare May 19, 2026 03:18
@luchsh
Copy link
Copy Markdown
Collaborator

luchsh commented May 19, 2026

Better to write commit messages in English (this rule can be added to your AGENT.md)

@duanyangjing duanyangjing force-pushed the aime/1779093880-hotspot8-fixes branch from 2c0b9e8 to 1f67fec Compare May 19, 2026 07:06
@duanyangjing
Copy link
Copy Markdown
Collaborator Author

Better to write commit messages in English (this rule can be added to your AGENT.md)

Updated

Adapt gc/arguments tests for the JDK 17 kernel differences in flag
printing format, ergonomics derivation logic, and option
deprecation/inheritance:

1. TestAggressiveHeap.java: Relax regex to accept both `=` and `:=`
   for PrintFlagsFinal output, matching the JDK 17 format change for
   command-line-originating values.
2. TestG1ConcRefinementThreads.java: Handle JDK 17 preserving explicit
   G1ConcRefinementThreads=0 instead of replacing it with the ergonomic
   ParallelGCThreads value.
3. TestG1HeapRegionSize.java: Lower the tested G1HeapRegionSize cap
   from 64m to 32m to avoid JVM initialization failure on the JDK 17
   kernel.
4. TestHeapFreeRatio.java: Use generalized regex to match the changed
   illegal HeapFreeRatio error message format in JDK 17.
5. TestInitialTenuringThreshold.java: Accept MaxTenuringThreshold=16
   combined with InitialTenuringThreshold=8 as a valid startup
   configuration on JDK 17.
6. TestUnrecognizedVMOptionsHandling.java: Adapt expectations for
   CompoundVM legacy option alias compatibility (PrintGc,
   MaxiumHeapSize); these no longer fail with "Did you mean..."
   suggestions.
7. TestUseCompressedOopsErgoTools.java: Use regex to extract the heap
   size value from stdout, avoiding NumberFormatException caused by
   JDK 17 WhiteBox registration warnings polluting the output.
@duanyangjing duanyangjing force-pushed the aime/1779093880-hotspot8-fixes branch from 1f67fec to 76e554e Compare May 19, 2026 09:27
@duanyangjing duanyangjing merged commit 6a90dfb into bytedance:jdk17u-target8 May 20, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants