RFR(S) : 8203238: [TESTBUG] rewrite MemOptions shell test in Java

Igor Ignatyev igor.ignatyev at oracle.com
Wed Apr 8 14:34:34 UTC 2020


@Misha,

thanks for your review. I ran the test on a linux in virtual box w/ different amount of memory, and although 2G seems to be enough (even when there is no swap), I've added '@requiers os.maxMemory > 4G'[1]. I'd note though that the comment is talking about the available memory which isn't the same same as amount returned by os.maxMemory, and as I said in the original email, I didn't find that check is truly necessary so I don't think we should try to resurrect (and fix) the logic we had in MemOptions.sh.

@GC team,

can someone take a look?

[1] 
> diff -r 2fd175345107 test/hotspot/jtreg/vmTestbase/gc/huge/quicklook/largeheap/MemOptions/MemOptionsTest.java
> --- a/test/hotspot/jtreg/vmTestbase/gc/huge/quicklook/largeheap/MemOptions/MemOptionsTest.java  Tue Mar 24 17:18:35 2020 -0700
> +++ b/test/hotspot/jtreg/vmTestbase/gc/huge/quicklook/largeheap/MemOptions/MemOptionsTest.java  Wed Apr 08 07:26:35 2020 -0700
> @@ -28,6 +28,7 @@
>   *
>   * @summary converted from VM Testbase gc/huge/quicklook/largeheap/MemOptions.
>   * @requires vm.bits == 64
> + * @requiers os.maxMemory > 4G
>   *
>   * @library /vmTestbase
>   *          /test/lib

 
-- Igor

> On Mar 30, 2020, at 11:10 AM, mikhailo.seledtsov at oracle.com wrote:
> 
> Looks good to me, with one comment:
> 
> The comment to the test states: "It is intended to be run on machines with more than 4G available memory". I would then recommend using "@requires os.maxMemory > 4G"
> 
> The rest looks good to me. However, I am not an expert in GC. Perhaps, someone from GC team could review it as well.
> 
> 
> Misha
> 
> On 3/29/20 9:07 AM, Igor Ignatev wrote:
>> Ping?
>> 
>> — Igor
>> 
>>> On Mar 25, 2020, at 10:42 AM, Igor Ignatyev <igor.ignatyev at oracle.com> wrote:
>>> 
>>> http://cr.openjdk.java.net/~iignatyev//8203238/webrev.00
>>>> 330 lines changed: 91 ins; 236 del; 3 mod;
>>> Hi all,
>>> 
>>> could you please review this small patch which rewrites MemOptions shell test?
>>> 
>>> while porting the test, I noticed that available memory checks aren't required, and the test successfully passes even w/o them, so the java version of the test doesn't check available memory and only @requires 64 bits vm. given the test doesn't require lots of time/resources to execute, I've also removed it from exclusiveAccess. MemStat class was made static inner class of MemOptionsTest for the sake of readability and brevity.
>>> 
>>> webrev: http://cr.openjdk.java.net/~iignatyev//8203238/webrev.00
>>> testing: the changed tests multiple tests on {linux, windows, mac} w/ {SerialGC,ZGC,G1GC,ParallelGC}
>>> JBS: https://bugs.openjdk.java.net/browse/JDK-8203238
>>> 
>>> NB the shell version of the test had a bug which prevent its execution. an incorrect operator (:=) was used at L#23,23, which led to bogus 'java' variable at L#44 and non zero exit code at L#48, so the test passes w/ 'Skipping the test; a 64-bit VM is required.' message on all platforms. so this patch effectively resurrects the test.
>>> 
>>> Thanks,
>>> -- Igor
>>> 




More information about the hotspot-gc-dev mailing list