RFR: 8273361: InfoOptsTest is failing in tier1 [v2]

Aleksey Shipilev shade at openjdk.java.net
Wed Sep 8 09:41:37 UTC 2021


> Current test checks that informational messages are not printed twice. The failing tests verifies that by checking `java.specification.version` is not present twice in the version string. Effectively, it searches for `18`. But a second `18` could get to version string from anywhere: the Git hash, the user name, etc. It is failing in current GHA due to Git hash containing `18`.
> 
> I believe the test should be more conservative: look for more unique strings, and check that the lines start with it. "javac" and "javac full version" seem unique enough. Checking that lines start with "javac" handles the case of accidental version strings that includes that string (think username that includes "javac" for some reason, who are we to judge...).
> 
> Additional testing:
>  - [x] Affected test passes with default version string
>  - [x] Affected test fails with JDK-8266239 reverted
>  - [x] Affected test passes with `--with-version-opt=javac`

Aleksey Shipilev has updated the pull request incrementally with two additional commits since the last revision:

 - No need for Scanner import anymore
 - Do the duplicate checks instead of checking for particular strings

-------------

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/5381/files
  - new: https://git.openjdk.java.net/jdk/pull/5381/files/a3558a44..557de023

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5381&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5381&range=00-01

  Stats: 32 lines in 2 files changed: 5 ins; 11 del; 16 mod
  Patch: https://git.openjdk.java.net/jdk/pull/5381.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/5381/head:pull/5381

PR: https://git.openjdk.java.net/jdk/pull/5381


More information about the compiler-dev mailing list