On Fri, 10 Nov 2023 01:49:17 GMT, Leonid Mesnik <lmes...@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.

It is expected from `createLimitedTestJavaProcessBuilder` to execute the 
process exactly as specified in the test, without any additional changes from 
jtreg. It is very likely that the test might fail if the process is executed in 
other modes. I agree that usage of this method is always a potential loss of 
coverage for vm flags being tested and for virtual threads. So this method 
should be used only when it is necessary. As well as we should minimize the 
number of flagless testing.

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

PR Comment: https://git.openjdk.org/jdk/pull/16442#issuecomment-1813899682

Reply via email to