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

java/lang/ProcessHandle/InfoTest.java fails on systems with coreutils with --enable-single-binary

XMLWordPrintable

      Coreutils 8.23 introduces a new flag `--enable-single-binary`, when used the coreutils binaries are just thin scripts around a single coreutils executable.

      configure accepts the new option --enable-single-binary to build all the
        selected programs in a single binary called "coreutils". The selected
        programs can still be called directly using symlinks to "coreutils" or
        shebangs with the option --coreutils-prog= passed to this program. The
        install behavior is determined by the option --enable-single-binary=symlinks
        or --enable-single-binary=shebangs (the default). With the symlinks option,
        you can't make a second symlink to any program because that will change the
        name of the called program, which is used by coreutils to determine the
        desired program. The shebangs option doesn't suffer from this problem, but
        the /proc/$pid/cmdline file might not be updated on all the platforms. The
        functionality of each program is not affected but this single binary will
        depend on all the required dynamic libraries even to run simple programs.
        If you desire to build some tools outside the single binary file, you can
        pass the option --enable-single-binary-exceptions=PROG_LIST with the comma
        separated list of programs you want to build separately. This flag
        considerably reduces the overall size of the installed binaries which makes
        it suitable for embedded system.

      See https://github.com/coreutils/coreutils/blob/master/NEWS#L1734-L1750


      test InfoTest.test3(): failure
      java.lang.AssertionError: Command: expected: 'sleep', actual: /usr/bin/coreutils expected [true] but found [false]
      at org.testng.Assert.fail(Assert.java:99)
      at org.testng.Assert.failNotEquals(Assert.java:1037)
      at org.testng.Assert.assertTrue(Assert.java:45)
      at InfoTest.test3(InfoTest.java:302)
      at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
      at java.base/java.lang.reflect.Method.invoke(Method.java:580)
      at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:132)
      at org.testng.internal.TestInvoker.invokeMethod(TestInvoker.java:599)
      at org.testng.internal.TestInvoker.invokeTestMethod(TestInvoker.java:174)
      at org.testng.internal.MethodRunner.runInSequence(MethodRunner.java:46)
      at org.testng.internal.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:822)
      at org.testng.internal.TestInvoker.invokeTestMethods(TestInvoker.java:147)
      at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
      at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:128)
      at java.base/java.util.ArrayList.forEach(ArrayList.java:1597)
      at org.testng.TestRunner.privateRun(TestRunner.java:764)
      at org.testng.TestRunner.run(TestRunner.java:585)
      at org.testng.SuiteRunner.runTest(SuiteRunner.java:384)
      at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:378)
      at org.testng.SuiteRunner.privateRun(SuiteRunner.java:337)
      at org.testng.SuiteRunner.run(SuiteRunner.java:286)
      at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)
      at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96)
      at org.testng.TestNG.runSuitesSequentially(TestNG.java:1218)
      at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
      at org.testng.TestNG.runSuites(TestNG.java:1069)
      at org.testng.TestNG.run(TestNG.java:1037)
      at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:102)
      at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:58)
      at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
      at java.base/java.lang.reflect.Method.invoke(Method.java:580)
      at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
      at java.base/java.lang.Thread.run(Thread.java:1570)

            dlutker Dan Lutker
            dlutker Dan Lutker
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: