RFR: JDK-8292064 Convert java/lang/management/MemoryMXBean shell tests to java version [v2]

Leonid Mesnik lmesnik at openjdk.org
Wed Aug 10 21:13:04 UTC 2022


On Wed, 10 Aug 2022 18:50:51 GMT, Bill Huang <duke at openjdk.org> wrote:

>> This task converts 5 shell tests below to java version. 
>> test/java/lang/management/MemoryMXBean/LowMemoryTest2.sh 
>> test/java/lang/management/MemoryMXBean/MemoryManagementParallelGC.sh 
>> test/java/lang/management/MemoryMXBean/MemoryManagementSerialGC.sh 
>> test/java/lang/management/MemoryMXBean/MemoryTestAllGC.sh 
>> test/java/lang/management/MemoryMXBean/PendingAllGC.sh
>
> Bill Huang has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Removed GC settings.

Sorry, that I missed these comments first time. Now the code is much cleaner.

test/jdk/java/lang/management/MemoryMXBean/LowMemoryTest2.java line 39:

> 37:  * @summary Test low memory detection of non-heap memory pool
> 38:  *
> 39:  * @run build MemoryUtil

Not sure if you need this build, jtreg should build required files by itself.

test/jdk/java/lang/management/MemoryMXBean/LowMemoryTest2.java line 41:

> 39:  * @run build MemoryUtil
> 40:  *
> 41:  * @run main/othervm/timeout=600 -noclassgc -XX:MaxMetaspaceSize=32m

I would prefer to have multiply tests rather than multiply 'run' in single tests. It allow jtreg to fail only one test which fail and run them parallel.

test/jdk/java/lang/management/MemoryMXBean/MemoryManagement.java line 35:

> 33:  * @modules jdk.management
> 34:  * @build MemoryManagement MemoryUtil
> 35:  * @run main/othervm/timeout=600 -Xmn8m -XX:+IgnoreUnrecognizedVMOptions

Do we want to run this configuration without G1?  Might be separate runs and add requires?

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

Changes requested by lmesnik (Reviewer).

PR: https://git.openjdk.org/jdk/pull/9813


More information about the serviceability-dev mailing list