JDK-8352617 : IR framework test TestCompileCommandFileWriter.java runs TestCompilePhaseCollector instead of itself
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 21,24,25
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2025-03-21
  • Updated: 2025-03-24
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 25
25Unresolved
Related Reports
Causes :  
Description
In
test/hotspot/jtreg/testlibrary_tests/ir_framework/tests/flag/TestCompileCommandFileWriter.java
we can see
/*
 * @test
 * @requires vm.debug == true & vm.flagless
 * @summary Test compile command file writer.
 * @library /test/lib /testlibrary_tests /
 * @build jdk.test.whitebox.WhiteBox
 * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
 * @run junit/othervm -Xbootclasspath/a:. -DSkipWhiteBoxInstall=true -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockDiagnosticVMOptions
 *                    -XX:+WhiteBoxAPI compiler.lib.ir_framework.flag.TestCompilePhaseCollector
 */

the path after @run is not right. It seems it was like that since it was introduced in JDK-8280378.
Simplfy fixing the path is not enough tho, every test fails with something like:

java.nio.file.NoSuchFileException: test-vm-compile-commands-pid-450961.log
	at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
	at java.base/sun.nio.fs.UnixFileSystemProvider.newFileChannel(UnixFileSystemProvider.java:213)
	at java.base/sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:244)
	at java.base/java.nio.file.Files.newByteChannel(Files.java:357)
	at java.base/java.nio.file.Files.newByteChannel(Files.java:399)
	at java.base/java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:371)
	at java.base/java.nio.file.Files.newInputStream(Files.java:154)
	at java.base/java.util.Scanner.<init>(Scanner.java:742)
	at compiler.lib.ir_framework.flag.TestCompileCommandFileWriter.check(TestCompileCommandFileWriter.java:84)
	at compiler.lib.ir_framework.flag.TestCompileCommandFileWriter.testMix(TestCompileCommandFileWriter.java:77)
	at java.base/java.lang.reflect.Method.invoke(Method.java:565)
FAILED     compiler.lib.ir_framework.flag.TestCompileCommandFileWriter::testMix 'testMix' [119ms]

Comments
ILW = Test not executed, single test for IR framework, no workaround = MLH = P4
24-03-2025