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

TestLookForUntestedEvents.java fails because newly added test tests experimental events

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 15
    • None
    • hotspot
    • None
    • gc
    • b18

    Description

      Events declared in jdk.test.lib.jfr.EventNames differ from events returned by FlightRecorder.getEventTypes()

      Set eventsFromEventNamesClass has more elements than set jfrEventTypes:
      ZRelocationSetGroup
      ZAllocationStall
      ZPageAllocation
      ZUncommit
      ZPageCacheFlush
      ZRelocationSet

      This could be because:
      1) You forgot to write a unit test. Please do so in test/jdk/jdk/jfr/event/
      2) You wrote a unit test, but you didn't reference the event in
         test/lib/jdk/test/lib/jfr/EventNames.java.
      3) It is not feasible to test the event, not even a sanity test.
         Add the event name to test/lib/jdk/test/lib/jfr/EventNames.java
         and a short comment why it can't be tested
      4) The event is experimental. Please add 'experimental="true"' to <Event>
         element in metadata.xml if it is a native event, or @Experimental if it is a
         Java event. The event will now not show up in JMC
      ==========================
      STDERR:
      java.lang.RuntimeException: Events declared in jdk.test.lib.jfr.EventNames differ from events returned by FlightRecorder.getEventTypes()
      at jdk.jfr.event.metadata.TestLookForUntestedEvents.checkEventNamesClass(TestLookForUntestedEvents.java:169)
      at jdk.jfr.event.metadata.TestLookForUntestedEvents.main(TestLookForUntestedEvents.java:95)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.base/java.lang.reflect.Method.invoke(Method.java:564)
      at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:298)
      at java.base/java.lang.Thread.run(Thread.java:832)

      Attachments

        Activity

          People

            stefank Stefan Karlsson
            stefank Stefan Karlsson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: