Closed Bug 1870899 Opened 2 years ago Closed 2 years ago

Update googletest to new version 8495449f075543dbac005d6c33118e58ad770d75 from 2023-12-18 18:14:49

Categories

(Testing :: GTest, enhancement)

enhancement

Tracking

(firefox123 fixed)

RESOLVED FIXED
123 Branch
Tracking Status
firefox123 --- fixed

People

(Reporter: update-bot, Assigned: ahal)

Details

(Whiteboard: [3pl-filed][task_id: T3nuCZefQgWLT3z6l_R68Q])

Attachments

(2 external files)

This update covers 8 commits. Here are the overall diff statistics, and then the commit information.


third_party/googletest/CMakeLists.txt | 9 +++
third_party/googletest/googlemock/include/gmock/gmock-actions.h | 24 ++++++++-
third_party/googletest/googlemock/include/gmock/gmock.h | 1 +
third_party/googletest/googlemock/src/gmock-spec-builders.cc | 1 +
third_party/googletest/googletest/cmake/Config.cmake.in | 4 +
third_party/googletest/googletest/cmake/internal_utils.cmake | 4 +-
third_party/googletest/googletest/include/gtest/gtest.h | 5 +-
third_party/googletest/googletest/src/gtest.cc | 5 +-
third_party/googletest/moz.yaml | 4 +-
9 files changed, 46 insertions(+), 11 deletions(-)


8495449f075543dbac005d6c33118e58ad770d75 by Abseil Team

https://github.com/google/googletest/commit/8495449f075543dbac005d6c33118e58ad770d75
Authored: 2023-12-18 10:14:04 -0800
Committed: 2023-12-18 10:14:49 -0800

Fix data race in leak detection

TSAN identified a data race between updates to the states_ map (ex. in Mock::UnregisterLocked) and the iteration done in this destructor. Writes to the map use g_gmock_mutex, but the destructor does not acquire it. Acquiring the lock here fixes the data race.

It should only be possible to trigger this TSAN finding in cases where a mock object is deleted by a thread other than the main thread.

PiperOrigin-RevId: 591935393
Change-Id: I9dd1faa40058d78e165a91333346514b4b73365c

Files Modified:

  • googlemock/src/gmock-spec-builders.cc

530d5c8c84abd2a46f38583ee817743c9b3a42b4 by Abseil Team

https://github.com/google/googletest/commit/530d5c8c84abd2a46f38583ee817743c9b3a42b4
Authored: 2023-12-12 17:40:15 -0800
Committed: 2023-12-12 17:40:45 -0800

Add FAIL_AT macro variant of FAIL matching ADD_FAILURE, ADD_FAILURE_AT

FAIL_AT is shorthand for GTEST_FAIL_AT like FAIL is for GTEST_FAIL.

PiperOrigin-RevId: 590393926
Change-Id: I68263af8fa2f98ca0bbef509d475c84e22068018

Files Modified:

  • googletest/include/gtest/gtest.h

eb80f759d595874a5e905a3342bd8e2af4c0a12d by Tom Hughes

https://github.com/google/googletest/commit/eb80f759d595874a5e905a3342bd8e2af4c0a12d
Authored: 2023-12-11 16:16:45 -0800
Committed: 2023-12-11 16:17:28 -0800

Remove unnecessary conversion

GetAbsolutePathToOutputFile returns a std::string and OpenFileForWriting
takes a std::string&.

PiperOrigin-RevId: 589984409
Change-Id: I75be9cb105f49b3a279a5d33b1b82dfcfc912cfd

Files Modified:

  • googletest/src/gtest.cc

8760db154aec99c70cb487d99aead838212d4986 by Derek Mauro

https://github.com/google/googletest/commit/8760db154aec99c70cb487d99aead838212d4986
Authored: 2023-12-04 13:41:38 -0800
Committed: 2023-12-04 13:42:25 -0800

Skip find_package(Python3) when not building tests

#4424 claims this saves several seconds of build time
Closes #4424

PiperOrigin-RevId: 587827426
Change-Id: I207779a6539f9af16a39d6b40887770dc930b74f

Files Modified:

  • googletest/cmake/internal_utils.cmake

48b373f6e0019cc766b4e088201fc90fe1373fe2 by Tamas Kenez

https://github.com/google/googletest/commit/48b373f6e0019cc766b4e088201fc90fe1373fe2
Authored: 2023-12-01 23:09:45 +0100
Committed: 2023-12-01 23:09:53 +0100

Allow using external absl and re2.

Files Modified:

  • CMakeLists.txt
  • googletest/cmake/Config.cmake.in

76bb2afb8b522d24496ad1c757a49784fbfa2e42 by Abseil Team

https://github.com/google/googletest/commit/76bb2afb8b522d24496ad1c757a49784fbfa2e42
Authored: 2023-11-27 13:31:59 -0800
Committed: 2023-11-27 13:32:49 -0800

Implement testing::Rethrow to throw exceptions more easily via std::exception_ptr

We avoid overloading or specializing testing::Throw as this is fundamentally a different operation than throwing the object.
However, we disable the corresponding overload of testing::Throw to prevent likely mistakes in the usage.

Fixes: #4412
PiperOrigin-RevId: 585745469
Change-Id: I03bb585427ce51983d914e88f2bf65a13545c920

Files Modified:

  • googlemock/include/gmock/gmock-actions.h
  • googlemock/test/gmock_link_test.h

5b7fd63d6d69f1754d5f3be956949484ebac06d5 by Abseil Team

https://github.com/google/googletest/commit/5b7fd63d6d69f1754d5f3be956949484ebac06d5
Authored: 2023-10-26 13:14:13 -0700
Committed: 2023-10-26 13:15:23 -0700

Export gmock-spec-builders.

gmock.h is the umbrella header to be used for rest of the library, and it also
enables users to export certain details. This wasn't working for some interfaces
like EXPECT_CALL because gmock-spec-builders wasn't explicitly exported.

PiperOrigin-RevId: 576966583
Change-Id: Ie050430cf11384977cd95f4ed6e73235d6857057

Files Modified:

  • googlemock/include/gmock/gmock.h

7f036c5563af7d0329f20e8bb42effb04629f0c0 by Theo Buehler

https://github.com/google/googletest/commit/7f036c5563af7d0329f20e8bb42effb04629f0c0
Authored: 2023-10-25 07:17:52 +0200
Committed: 2023-10-25 07:52:23 +0200

Add missing include for raise(3)

If SIGTRAP is defined, this file may end up using raise(3), which is
defined in csignal, leading to a compilation failure on at least
OpenBSD/sparc64 with gcc 8.

Files Modified:

  • googletest/src/gtest.cc

All the jobs in the try run succeeded. Like literally all of them, there weren't
even any intermittents. That is pretty surprising to me, so maybe you should double
check to make sure I didn't misinterpret things and that the correct tests ran...

Anyway, I've done all I can, so I'm passing to you to review and land the patch.
When reviewing, please note that this is external code, which needs a full and
careful inspection - not a rubberstamp.

Assignee: nobody → ahal
Pushed by ahalberstadt@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7e677854f378 Update googletest to 8495449f075543dbac005d6c33118e58ad770d75 r=ahal https://hg.mozilla.org/integration/autoland/rev/3d0378b1b33b Apply mozilla patches for googletest r=ahal
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 123 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: