Integrated: CODETOOLS-7903225: StringIndexOutOfBoundsException in ReportOnlyTest

Jonathan Gibbons jjg at openjdk.org
Fri Jul 1 23:53:50 UTC 2022


On Fri, 1 Jul 2022 18:27:46 GMT, Jonathan Gibbons <jjg at openjdk.org> wrote:

> 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 path 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 test 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.

This pull request has now been integrated.

Changeset: 0ba2f776
Author:    Jonathan Gibbons <jjg at openjdk.org>
URL:       https://git.openjdk.org/jtreg/commit/0ba2f776077a633265e439b6da273ef7367da3a0
Stats:     13 lines in 3 files changed: 0 ins; 2 del; 11 mod

7903225: StringIndexOutOfBoundsException in ReportOnlyTest

Reviewed-by: iris

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

PR: https://git.openjdk.org/jtreg/pull/93


More information about the jtreg-dev mailing list