Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8352617

IR framework test TestCompileCommandFileWriter.java runs TestCompilePhaseCollector instead of itself

XMLWordPrintable

    • master

      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]

            mchevalier Marc Chevalier
            mchevalier Marc Chevalier
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: