Project

General

Profile

Task #2355

update bundled googletest

Added by Mark Abraham 7 months ago. Updated 5 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
testing
Target version:
Difficulty:
uncategorized
Close

Description

This had its first official release in sevreal years during 2017, so we should update the version we bundle rather than import the handful of fixes we use. Additionally the feature that does better pretty printing of parameterized tests will help us wonder less about what fails when.

I have some WIP off gerrit.


Related issues

Related to GROMACS - Task #2092: Tests running on GPU, and hardware assignmentNew

History

#1 Updated by Aleksei Iupinov 7 months ago

  • Related to Task #2092: Tests running on GPU, and hardware assignment added

#2 Updated by Eric Irrgang 6 months ago

Mark Abraham wrote:

This had its first official release in sevreal years during 2017, so we should update the version we bundle rather than import the handful of fixes we use. Additionally the feature that does better pretty printing of parameterized tests will help us wonder less about what fails when.

I have some WIP off gerrit.

The most obvious differences to me are that

  • the current googletest includes gmock, which was packaged separately at the point it was picked up by GROMACS, and
  • there are macros available that make some of the GROMACS added macros redundant.

I think there are differences in test fixtures too, maybe? Anyway, I don't see a way to "up vote" on Redmine, I want to register my enthusiasm.

#3 Updated by Åke Sandgren 5 months ago

There is one "important" change in the 1.8.0 release, it actually has a working GetThreadCount for Linux.
The gmock-1.7.0 included with GROMACS-2018 gets killed during testing on the GpuUtilsUnitTests which is run even on pure CPU builds.

See NoExecDeathTest::AssumeRole in ./src/external/gmock-1.7.0/gtest/src/gtest-death-test.cc, in 1.7.0 GetThreadCount returns 0 on a Linux system.

#4 Updated by Mark Abraham 5 months ago

  • Status changed from New to Resolved

For the record, https://gerrit.gromacs.org/c/7502/ updated to 1.8.0

#5 Updated by Mark Abraham 5 months ago

Åke Sandgren wrote:

There is one "important" change in the 1.8.0 release, it actually has a working GetThreadCount for Linux.
The gmock-1.7.0 included with GROMACS-2018 gets killed during testing on the GpuUtilsUnitTests which is run even on pure CPU builds.

See NoExecDeathTest::AssumeRole in ./src/external/gmock-1.7.0/gtest/src/gtest-death-test.cc, in 1.7.0 GetThreadCount returns 0 on a Linux system.

But our pure-CPU builds on Jenkins don't fail, and e.g. on my desktop a non-gpu build merely warns

[WARNING] ../src/external/gmock-1.7.0/gtest/src/gtest-death-test.cc:825:: Death tests use fork(), which is unsafe particularly in a threaded context. For this test, Google Test couldn't detect the number of threads.

so what is it about Ake's context that leads to "getting killed?"

#6 Updated by Mark Abraham 5 months ago

  • Status changed from Resolved to Closed

We have changed to use EXPECT_DEATH_IF_SUPPORTED in 2018 release branch, so I believe Ake's issues will be resolved there, too.

Also available in: Atom PDF