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

[TESTBUG] compiler/floatingpoint/Test15FloatJNIArgs should use run main/othervm/native

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • 9
    • hotspot
    • b126

      The test compiler/floatingpoint/Test15FloatJNIArgs uses native library, hence I believe it should use native keyword with @run directive, such as:
      @run main/othervm/native

      This is recommended on a wiki for Running+Tests+with+Native+Code+in+jtreg, and also causes problem.

      I have encountered a problem as I was running all hotspot jt-reg tests locally (Linux-x64) via command line:
      jtreg -conc:auto -agentvm $WORKSPACE/hotspot/test/

      The Test15FloatJNIArgs failed with reason:
      could not load native lib: java.lang.UnsatisfiedLinkError: no Test15FloatJNIArgs in java.library.path

      As far as I understand and according to my experiments, if no -nativepath or java.library.path property are specified then
      JT-Reg will not run any "native" tests; they will be excluded from the run and not counted as failed.

      This test uses native library, but is not marked as "native", hence it is not excluded, and is counted as failed.

      For example, compiler/native/TestDirtyInt.java uses "@run main/native TestDirtyInt"

            iignatyev Igor Ignatyev (Inactive)
            mseledtsov Mikhailo Seledtsov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: