Page MenuHomePhabricator

Avoid spurious boost output in scheduler_tests

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



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

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

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

Event Timeline

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

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

Also consider backporting this as well:

This revision is now accepted and ready to land.Jun 6 2019, 18:21
Fabien added a comment.Jun 6 2019, 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.