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

Cannot exclude a test if it appears in 2 ProblemList.txt files

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P3 P3
    • None
    • None
    • tools
    • None

      If a test appears in 2 ProblemList.txt files and one has platform(s) specified but the other does not (which should be equivalent to `generic-all`), then the test might not be excluded on some platforms.

      The reason seems to in `com/sun/javatest/regtest/config/RegressionParameters.java`:

         414 if (platforms.length == 0 || (platforms.length == 1 && platforms[0].length() == 0)) {
         415 return true;
         416 }
         417
         418 for (String p: platforms) {
         419 if (osPlatforms.contains(p.toLowerCase())) {
         420 return true;
         421 }
         422 }

      Here, suppose the 2 ProblemList.txt files looks like

      ```
      $ cat p1
      path/to/test linux-all

      $ cat p2
      path/to/test
      ```

      Then `platforms` will be an array `{"", "linux-all"}`. Since `osPlatforms` does not contain an empty string, then the test will not match on a non-linux platform.

      We should probably add a `|| p.length() == 0` on line 419, just like what line 415 is doing now.

      Workaround: append "generic-all" to p2.

            Unassigned Unassigned
            weijun Weijun Wang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: