> 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

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/31357/files
  - new: https://git.openjdk.org/jdk/pull/31357/files/b58c2faa..25be3675

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=31357&range=02
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=31357&range=01-02

  Stats: 3 lines in 3 files changed: 2 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/31357.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/31357/head:pull/31357

PR: https://git.openjdk.org/jdk/pull/31357

Reply via email to