On Wed, 14 Jun 2023 09:30:49 GMT, Kevin Walls <kev...@openjdk.org> wrote:
> This test fails when additional threads are created, as it compares thread > lists from different sources and sees a mismatch. > > It needs to tolerate some threads with certain names appearing, e.g. JVMCI > and ForkJoin threads. If there are extra threads in the thread ID list from > the ThreadMBean, remove them from the thread count before comparing. > > When it fails, additionally print the ids and names of threads that it got > from the MBean. > > I found the test quite confusing, the naming of thread counts, arrays of > threads, and arrays of thread stacktraces from different sources, so have > renamed some things. Overall looks good, but I'm surprised you only need to filter "ForkJoinPool" and "JVMCI". What about threads like "Common-Cleaner"? https://github.com/openjdk/jdk/blob/57b8251241e2044d5039ce162bf4637a9b2e5466/test/hotspot/jtreg/vmTestbase/nsk/share/jdi/EventFilters.java#L333 ------------- PR Review: https://git.openjdk.org/jdk/pull/14465#pullrequestreview-1480164185