RFR: 8319200: Don't use test thread factory in ProcessTools.createLimitedTestJavaProcessBuilder() [v5]
Leonid Mesnik
lmesnik at openjdk.org
Fri Nov 10 02:19:56 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.
The createLimitedTestJavaProcessBuilder is used in 410 tests (hotspot and jdk).
233 of them are flagless and not supposed to be executed with any additional VM flags. (They should be reviewed by it is a separate issue).
177 are not marked as flagless and should be updated to be flagless or use createTestJavaProcessBuilder.
The 'createLimitedTestJavaProcessBuilder' method should be used only when the process not accept any flags and it is logical to assume that thread factory shouldn't be used either. I think it just makes consistent the createLimitedTestJavaProcessBuilder and createTestJavaProcessBuilder methods.
It was not my original goal to add test thread factory part of createLimitedTestJavaProcessBuilder, I just missed that original createJavaProcessBuilder is applied to all processes.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/16442#issuecomment-1804972301
More information about the core-libs-dev
mailing list