Page MenuHomePhabricator

Avoid spurious boost output in scheduler_tests
ClosedPublic

Authored by Fabien on Thu, Jun 6, 11:14.

Details

Reviewers
deadalnix
jasonbcox
Group Reviewers
Restricted Project
Commits
rABCaa668d1eb240: Avoid spurious boost output in scheduler_tests
Summary

Boost test macros try to output some message, which leads to a messy
debug output when called in intricated threads.
Use assert in these cases solves the issue.

Backport of Core PR14069
https://github.com/bitcoin/bitcoin/pull/14069/files

Test Plan
./src/test/test_bitcoin -t scheduler_tests

Without the patch it will sometime output partial boost debug info.
With the patch the output will remain clean.

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Fabien created this revision.Thu, Jun 6, 11:14
Herald added a reviewer: Restricted Project. · View Herald TranscriptThu, Jun 6, 11:14
jasonbcox edited the summary of this revision. (Show Details)Thu, Jun 6, 18:20
jasonbcox accepted this revision.
jasonbcox added a subscriber: jasonbcox.

Added a note in the summary that this is a backport.

Also consider backporting this as well: https://github.com/bitcoin/bitcoin/pull/14088/files

This revision is now accepted and ready to land.Thu, Jun 6, 18:21
Fabien added a comment.Thu, Jun 6, 18:24

@jasonbcox Thanks for the summary, I missed the backport.
I will backport the follow-up.

This revision was automatically updated to reflect the committed changes.

I guess one frustrating thing with assert is that it doesn't throw an exception (just kills program without any information), if it happens that these fail for some reason.