Uploaded image for project: 'Code Tools'
  1. Code Tools
  2. CODETOOLS-7901081

@requries: better support for VM flags

    Details

    • Type: Bug
    • Status: New
    • Priority: P2
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: tools
    • Labels:
      None

      Description

      After playing with @requires the following problems related vm flags have been discovered:

      1) Work with optional flags having numeric values.

       @requires vm.opt.G1HeapRegionSize > 10m

      jtreg -vmoptions:-XX:G1HeapRegionSize=1m A.java
      Error. Error evaluating expression: invalid numeric value: 1m

      jtreg -verbose A.java
      Error. Error evaluating expression: invalid numeric value: null

       * @requires vm.opt.G1HeapRegionSize == null | vm.opt.G1HeapRegionSize > 10m
      jtreg A.java
      Error. Error evaluating expression: invalid numeric value: null

      problems:
      - no way to check if a flag is set
      - -XX:abc=10m is not treated as 10 * 1024*1024

      2) 'x == false' and 'x != true' are not the same

       * @requires vm.opt.UseG1GC != true
      jtreg A.java
      Test results: passed: 1


       * @requires vm.opt.UseG1GC == false
      jtreg A.java
      Test results: no tests selected

      problem: confusing behavior

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              dfazunen Dmitry Fazunenko (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: