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

jtreg failure handler GatherProcessInfoTimeoutHandler has a leftover call to System.loadLibrary

XMLWordPrintable

    • master

      jtreg can be configured with test failure handlers which get run when a test times out or fails for any reason. The JDK build configures jtreg to use the jdk.test.failurehandler.jtreg.GatherProcessInfoTimeoutHandler class (residing at test/failure_handler/src/share/classes/jdk/test/failurehandler/jtreg/GatherProcessInfoTimeoutHandler.java) as the timeout handler.

      This GatherProcessInfoTimeoutHandler runs a bunch of commands to gather the necessary diagnostics for the current process. Until before JDK-8268626, on Windows, the code in this class used to rely on a native library to determine the process id. That dependency on the native library was removed in JDK-8268626. The "timeoutHandler" no longer gets built by the JDK.

      There's however a leftover code in GatherProcessInfoTimeoutHandler which does a:

      try {
          System.loadLibrary("timeoutHandler");
      } catch (UnsatisfiedLinkError ignore) {
          // not all os need timeoutHandler native-library
          value = false;
      }

      to load this no longer existent library. The failure is caught and ignored.

      The GatherProcessInfoTimeoutHandler no longer requires this library and this call is a leftover and should be removed.

            jpai Jaikiran Pai
            jpai Jaikiran Pai
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: