On Wed, 26 Aug 2026 13:07:10 GMT, Shiv Shah <[email protected]> wrote:
>> The sleeping thread tests had a hardcoded list of jdk methods for checking >> the stack trace so changes to Thread.sleep often required updating the >> tests. Now they only require the java.lang.Thread.sleep entry frame and >> ignore whatever sits above it while the callers below still go through the >> existing expected methods. Calls to getThreadInfo without an explicit >> maximum depth return no stack, so those paths skip the frame content check. >> >> strace001 samples running threads rather than sleeping threads, so it has no >> Thread.sleep frame to use as a boundary. Instead, it finds the innermost >> frame belonging to the test and ignores frames above it. Its stack length >> check now uses the requested depth plus the expected method count instead of >> the hardcoded depth + 7 estimate, and an unexpectedly empty snapshot now >> fails instead of passing accidentally. >> >> >> >> >> --------- >> - [x] I confirm that I make this contribution in accordance with the >> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). > > Shiv Shah has updated the pull request incrementally with one additional > commit since the last revision: > > Add comments per review Marked as reviewed by sspitsyn (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/31357#pullrequestreview-5032980941
