Page MenuHomePhabricator

test: Fix Wambiguous-reversed-operator compiler warnings
ClosedPublic

Authored by PiRK on Mon, Oct 27, 09:04.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC3b82401e6dd4: test: Fix Wambiguous-reversed-operator compiler warnings
Summary

Add a missing const to avoid the C++20 clang compiler warning:

src/test/serialize_tests.cpp: In member function ‘void serialize_tests::class_methods::test_method()’:
src/test/serialize_tests.cpp:437:32: warning: C++20 says that these are ambiguous, even though the second is reversed:
  437 |     BOOST_CHECK(methodtest1 == methodtest2);

This is a backport of core#24406
Depends on D18835

Test Plan

With CMAKE_CXX_STANDARD 20 in src/CMakeLists.txt:

ninja all check-all

Event Timeline

PiRK requested review of this revision.Mon, Oct 27, 09:04

Tail of the build log:

Build 'Bitcoin ABC Diffs / Diff Testing' #N/A, branch 'refs/tags/phabricator/diff/56302'
Triggered 2025-10-27 09:04:49 by 'Phabricator Staging (phabricator-staging)'
Started 2025-10-27 09:04:59 on agent 'N/A'
Finished 2025-10-27 09:04:59 with status FAILURE 'Snapshot dependency failed to start: Automated Deployments / Bitcoin ABC Infra / Bitcoin-ABC Infra Checkout'
VCS revisions: 'BitcoinABC_BitcoinAbcStaging' (Git, instance id 22): '44f4f99a985b3c89620443070eb334cdbfc60c69' (branch: 'refs/tags/phabricator/diff/56302', checkout rules: '+:. => ./bitcoin-abc')
TeamCity URL https://build.bitcoinabc.org/buildConfiguration/BitcoinABC_BitcoinAbcStaging/1005376 
TeamCity server version is 2025.03.1 (build 186125), server timezone: GMT (UTC)

[09:04:49]W: bt15 (9s)
[09:04:49]i: TeamCity server version is 2025.03.1 (build 186125)
[09:04:49] : Finalize build settings
[09:04:49] : Collecting changes in 2 VCS roots
[09:04:49] :	 [Collecting changes in 2 VCS roots] VCS Root details
[09:04:49] :		 [VCS Root details] "Bitcoin ABC Staging" {instance id=22, parent internal id=3, parent id=BitcoinABC_BitcoinAbcStaging, description: "ssh://vcs@reviews.bitcoinabc.org:2221/source/bitcoin-abc-staging.git#refs/heads/master"}
[09:04:49] :		 [VCS Root details] "abc-infrastructure" {instance id=24, parent internal id=7, parent id=AutomatedDeployments_BitcoinAbcDeveloperTools_AbcInfrastructure, description: "ssh://vcs@reviews.bitcoinabc.org:2221/source/infrastructure.git#refs/heads/master"}
[09:04:49]i: Loading current repository state for VCS root 'Bitcoin ABC Staging' (6s)
[09:04:49]i:	 [Loading current repository state for VCS root 'Bitcoin ABC Staging'] VCS root 'Bitcoin ABC Staging': git -c credential.helper= -c credential.helper=/opt/teamcity/temp/credHelper4054291772243043185.sh ls-remote origin
[09:04:50]i:	 [Loading current repository state for VCS root 'Bitcoin ABC Staging'] Loading current repository state for VCS root 'abc-infrastructure' (6s)
[09:04:50]i:		 [Loading current repository state for VCS root 'abc-infrastructure'] VCS root 'abc-infrastructure': git -c credential.helper= -c credential.helper=/opt/teamcity/temp/credHelper9375487350905109769.sh ls-remote origin
[09:04:50]i:		 [Loading current repository state for VCS root 'abc-infrastructure'] VCS root 'Bitcoin ABC Staging': Warning: Permanently added '[reviews.bitcoinabc.org]:2221' (ED25519) to the list of known hosts.
[09:04:50]i:		 [Loading current repository state for VCS root 'abc-infrastructure'] VCS root 'abc-infrastructure': Warning: Permanently added '[reviews.bitcoinabc.org]:2221' (ED25519) to the list of known hosts.
[09:04:51]i: Detecting changes in VCS root 'abc-infrastructure' (used in 'Bitcoin-ABC Infra Checkout', 'Extract Electrum ABC from ABC' and 5 other configurations)
[09:04:51]i: Will collect changes for 'abc-infrastructure' starting from revision 602c7e2af027bb16cc6a4fc5a25601e8c853be5e
[09:04:51]i: Waiting for completion of current operations for the VCS root 'Bitcoin ABC Staging'
[09:04:56]i: Detecting changes in VCS root 'Bitcoin ABC Staging' (used in 'Diff Testing', 'Staging Checkout Dummy')
[09:04:56]i: Will collect changes for 'Bitcoin ABC Staging' starting from revision e19300ef289d49aec039981ea159af4b0cc63dec
[09:04:56] : Compute revision for 'abc-infrastructure' in Automated Deployments / Bitcoin ABC Infra / Bitcoin-ABC Infra Checkout
[09:04:56] :	 [Compute revision for 'abc-infrastructure' in Automated Deployments / Bitcoin ABC Infra / Bitcoin-ABC Infra Checkout] Upper limit revision: 602c7e2af027bb16cc6a4fc5a25601e8c853be5e
[09:04:56]i:	 [Compute revision for 'abc-infrastructure' in Automated Deployments / Bitcoin ABC Infra / Bitcoin-ABC Infra Checkout] MaxModId = 83296
[09:04:56] : Compute revision for 'Bitcoin ABC Staging'
[09:04:56] :	 [Compute revision for 'Bitcoin ABC Staging'] Upper limit revision: 44f4f99a985b3c89620443070eb334cdbfc60c69
[09:04:56]i:	 [Compute revision for 'Bitcoin ABC Staging'] MaxModId = 86388
[09:04:56] :	 [Compute revision for 'Bitcoin ABC Staging'] Computed revision: 44f4f99a985b3c89620443070eb334cdbfc60c69
[09:04:56] :	 [Compute revision for 'abc-infrastructure' in Automated Deployments / Bitcoin ABC Infra / Bitcoin-ABC Infra Checkout] Computed revision: 602c7e2af027bb16cc6a4fc5a25601e8c853be5e
[09:04:59]W: Build was removed from the queue with comment: This build has not been started because some of the builds it depends on failed to start

Tail of the build log:

Build 'Bitcoin ABC Diffs / Diff Testing' #N/A, branch 'refs/tags/phabricator/diff/56302'
Triggered 2025-10-27 09:04:50 by 'Phabricator Staging (phabricator-staging)'
Started 2025-10-27 09:05:03 on agent 'N/A'
Finished 2025-10-27 09:05:03 with status FAILURE 'Snapshot dependency failed to start: Automated Deployments / Bitcoin ABC Infra / Bitcoin-ABC Infra Checkout'
VCS revisions: 'BitcoinABC_BitcoinAbcStaging' (Git, instance id 22): '44f4f99a985b3c89620443070eb334cdbfc60c69' (branch: 'refs/tags/phabricator/diff/56302', checkout rules: '+:. => ./bitcoin-abc')
TeamCity URL https://build.bitcoinabc.org/buildConfiguration/BitcoinABC_BitcoinAbcStaging/1005378 
TeamCity server version is 2025.03.1 (build 186125), server timezone: GMT (UTC)

[09:04:50]W: bt15 (12s)
[09:04:50]i: TeamCity server version is 2025.03.1 (build 186125)
[09:04:50] : Finalize build settings
[09:04:50] : Collecting changes in 2 VCS roots
[09:04:50] :	 [Collecting changes in 2 VCS roots] VCS Root details
[09:04:50] :		 [VCS Root details] "Bitcoin ABC Staging" {instance id=22, parent internal id=3, parent id=BitcoinABC_BitcoinAbcStaging, description: "ssh://vcs@reviews.bitcoinabc.org:2221/source/bitcoin-abc-staging.git#refs/heads/master"}
[09:04:50] :		 [VCS Root details] "abc-infrastructure" {instance id=24, parent internal id=7, parent id=AutomatedDeployments_BitcoinAbcDeveloperTools_AbcInfrastructure, description: "ssh://vcs@reviews.bitcoinabc.org:2221/source/infrastructure.git#refs/heads/master"}
[09:04:50]i: Loading current repository state for VCS root 'Bitcoin ABC Staging' (6s)
[09:04:50]i:	 [Loading current repository state for VCS root 'Bitcoin ABC Staging'] VCS root 'Bitcoin ABC Staging': git -c credential.helper= -c credential.helper=/opt/teamcity/temp/credHelper16453717053589985457.sh ls-remote origin
[09:04:50]i:	 [Loading current repository state for VCS root 'Bitcoin ABC Staging'] Loading current repository state for VCS root 'abc-infrastructure' (6s)
[09:04:50]i:		 [Loading current repository state for VCS root 'abc-infrastructure'] VCS root 'abc-infrastructure': git -c credential.helper= -c credential.helper=/opt/teamcity/temp/credHelper9188620289131433334.sh ls-remote origin
[09:04:50]i:		 [Loading current repository state for VCS root 'abc-infrastructure'] VCS root 'Bitcoin ABC Staging': Warning: Permanently added '[reviews.bitcoinabc.org]:2221' (ED25519) to the list of known hosts.
[09:04:50]i:		 [Loading current repository state for VCS root 'abc-infrastructure'] VCS root 'abc-infrastructure': Warning: Permanently added '[reviews.bitcoinabc.org]:2221' (ED25519) to the list of known hosts.
[09:04:51]i: Detecting changes in VCS root 'abc-infrastructure' (used in 'Bitcoin-ABC Infra Checkout', 'Extract Electrum ABC from ABC' and 5 other configurations)
[09:04:51]i: Will collect changes for 'abc-infrastructure' starting from revision 602c7e2af027bb16cc6a4fc5a25601e8c853be5e
[09:04:51]i: Waiting for completion of current operations for the VCS root 'Bitcoin ABC Staging'
[09:04:56]i: Detecting changes in VCS root 'Bitcoin ABC Staging' (used in 'Diff Testing', 'Staging Checkout Dummy')
[09:04:56]i: Will collect changes for 'Bitcoin ABC Staging' starting from revision e19300ef289d49aec039981ea159af4b0cc63dec
[09:04:56] : Compute revision for 'abc-infrastructure' in Automated Deployments / Bitcoin ABC Infra / Bitcoin-ABC Infra Checkout
[09:04:56] :	 [Compute revision for 'abc-infrastructure' in Automated Deployments / Bitcoin ABC Infra / Bitcoin-ABC Infra Checkout] Upper limit revision: 602c7e2af027bb16cc6a4fc5a25601e8c853be5e
[09:04:56]i:	 [Compute revision for 'abc-infrastructure' in Automated Deployments / Bitcoin ABC Infra / Bitcoin-ABC Infra Checkout] MaxModId = 83296
[09:04:56] : Compute revision for 'Bitcoin ABC Staging'
[09:04:56] :	 [Compute revision for 'Bitcoin ABC Staging'] Upper limit revision: 44f4f99a985b3c89620443070eb334cdbfc60c69
[09:04:56]i:	 [Compute revision for 'Bitcoin ABC Staging'] MaxModId = 86388
[09:04:56] :	 [Compute revision for 'abc-infrastructure' in Automated Deployments / Bitcoin ABC Infra / Bitcoin-ABC Infra Checkout] Computed revision: 602c7e2af027bb16cc6a4fc5a25601e8c853be5e
[09:04:56] :	 [Compute revision for 'Bitcoin ABC Staging'] Computed revision: 44f4f99a985b3c89620443070eb334cdbfc60c69
[09:05:03]W: Build was removed from the queue with comment: This build has not been started because some of the builds it depends on failed to start

Tail of the build log:

Build 'Bitcoin ABC Diffs / Diff Testing' #N/A, branch 'refs/tags/phabricator/diff/56302'
Triggered 2025-10-27 09:04:50 by 'Phabricator Staging (phabricator-staging)'
Started 2025-10-27 09:05:06 on agent 'N/A'
Finished 2025-10-27 09:05:06 with status FAILURE 'Snapshot dependency failed to start: Automated Deployments / Bitcoin ABC Infra / Bitcoin-ABC Infra Checkout'
VCS revisions: 'BitcoinABC_BitcoinAbcStaging' (Git, instance id 22): '44f4f99a985b3c89620443070eb334cdbfc60c69' (branch: 'refs/tags/phabricator/diff/56302', checkout rules: '+:. => ./bitcoin-abc')
TeamCity URL https://build.bitcoinabc.org/buildConfiguration/BitcoinABC_BitcoinAbcStaging/1005380 
TeamCity server version is 2025.03.1 (build 186125), server timezone: GMT (UTC)

[09:04:50]W: bt15 (16s)
[09:04:50]i: TeamCity server version is 2025.03.1 (build 186125)
[09:04:50] : Finalize build settings
[09:04:50] : Collecting changes in 2 VCS roots
[09:04:50] :	 [Collecting changes in 2 VCS roots] VCS Root details
[09:04:50] :		 [VCS Root details] "Bitcoin ABC Staging" {instance id=22, parent internal id=3, parent id=BitcoinABC_BitcoinAbcStaging, description: "ssh://vcs@reviews.bitcoinabc.org:2221/source/bitcoin-abc-staging.git#refs/heads/master"}
[09:04:50] :		 [VCS Root details] "abc-infrastructure" {instance id=24, parent internal id=7, parent id=AutomatedDeployments_BitcoinAbcDeveloperTools_AbcInfrastructure, description: "ssh://vcs@reviews.bitcoinabc.org:2221/source/infrastructure.git#refs/heads/master"}
[09:04:50]i: Loading current repository state for VCS root 'abc-infrastructure' (running for 15s)
[09:04:50]i:	 [Loading current repository state for VCS root 'abc-infrastructure'] Loading current repository state for VCS root 'Bitcoin ABC Staging' (running for 15s)
[09:04:50]i:		 [Loading current repository state for VCS root 'Bitcoin ABC Staging'] VCS root 'abc-infrastructure': git -c credential.helper= -c credential.helper=/opt/teamcity/temp/credHelper10025301885863522125.sh ls-remote origin
[09:04:50]i:		 [Loading current repository state for VCS root 'Bitcoin ABC Staging'] VCS root 'Bitcoin ABC Staging': git -c credential.helper= -c credential.helper=/opt/teamcity/temp/credHelper17049080925073467766.sh ls-remote origin
[09:04:50]i:		 [Loading current repository state for VCS root 'Bitcoin ABC Staging'] VCS root 'abc-infrastructure': Warning: Permanently added '[reviews.bitcoinabc.org]:2221' (ED25519) to the list of known hosts.
[09:04:50]i:		 [Loading current repository state for VCS root 'Bitcoin ABC Staging'] VCS root 'Bitcoin ABC Staging': Warning: Permanently added '[reviews.bitcoinabc.org]:2221' (ED25519) to the list of known hosts.
[09:04:51]i:		 [Loading current repository state for VCS root 'Bitcoin ABC Staging'] Detecting changes in VCS root 'abc-infrastructure' (used in 'Bitcoin-ABC Infra Checkout', 'Extract Electrum ABC from ABC' and 5 other configurations)
[09:04:51]i:		 [Loading current repository state for VCS root 'Bitcoin ABC Staging'] Will collect changes for 'abc-infrastructure' starting from revision 602c7e2af027bb16cc6a4fc5a25601e8c853be5e
[09:04:51]i:		 [Loading current repository state for VCS root 'Bitcoin ABC Staging'] Waiting for completion of current operations for the VCS root 'Bitcoin ABC Staging'
[09:04:56]i:		 [Loading current repository state for VCS root 'Bitcoin ABC Staging'] Detecting changes in VCS root 'Bitcoin ABC Staging' (used in 'Diff Testing', 'Staging Checkout Dummy')
[09:04:56]i:		 [Loading current repository state for VCS root 'Bitcoin ABC Staging'] Will collect changes for 'Bitcoin ABC Staging' starting from revision e19300ef289d49aec039981ea159af4b0cc63dec
[09:04:56] : Compute revision for 'abc-infrastructure' in Automated Deployments / Bitcoin ABC Infra / Bitcoin-ABC Infra Checkout
[09:04:56] :	 [Compute revision for 'abc-infrastructure' in Automated Deployments / Bitcoin ABC Infra / Bitcoin-ABC Infra Checkout] Upper limit revision: 602c7e2af027bb16cc6a4fc5a25601e8c853be5e
[09:04:56]i:	 [Compute revision for 'abc-infrastructure' in Automated Deployments / Bitcoin ABC Infra / Bitcoin-ABC Infra Checkout] MaxModId = 83296
[09:04:56] : Compute revision for 'Bitcoin ABC Staging'
[09:04:56] :	 [Compute revision for 'abc-infrastructure' in Automated Deployments / Bitcoin ABC Infra / Bitcoin-ABC Infra Checkout] Computed revision: 602c7e2af027bb16cc6a4fc5a25601e8c853be5e
[09:04:56] :	 [Compute revision for 'Bitcoin ABC Staging'] Upper limit revision: 44f4f99a985b3c89620443070eb334cdbfc60c69
[09:04:56]i:	 [Compute revision for 'Bitcoin ABC Staging'] MaxModId = 86388
[09:04:56] :	 [Compute revision for 'Bitcoin ABC Staging'] Computed revision: 44f4f99a985b3c89620443070eb334cdbfc60c69
[09:05:06]W: Build was removed from the queue with comment: This build has not been started because some of the builds it depends on failed to start
This revision is now accepted and ready to land.Mon, Oct 27, 13:29