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

"make test" tries to execute $(JOBS) as a command

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 10
    • 10
    • infrastructure
    • None

      I ran
      make test TEST=jdk_collections
      and was surprised to see:
      make[3]: 12: Command not found
      It's trying to actually run a command "12" from my PATH, which is big NONO (dangerous!).

      After some poking, I came up with:

      --- a/test/Makefile
      +++ b/test/Makefile
      @@ -48,6 +48,7 @@
       all: jdk_all langtools_all jaxp_all
       
       ifeq ($(TEST_JOBS), 0)
      + $(info EXPR=$(EXPR) JOBS=$(JOBS))
         ifeq ($(shell $(EXPR) $(JOBS) \> 50), 1)
           # JTReg cannot handle more than 50 in concurrency
           JDK_TEST_JOBS=50

      which then shows:

      EXPR= JOBS=12
      make[3]: 12: Command not found

      so the problem is that $(EXPR) is an undefined make variable in this particular Makefile.

      It's disturbing that such a serious bug can be found in the current Makefiles. I think GNU make offers features to help remove such bugs.

            Unassigned Unassigned
            martin Martin Buchholz
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: