RFR: 8334513: New test gc/TestAlwaysPreTouchBehavior.java is failing [v2]

Thomas Stuefe stuefe at openjdk.org
Thu Jul 4 07:33:19 UTC 2024


On Mon, 1 Jul 2024 13:09:51 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

>> Thomas Stuefe has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Update TestAlwaysPreTouchBehavior.java
>
> test/hotspot/jtreg/gc/TestAlwaysPreTouchBehavior.java line 164:
> 
>> 162:             if (rss < committed) {
>> 163:                 if (avail < requiredAvailableDuring) {
>> 164:                     throw new SkippedException("Not enough memory for this  test (" + avail + ")");
> 
> This is essentially an early-return; why is this inside the `rss < committed` comparison? Does it work if it's lifted up? The structure I have in mind is like:
> 
> 
> if (avail < ....) {
>   skip-test;
> }
> assert(rss >= committed, error-msg);

Well, the test may have succeeded despite what we recognize as low memory conditions. The "low-memory-condition-recognition" is necessarily over-generous - we count even vaguely lowish conditions as "low." We do this to prevent false negatives, which tests like these are often plagued with.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/19803#discussion_r1665262024


More information about the hotspot-gc-dev mailing list