RFR: 7903872: Option testThreadFactoryPath support relativepath

Christian Stein cstein at openjdk.org
Mon Oct 21 10:13:18 UTC 2024


On Mon, 21 Oct 2024 09:48:08 GMT, SendaoYan <syan at openjdk.org> wrote:

> Hi all,
> Currently, the jtreg option `-testThreadFactoryPath` doesn't support relativepath.
> I think jtreg can support relativepath for option `-testThreadFactoryPath`, same like to `-jdk` or `-nativepath`.
> Change has been verified locally, risk is low.

Changes requested by cstein (Committer).

src/share/classes/com/sun/javatest/regtest/config/RegressionParameters.java line 1291:

> 1289: 
> 1290:     public void setTestThreadFactoryPath(String testThreadFactoryPath) {
> 1291:         this.testThreadFactoryPath = new File(testThreadFactoryPath).getAbsolutePath();

Let's use NIO `Path` here.

Suggestion:

        this.testThreadFactoryPath = Path.of(testThreadFactoryPath).toAbsolutePath().toString();

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

PR Review: https://git.openjdk.org/jtreg/pull/233#pullrequestreview-2381558801
PR Review Comment: https://git.openjdk.org/jtreg/pull/233#discussion_r1808480777


More information about the jtreg-dev mailing list