> **Reduce disk usage in jlink tests**
> 
> Several jlink tests accumulate large image directories on disk without 
> cleaning them up, causing significant disk space usage -  especially in 
> fastdebug builds where images include big native debug symbols. This change 
> addresses that in three ways:
> 
> Image size reduction:
> Added `--strip-debug` to jlink invocations in ~30 test files where it is safe 
> to do so (i.e. the test only checks functional correctness - module presence, 
> exit codes, stdout but not further things like binary equality).  Tests that 
> compare images byte-for-byte `(JLinkReproducible*, 
> PackagedModulesVsRuntimeImageLinkTest`) are unchanged.
> 
> Per-test cleanup:
> Added `@AfterEach/@AfterMethod` cleanup to JUnit 5 and TestNG tests that 
> create multiple images (`IncludeLocalesPluginTest, 
> GenerateJLIClassesPluginTest, LegalFilePluginTest, 
> ExcludeJmodSectionPluginTest, UserModuleTest and JLinkTest`). This reduce 
> disk pressure by deleting no longer needed images.
> 
> Intermediate image cleanup in `AbstractLinkableRuntimeTest` tests:
> `AbstractLinkableRuntimeTest.createJavaImageRuntimeLink()` now deletes the 
> intermediate linkable-runtime JDK image immediately after it has been used to 
> produce the final output image. And `createRuntimeLinkImage()` deletes the 
> --generate-linkable-runtime temporary image as soon as it has been copied. 
> This reduces peak disk usage in JavaSEReproducibleTest and other 
> `AbstractLinkableRuntimeTest` subclasses from 6 simultaneous images to 2. 
> `JLinkReproducible2Test` and `JLinkReproducible3Test` also sequence their 
> image pairs so at most one pair exists at a time.
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

Arno Zeller has updated the pull request incrementally with one additional 
commit since the last revision:

  Update copyright

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/32009/files
  - new: https://git.openjdk.org/jdk/pull/32009/files/ee24c18a..f3fbdfd2

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=32009&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=32009&range=00-01

  Stats: 25 lines in 25 files changed: 1 ins; 0 del; 24 mod
  Patch: https://git.openjdk.org/jdk/pull/32009.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/32009/head:pull/32009

PR: https://git.openjdk.org/jdk/pull/32009

Reply via email to