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

improve error message when invalid modules are specified

XMLWordPrintable

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

      > cat test/hotspot/jtreg/BadModules.java
      /*
       * @test
       * @modules jdk.base/jdk.internal.loader
       * @run main BadModules
       */
      public class BadModules {
          public static void main(String[] args) {
              jdk.internal.loader.ClassLoaders.class.toString();
          }
      }

      The above test specifies a non-existent module (jdk.base) in a @modules tag. However, when running this test with jtreg, only a "no tests selected" message is shown:

      > jtreg test/hotspot/jtreg/BadModules.java
      Test results: no tests selected
      Report written to /Users/dnsimon/dev/jdk-jdk/open/JTreport/html/report.html
      Results written to /Users/dnsimon/dev/jdk-jdk/open/JTwork

      It would be clearer if jtreg says something about the invalid @modules tag (which I assume it has detected).

            Unassigned Unassigned
            dnsimon Douglas Simon
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: