RFR(XS) : 8177708 : Convert TestReserveMemorySpecial_test to Gtest

Gerard Ziemski gerard.ziemski at oracle.com
Thu Nov 1 15:44:41 UTC 2018

hi Igor,

I took a look at the webrev, but I think I’m missing the big picture. If I grep for TestReserveMemorySpecial I get:

# grep -rn TestReserveMemorySpecial
open/src/hotspot/os/bsd/os_bsd.cpp:3778:void TestReserveMemorySpecial_test() {
open/src/hotspot/os/linux/os_linux.cpp:5967:class TestReserveMemorySpecial : AllStatic {
open/src/hotspot/os/linux/os_linux.cpp:6146:void TestReserveMemorySpecial_test() {
open/src/hotspot/os/linux/os_linux.cpp:6147:  TestReserveMemorySpecial::test();
open/src/hotspot/os/linux/os_linux.hpp:36:  friend class TestReserveMemorySpecial;
open/src/hotspot/os/windows/os_windows.cpp:5561:void TestReserveMemorySpecial_test() {
open/src/hotspot/os/solaris/os_solaris.cpp:5405:void TestReserveMemorySpecial_test() {
open/src/hotspot/os/aix/os_aix.cpp:4321:void TestReserveMemorySpecial_test() {
open/src/hotspot/share/prims/whitebox.cpp:231:void TestReserveMemorySpecial_test();
open/src/hotspot/share/prims/whitebox.cpp:239:  TestReserveMemorySpecial_test();
open/src/hotspot/share/utilities/internalVMTests.cpp:45:  run_unit_test(TestReserveMemorySpecial_test);

#1 Wouldn’t you want to delete TestReserveMemorySpecial class from the platform files (ex. open/src/hotspot/os/linux/os_linux.cpp, etc?) now that we have dedicated gtest files?

#2 Also, I only see linux and windows gtests, what about the ones for Mac and Solaris, now that you removed the test from internalVMTests.cpp?

#3 Are the linux, windows gtest files what TestReserveMemorySpecial class is/was in open/src/hotspot/os/linux/os_linux.cpp, open/src/hotspot/os/windows/os_windows.cpp? On cursory look I see some differences.


> On Oct 22, 2018, at 1:36 PM, Igor Ignatyev <igor.ignatyev at oracle.com> wrote:
> http://cr.openjdk.java.net/~iignatyev//8177708/webrev.00/index.html
>> 331 lines changed: 330 ins; 1 del; 0 mod; 
> Hi all,
> could you please review this small and trivial patch which converts TestReserveMemorySpecial_test tests to Gtest? the old tests[1,2] haven't been removed as they are used by WhiteBox::runMemoryUnitTests they will be removed when the rest tests are converted.
> webrev: http://cr.openjdk.java.net/~iignatyev//8177708/webrev.00/index.html
> JBS: https://bugs.openjdk.java.net/browse/JDK-8177708
> [1] http://hg.openjdk.java.net/jdk/jdk/file/tip/src/hotspot/os/linux/os_linux.cpp#l5969
> [2] http://hg.openjdk.java.net/jdk/jdk/file/tip/src/hotspot/os/windows/os_windows.cpp#l5564
> Thanks,
> -- Igor

More information about the hotspot-gc-dev mailing list