JDK-8281507 : Two javac tests have bad jtreg `@clean` tags
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 18
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2022-02-08
  • Updated: 2024-07-09
  • Resolved: 2022-02-28
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 17 JDK 19
11.0.24Fixed 17.0.10-oracleFixed 19 b12Fixed
Related Reports
Blocks :  
Relates :  
Relates :  
Description
The following shows invalid use of the `@clean` directive.

grep -r 'clean.*[A-Za-z][*]' open/test/langtools/tools/javac
open/test/langtools/tools/javac/8074306/TestSyntheticNullChecks.java: * @clean TestSyntheticNullChecks*
open/test/langtools/tools/javac/StringConcat/TestIndyStringConcat.java: * @clean TestIndyStringConcat*
open/test/langtools/tools/javac/StringConcat/TestIndyStringConcat.java: * @clean TestIndyStringConcat*
open/test/langtools/tools/javac/StringConcat/TestIndyStringConcat.java: * @clean TestIndyStringConcat*
open/test/langtools/tools/javac/StringConcat/TestIndyStringConcat.java: * @clean TestIndyStringConcat*
open/test/langtools/tools/javac/StringConcat/TestIndyStringConcat.java: * @clean TestIndyStringConcat*

The name should either be a full class name or `package.*`. The use of `*` for globbing has never been supported.

These tests fail under jtreg 7 (now in the early stages of development) because the class name now gives rise to `InvalidPathException` on Windows, because jtreg now uses `java.nio.file.Path` internally instead of `java.io.File`.
Comments
A pull request was submitted for review. URL: https://git.openjdk.org/jdk11u-dev/pull/2556 Date: 2024-02-26 11:36:26 +0000
26-02-2024

[jdk11u-fix-request] Approval Request from Aleksey Shipilëv Semi-clean backport on the way to jtreg update. Both files still have source/target=6 blocks, which need to be handled as well, see 11u PR. Hoping to request approvals before reviews to have someone to look at the PR. Test-only change, risk is low.
26-02-2024

Fix request [17u] I backport this to enable jtreg 7 in jdk17 No risk, only a test change. Clean backport. SAP nightly testing passed.
18-06-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk17u-dev/pull/1462 Date: 2023-06-17 06:37:42 +0000
17-06-2023

Changeset: 86723d48 Author: Aleksey Shipilev <shade@openjdk.org> Date: 2022-02-28 07:35:19 +0000 URL: https://git.openjdk.java.net/jdk/commit/86723d4892485651bcae735ed13545ea89b9bb22
28-02-2022

So, would you mind acking that PR then? It had been open for a while now :)
23-02-2022

[~shade] 1. Sorry if I misattributed the test to you; I was going by the output of `git blame`. 2. Thanks for the quick PR; I recommend using `@clean *`. Once I realized that was a possibility, I was going to fix it myself, but you beat me to the PR. 3. Either using the PR as written or with `@clean *` should be OK for `jtreg 7`. It was the literal filename of `TestSyntheticNullChecks*.class` that caused problems on Windows.
09-02-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk/pull/7398 Date: 2022-02-09 06:44:59 +0000
09-02-2022

There is now a PR, would you might applying it to your workspace and see if jtreg 7 is happy with it?
09-02-2022

The first test is not mine, but I can fix it as well.
09-02-2022

[~shade] These look like your tests.
08-02-2022