On Wed, 25 Nov 2026 16:01:08 GMT, Shiv Shah <[email protected]> wrote:

> No test calls ThreadStartRequest.addPlatformThreadsOnlyFilter() directly. 
> This adds one.
> 
> The debuggee starts two platform and two virtual threads itself, joins them 
> and hits a breakpoint. The debugger has a filtered start request and a plain 
> one enabled side by side. The filtered one must see each platform thread once 
> and neither virtual thread. The plain one must see all four, otherwise the 
> zero on the filtered side proves nothing. After that the plain requests are 
> deleted and a second set of threads runs with only the filtered requests on.
> 
> Same checks for ThreadDeathRequest in the same test, it has the same method.
> 
> Carrier threads start in the middle of this and land on the filtered requests 
> too. Those are not counted, the test only checks that none of them is virtual.
> 
> It creates its own threads, it does the same with and without the virtual 
> thread factory. No existing test is touched. Not covered: the filter combined 
> with a thread filter or count filter, and calling it on an enabled or deleted 
> request.
> 
> Checked that it can fail. With the two filter calls removed it does.
> 
> ---
> 
> Testing:
> - [x] the new test on linux x64, linux aarch64, windows x64 and macos 
> aarch64, debug and product, with and without the virtual thread factory, plus 
> -Xcomp and ZGC on the debug builds. jdk_jdi with the virtual thread factory 
> on linux x64 and aarch64. tier1-3 on linux x64 and aarch64, the only failures 
> there also fail in mainline CI.
> 
> 
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

New test looks good. I do not see any problems.

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

Marked as reviewed by sspitsyn (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/34069#pullrequestreview-6161725532

Reply via email to