On Tue, 2 Jun 2026 23:30:35 GMT, Shiv Shah <[email protected]> wrote: > SleepingThread in ThreadController had a hardcoded list of JDK method names > for stack trace checking every Thread.sleep change (JFR events, virtual > threads, etc) required updating this list. Replaced with a generic JDK frame > filter (java.*/jdk.*/sun.*) that works at any stack position, matching the > approach already used in strace001.java and SleepingThread.java. Also added > overridable checkElement/stackTraceLength methods to BaseThread so only > SleepingThread behavior changes. > > > > > --------- > - [x] I confirm that I make this contribution in accordance with the [OpenJDK > Interim AI Policy](https://openjdk.org/legal/ai).
I think we have "lost the plot" (as the saying goes) with these tests. For most tests we don't actually care about the exact stacktrace as that is not what is being tested. For the sleep tests in particular it probably suffices to check the presence of run() and then sleep() and anything after that is immaterial. But these old nsk tests are not written in a way that makes it easy to just make that kind of change. Let me mull on this a little. Also maybe @AlanBateman has some ideas. ------------- PR Comment: https://git.openjdk.org/jdk/pull/31357#issuecomment-4627450371
