RFR: 7903989: Default to no error if existing, make parent directories as needed

Christian Stein cstein at openjdk.org
Tue Apr 15 14:56:41 UTC 2025


Prior this change, most usages of the `$(MKDIR)` variable in jtreg's self-tests had to add `-p` in order to not fail with an "error if existing, make parent directories as needed". Many usages are lacking the flag and in concurrent test scenarios, this leads to flaky tests.

This PR appends `-p` to each expansion of `$(MKDIR)`. Hard-coded `-p` will be removed; stray/duplicate `-p` flag don't seem to be a problem for `mkdir`'s option parser. I didn't see any "-p specifed more than once" warnings.

This PR also cleans up redundant `-f` and `-rf` arguments from `$(RM) ...` calls, as they are very close in nature and location of the `$(MKDIR)` calls, as `Defs.gmk` declares `RM` to expand with `-rf`.

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

Commit messages:
 - Remove redundant `-rf` flags
 - Touch copyright year
 - Remove redundant `-f` flags, `$(RM)` already comes with `-rf`
 - Remove redundant `-p` flags
 - Default to no error if existing, make parent directories as needed

Changes: https://git.openjdk.org/jtreg/pull/259/files
  Webrev: https://webrevs.openjdk.org/?repo=jtreg&pr=259&range=00
  Issue: https://bugs.openjdk.org/browse/CODETOOLS-7903989
  Stats: 156 lines in 50 files changed: 0 ins; 0 del; 156 mod
  Patch: https://git.openjdk.org/jtreg/pull/259.diff
  Fetch: git fetch https://git.openjdk.org/jtreg.git pull/259/head:pull/259

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


More information about the jtreg-dev mailing list