RFR: 8319200: Don't use test thread factory in ProcessTools.createLimitedTestJavaProcessBuilder() [v5]
David Holmes
dholmes at openjdk.org
Fri Nov 10 04:44:57 UTC 2023
On Fri, 10 Nov 2023 01:49:17 GMT, Leonid Mesnik <lmesnik at openjdk.org> wrote:
>> Test thread factory is a mode similar to VM flags and should not be used in ProcessTools.createLimitedTestJavaProcessBuilder(). Only createTestJavaProcessBuilder() should use it like jtreg VM options.
>>
>> Adding the test thread factory requires the injection of arguments in the middle of the list. I don't think it makes sense to modify arguments in several places so I replaced it with the flag isLimited and moved all modifications in createJavaProcessBuilder().
>>
>> Testing tier1-5.
>
> Leonid Mesnik has updated the pull request incrementally with one additional commit since the last revision:
>
> variable was renamed.
Uggghhh no I've still misunderstood what this is doing. `addTestThreadFactoryArgs` will create a wrapper to run the specified main class in a virtual thread. So if the test using `createLimitedTestJavaProcessBuilder` was being run in a virtual thread, then the exec'd "app" would be too. Plus it would have the property set. So this is potentially reducing virtual thread test coverage.
That said I'm bowing out of this discussion.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/16442#issuecomment-1805077951
More information about the core-libs-dev
mailing list