Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-29507

JenkinsRule initialization failed on a platform un-supported by JNA

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • None
    • PPC64, HP-UX etc.

      org.jvnet.hudson.test.JenkinsRule contains static initialization block with:

              if (!Functions.isWindows()) {
                  try {
                      GNUCLibrary.LIBC.unsetenv("MAVEN_OPTS");
                      GNUCLibrary.LIBC.unsetenv("MAVEN_DEBUG_OPTS");
                  } catch (Exception e) {
                      LOGGER.log(Level.WARNING,"Failed to cancel out MAVEN_OPTS",e);
                  }
              }
      

      This part of code doesn't work as expected in the situation when loading "c" library fails. The exception can't be caught in the static block.

      Above means a testsuite can't be executed on by JNA un-supported platform when JenkinsRule is used (obviously by many plug-ins).

      Stacktrace looks similar like:

      java.lang.UnsatisfiedLinkError: Native library (com/sun/jna/hp-ux-ia64n/libjnidispatch.so) not found in resource path ([file:/hudson_workspace/workspace/HTS-ProcCleanerCI/target/surefire/surefirebooter7685486171447239626.jar])
       	at com.sun.jna.Native.loadNativeDispatchLibraryFromClasspath(Native.java:776)
       	at com.sun.jna.Native.loadNativeDispatchLibrary(Native.java:736)
       	at com.sun.jna.Native.<clinit>(Native.java:131)
       	at org.jvnet.hudson.test.JenkinsRule.<clinit>(JenkinsRule.java:2129)
       	at org.jenkinsci.plugins.proccleaner.PsCleanerTest.<init>(PsCleanerTest.java:68)
      

      PsCleanerTest.java:68 : @Rule public JenkinsRule j = new JenkinsRule();
      JenkinsRule.java:2129 : GNUCLibrary.LIBC.unsetenv("MAVEN_OPTS");

          [JENKINS-29507] JenkinsRule initialization failed on a platform un-supported by JNA

          Code changed in jenkins
          User: Vojtech Juranek
          Path:
          core/src/main/java/hudson/Functions.java
          test/src/main/java/org/jvnet/hudson/test/JenkinsRule.java
          http://jenkins-ci.org/commit/jenkins/8f29260b177957a4082bffb271c9835adfa79bff
          Log:
          [FIXED JENKINS-29507] Make JenkinsRule useable on systems without glibc

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Vojtech Juranek Path: core/src/main/java/hudson/Functions.java test/src/main/java/org/jvnet/hudson/test/JenkinsRule.java http://jenkins-ci.org/commit/jenkins/8f29260b177957a4082bffb271c9835adfa79bff Log: [FIXED JENKINS-29507] Make JenkinsRule useable on systems without glibc

          dogfood added a comment -

          Integrated in jenkins_main_trunk #4284
          [FIXED JENKINS-29507] Make JenkinsRule useable on systems without glibc (Revision 8f29260b177957a4082bffb271c9835adfa79bff)

          Result = SUCCESS
          vojtech juranek : 8f29260b177957a4082bffb271c9835adfa79bff
          Files :

          • test/src/main/java/org/jvnet/hudson/test/JenkinsRule.java
          • core/src/main/java/hudson/Functions.java

          dogfood added a comment - Integrated in jenkins_main_trunk #4284 [FIXED JENKINS-29507] Make JenkinsRule useable on systems without glibc (Revision 8f29260b177957a4082bffb271c9835adfa79bff) Result = SUCCESS vojtech juranek : 8f29260b177957a4082bffb271c9835adfa79bff Files : test/src/main/java/org/jvnet/hudson/test/JenkinsRule.java core/src/main/java/hudson/Functions.java

          Code changed in jenkins
          User: Vojtech Juranek
          Path:
          test/src/main/java/org/jvnet/hudson/test/JenkinsRule.java
          http://jenkins-ci.org/commit/jenkins-test-harness/63131f6010a6a04837e4497db488729d370def6f
          Log:
          [FIXED JENKINS-29507] Make JenkinsRule useable on systems without glibc

          Originally-Committed-As: 8f29260b177957a4082bffb271c9835adfa79bff

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Vojtech Juranek Path: test/src/main/java/org/jvnet/hudson/test/JenkinsRule.java http://jenkins-ci.org/commit/jenkins-test-harness/63131f6010a6a04837e4497db488729d370def6f Log: [FIXED JENKINS-29507] Make JenkinsRule useable on systems without glibc Originally-Committed-As: 8f29260b177957a4082bffb271c9835adfa79bff

            Unassigned Unassigned
            pajasoft Pavel JanouĊĦek
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: