On Tue, 2 Mar 2021 23:27:21 GMT, Igor Ignatyev <iignat...@openjdk.org> wrote:

> resurrecting old 
> [RFR](https://mail.openjdk.java.net/pipermail/hotspot-dev/2020-June/041981.html):
> 
>> Hi all,
>> 
>> could you please review the patch which introduces a new @requires property 
>> to filter out the tests which ignore externally provided JVM flags?
>> 
>> the idea behind this patch is to have a way to clearly mark tests which 
>> ignore flags, so 
>> a) it's obvious that they don't execute a flag-guarded code/feature, and 
>> extra care should be taken to use them to verify any flag-guarded changed;
>> b) they can be easily excluded from runs w/ flags.
>> 
>> @requires and VMProps allows us to achieve both, so it's been decided to add 
>> a new property `vm.flagless`. `vm.flagless` is set to false if there are any 
>> XX flags other than `-XX:MaxRAMPercentage` and `-XX:CreateCoredumpOnCrash` 
>> (which are known to be set almost always) or any X flags other `-Xmixed`; in 
>> other words any tests w/ `@requires vm.flagless` will be excluded from runs 
>> w/ any other X / XX flags passed via `-vmoption` / `-javaoption`. in rare 
>> cases, when one still wants to run the tests marked by `vm.flagless`  w/ 
>> external flags, `vm.flagless` can be forcefully set to true by setting any 
>> value to `TEST_VM_FLAGLESS` env. variable.
>> 
>> this patch adds necessary common changes and marks common tests, namely 
>> Scimark, GTestWrapper and TestNativeProcessBuilder. Component-specific tests 
>> will be marked separately by the corresponding subtasks of 8151707[1].
>> 
>> please note, the patch depends on CODETOOLS-7902336[2], which will be 
>> included in the next jtreg version, so this patch is to be integrated only 
>> after jtreg5.1 is promoted and we switch to use it by 8246387[3].
>> 
>> JBS: https://bugs.openjdk.java.net/browse/JDK-8246494
>> webrev: http://cr.openjdk.java.net/~iignatyev//8246494/webrev.00
>> testing: marked tests w/ different XX and X flags w/ and w/o 
>> TEST_VM_FLAGLESS env. var, and w/o any flags
>> 
>> [1] https://bugs.openjdk.java.net/browse/JDK-8151707
>> [2] https://bugs.openjdk.java.net/browse/CODETOOLS-7902336
>> [3] https://bugs.openjdk.java.net/browse/JDK-8246387
>> 
> 
> after offline discussion with @pliden, it has been decided to reduce the 
> scope of [8246499](https://bugs.openjdk.java.net/browse/JDK-8246499) and not 
> mark the tests that use `UseXGC` flags for selection, e.g. 
> `test/hotspot/jtreg/gc/z/TestSmallHeap.java`.
> 
> Thanks,
> -- Igor

These changes look good to me.

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

Marked as reviewed by mseledtsov (Committer).

PR: https://git.openjdk.java.net/jdk/pull/2800

Reply via email to