RFR: 8303703: Add support of execution tests using virtual thread factory jtreg plugin

Leonid Mesnik lmesnik at openjdk.org
Tue Apr 18 14:50:46 UTC 2023


On Tue, 18 Apr 2023 05:28:29 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:

>> The plugin which support execution of test's main method in separate virtual thread is added.
>> The plugin is built as a part of test image and might be used in testing by adding JTREG_TEST_THREAD_FACTORY=Virtual option.
>
> test/jtreg_test_thread_factory/src/share/classes/Virtual.java line 35:
> 
>> 33:             System.setProperty("main.wrapper", "Virtual");
>> 34:         } catch (Throwable t) {
>> 35:             // might be thrown by security manager
> 
> Since tests can be launched in presence of a security manager, would that mean that when security manager is enabled, the `main.wrapper` will not get set? Would that have any impact on the functioning of the test?

The Virtual test thread factory is not used by default. When it is used, the test just don't propagate `main.wrapper` to child processes. Some tests might be not compatible with this mode and they should be excluded. These exclusions will be done in separate commit.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13432#discussion_r1170154175



More information about the build-dev mailing list