RFR: 8202142: jfr/event/io/TestInstrumentation is unstable
Erik Gahlin
erik.gahlin at oracle.com
Mon Jan 20 22:34:19 UTC 2020
Hi,
Could I have review of a test fix. The test has been on the problem list
for a long time, so there has been code rot.
The initial problem was the host string not matching the host field in
the event. This happens when the tests (invoked by TestInstrumentation)
are run in a certain order. I don't know why, but it seemed brittle, so
I fixed this by removing the host validation and only check IP address
and port.
The reimplementation of the socket API moved around code, so two methods
can no longer be instrumented. Fix was to remove them from the list of
methods to instrument.
Events may arrive out of order, possibly more likely due to changes in
the JVM implementation, so events are now sorted chronologically.
Each test now closes/stops the recording it uses before it return from
the main method. This reduces the risk that state in one test impacts a
later.
Bug:
https://bugs.openjdk.java.net/browse/JDK-8202142
Webrev:
http://cr.openjdk.java.net/~egahlin/8202142
Testing:
jdk/jdk/jfr/event/io 30 times
Thanks
Erik
More information about the hotspot-jfr-dev
mailing list