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

@requries: better support for VM flags

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P2 P2
    • None
    • None
    • tools
    • None

      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

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

              Created:
              Updated:
              Resolved: