Comment 27 for bug 2036873

Revision history for this message
Vladimir Petko (vpa1977) wrote (last edit ):

Hi Simon,
Yes, I did look into it - the issue is compile errors with TEST_F() macros:
----
/<<PKGBUILDDIR>>/test/hotspot/gtest/classfile/test_AltHashing.cpp:139:24: error: 'halfsiphash_test_ByteArray' has not been declared
  139 | TEST_F(AltHashingTest, halfsiphash_test_ByteArray) {
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
/<<PKGBUILDDIR>>/test/hotspot/gtest/classfile/test_AltHashing.cpp:139:1: error: ISO C++ forbids declaration of 'TEST_F' with no type [-fpermissive]
  139 | TEST_F(AltHashingTest, halfsiphash_test_ByteArray) {
      | ^~~~~~
/<<PKGBUILDDIR>>/test/hotspot/gtest/classfile/test_AltHashing.cpp:139:50: error: cannot declare parameter to be of abstract type 'AltHashingTest'
  139 | TEST_F(AltHashingTest, halfsiphash_test_ByteArray) {
      | ^
/<<PKGBUILDDIR>>/test/hotspot/gtest/classfile/test_AltHashing.cpp:30:7: note: because the following virtual functions are pure within 'AltHashingTest':
   30 | class AltHashingTest : public ::testing::Test {
      | ^~~~~~~~~~~~~~
In file included from /usr/src/googletest/googlemock/include/gmock/internal/gmock-internal-utils.h:47,
                 from /usr/src/googletest/googlemock/include/gmock/gmock-actions.h:145,
                 from /usr/src/googletest/googlemock/include/gmock/gmock.h:59,
                 from /<<PKGBUILDDIR>>/test/hotspot/gtest/unittest.hpp:52,
                 from /<<PKGBUILDDIR>>/test/hotspot/gtest/classfile/test_AltHashing.cpp:28:
/usr/src/googletest/googletest/include/gtest/gtest.h:494:16: note: 'virtual void testing::Test::TestBody()'
  494 | virtual void TestBody() = 0;

-----
that only happens with 1.11. Earlier (focal) and later (lunar) versions are not affected. Looks like a combination of toolchain/gtest that are not compatible[1].

I believe going forward we will bundle google test and will not have this problem.

Note: this is a common problem for openjdk-17 and up.
Note: since I am testing jammy against ppa anyway (due to missing jtreg7 backport), I have google test 1.13 to the ppa, I will update jammy test results once rebuild it done

[1] https://mail.openjdk.org/pipermail/hotspot-dev/2021-April/050965.html