RFR: 8294623: gtests does not work with googletest release-1.12.0+

John R Rose jrose at openjdk.org
Tue Oct 11 16:35:18 UTC 2022


On Fri, 30 Sep 2022 08:38:29 GMT, Dingli Zhang <dzhang at openjdk.org> wrote:

> The scope of `GTEST_DECLARE_string_(internal_run_death_test)` has been changed in googletest 1.12.0 [1]. So we can see some new compiler errors as below:
> 
> 
> $ bash configure --with-gtest=/home/dingli/jdk-tools/googletest && make run-test TEST="gtest:all"
> 
> * For target hotspot_variant-server_libjvm_gtest_objs_gtestMain.o:
> In file included from /home/dingli/jdk-tools/googletest/googlemock/include/gmock/internal/gmock-port.h:57,
>                  from /home/dingli/jdk-tools/googletest/googlemock/include/gmock/internal/gmock-internal-utils.h:49,
>                  from /home/dingli/jdk-tools/googletest/googlemock/include/gmock/gmock-actions.h:145,
>                  from /home/dingli/jdk-tools/googletest/googlemock/include/gmock/gmock.h:56,
>                  from /home/dingli/jdk/test/hotspot/gtest/unittest.hpp:51,
>                  from /home/dingli/jdk/test/hotspot/gtest/gtestMain.cpp:39:

In `doc/building.md` it clearly states:

> The supported version of Google Test is 1.8.1, whose source code can be obtained…

The bug report does not say why 1.8.1 was not attempted or was not possible to use.  So this bug report is incomplete until we have sufficient reason to consider an upgrade (which is likely ot be a global upgrade) to a newer gtest.

Until sufficient evidence shows a reason to change, let's stick to our strategy of supporting a particular version of gtest, 1.8.1 at present.

Question to @DingliZhang: Is there a change to the documentation that would help people find and implement the directive to use 1.8.1?  And (of course) is there some reason 1.8.1 was impossible for you to use?

Or is all of this just a move to improve convenience for developers?  If it's a convenience move, it's too expensive, since supporting two versions of gtest is harder than supporting one.  That's why I'm looking for a possible documentation fix, to guide developers a little better.  Perhaps the `Gtest` section in `doc/testing.md` should cross-link to the section quoted above in `doc/building.md`

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

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


More information about the hotspot-runtime-dev mailing list