RFR: 8286940: [IR Framework] Allow IR tests to build and use Whitebox without -DSkipWhiteBoxInstall=true

Christian Hagedorn chagedorn at openjdk.java.net
Wed May 25 08:25:31 UTC 2022


Currently, the IR framework always tries to install the Whitebox by moving the Whitebox class file to the JTreg class path. However, when a test already builds the Whitebox and uses it as part of the test, we cannot access it on certain platforms. On Windows, for example, we'll get the following exception:

Caused by: java.nio.file.FileSystemException: sun\hotspot\WhiteBox.class: The process cannot access the file because it is being used by another process

To mitigate this problem, one can specify `-DSkipWhiteBoxInstall=true` which was already done in [JDK-8283187](https://bugs.openjdk.java.net/browse/JDK-8283187). But this is not a good solution as the user should not need to worry about the inner workings of the IR framework.

I propose to get rid of this flag by reworking the Whitebox installation process.

Thanks,
Christian

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

Commit messages:
 - formatting
 - 8286940: [IR Framework] Allow IR tests to build and use Whitebox without -DSkipWhiteBoxInstall=true

Changes: https://git.openjdk.java.net/jdk/pull/8879/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8879&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8286940
  Stats: 36 lines in 5 files changed: 28 ins; 1 del; 7 mod
  Patch: https://git.openjdk.java.net/jdk/pull/8879.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/8879/head:pull/8879

PR: https://git.openjdk.java.net/jdk/pull/8879


More information about the hotspot-compiler-dev mailing list