Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GoogleTests are broken on macOS after upgrading to Boost 1.84.0 #6802

Open
str4d opened this issue Dec 20, 2023 · 0 comments
Open

GoogleTests are broken on macOS after upgrading to Boost 1.84.0 #6802

str4d opened this issue Dec 20, 2023 · 0 comments
Labels
A-testing Area: Tests and testing infrastructure C-bug Category: This is a bug O-macos Operating system: macOS

Comments

@str4d
Copy link
Contributor

str4d commented Dec 20, 2023

Describe the issue

See title.

Can you reliably reproduce the issue?

If so, please list the steps to reproduce below:

  1. Upgrade Boost from 1.83.0 to 1.84.0
  2. ./zcutil/build.sh on macOS
  3. ./src/zcash-gtest

Expected behaviour

All tests pass (as they do on other platforms).

Actual behaviour + errors

Tests that use GoogleMock break like so:

 [ RUN      ] ChecktransactionTests.BadVersionTooLow
gtest/test_checktransaction.cpp:149: Failure
Actual function call count doesn't match EXPECT_CALL(state, DoS(100, false, REJECT_INVALID, "bad-txns-version-too-low", false, ""))...
         Expected: to be called once
           Actual: never called - unsatisfied and active

--- Logs:
  ERROR rustzcash::transaction_ffi: Failed to parse transaction: Unknown transaction format
  ERROR main: CheckTransaction(): version too low
---
[  FAILED  ] ChecktransactionTests.BadVersionTooLow (0 ms)

The test is clearly doing the right thing (the log lines are from the correct error("...") calls). But the actual call to state.DoS(...) isn't being detected by the mock.

The weird thing is that GoogleTest does not depend on Boost, and there is no Boost code involved in the CValidationState API.

The version of Zcash you were using:

Latest master (as tested in #6798).

@str4d str4d added C-bug Category: This is a bug A-testing Area: Tests and testing infrastructure O-macos Operating system: macOS labels Dec 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testing Area: Tests and testing infrastructure C-bug Category: This is a bug O-macos Operating system: macOS
Projects
None yet
Development

No branches or pull requests

1 participant