Test7005594.sh fails when given a memory value with decimals

XMLWordPrintable

    • master
    • x86_64
    • os_x

      This test launch script has been seen failing on some MacOS nodes:
      https://github.com/openjdk/jdk8u/blob/master/hotspot/test/compiler/5091921/Test7005594.sh

      The error is:
      ```
      04:43:57.030 /Users/admin/workspace/workspace/Test_openjdk8_hs_extended.openjdk_x86-64_mac_testList_0/aqa-tests/openjdk/openjdk-jdk/hotspot/test/compiler/5091921/Test7005594.sh: line 51: 18.77 * 1024: syntax error: invalid arithmetic operator (error token is ".77 * 1024")
      ```

      Analysis:
      When MEM has a decimal point in it, the following bash code fails:
      ```
      MEM="$(($MEM * 1024))"
      ```

      One way to fix this is to change the above code to this:
      ```
      MEM="$((${MEM/\.*/} * 1024))"
      ```

      Since this script is only present in JDK8, this change will not be contributed to head and backported.

            Assignee:
            Adam Farley
            Reporter:
            Adam Farley
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: