RFR: CODETOOLS-7903225: StringIndexOutOfBoundsException in ReportOnlyTest
Jonathan Gibbons
jjg at openjdk.org
Fri Jul 1 18:34:38 UTC 2022
Please review a minor fix to address a hitherto unnoticed exception that occurred while running `ReportOnlyTest`.
The immediate cause was an empty string for a test file being passed down into JT Harness from jtreg,
The root cause is a bad check in `TestManager`, comparing the wrong form of a path (relative, not canonical) against the canonical file for the test suite root. This indirectly leads to computing an empty relative path between the two, causing the issue. The fix is to compare the correct form of the path, in `TestManager.java` line 34.
The fix exposes a minor issue in another test, to detect bad groups. The issue is on the command line where the path for the test-suite root is provided. Because of the preceding fix, that pass is now recognized as the root of the test suite, meaning "all tests in the test suite", which disables the need to check groups. The fix is to specify a test within the suitable suite, which allows the groups to be checked. There was a latest typo in one of the test target names in the makefile, which is corrected.
Other changes in TestManager and Tool are from fixing warnings reported by the IDE.
-------------
Commit messages:
- CODETOOLS-7903225: StringIndexOutOfBoundsException in ReportOnlyTest
Changes: https://git.openjdk.org/jtreg/pull/93/files
Webrev: https://webrevs.openjdk.org/?repo=jtreg&pr=93&range=00
Issue: https://bugs.openjdk.org/browse/CODETOOLS-7903225
Stats: 13 lines in 3 files changed: 0 ins; 2 del; 11 mod
Patch: https://git.openjdk.org/jtreg/pull/93.diff
Fetch: git fetch https://git.openjdk.org/jtreg pull/93/head:pull/93
PR: https://git.openjdk.org/jtreg/pull/93
More information about the jtreg-dev
mailing list