Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8208237

Re-examine defmeth tests and update as needed

    XMLWordPrintable

Details

    • b22

    Description

      David Holmes reports:

      While updating defmeth tests for nestmates (JEP 181) I encountered a number of issues:

      1. Known failure modes that seem out of date

      With the following patch the basic* test still all pass:

      diff -r 2657e4188322 test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/BasicTest.java
      --- a/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/BasicTest.java
      +++ b/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/BasicTest.java
      @@ -150,7 +150,6 @@
            * }
            *
            */
      - @KnownFailure(modes = {INVOKE_EXACT, INVOKE_GENERIC, INVOKE_WITH_ARGS, INDY}) // NPE, instead of IAE
           public void testNonPublicOverride() {
               TestBuilder b = factory.getBuilder();


      2. Expected exceptions are far too broad in some cases ie LinkageError instead of a more specific IllegalAccessError, or NoSuchMethodError, or AbstractMehtodError. Tests could pass yet actually be encountering completely wrong exceptions.

      3. Reflection tests often fail with NoSuchMethodError. This suggests that in some cases we may be looking up the method on the wrong class, or using getMethod instead of getDeclaredMethod.

      Attachments

        Issue Links

          Activity

            People

              vlivanov Vladimir Ivanov
              iignatyev Igor Ignatyev (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: