Page MenuHomePhabricator

Avoid spurious boost output in scheduler_tests
ClosedPublic

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

Details

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
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

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: https://github.com/bitcoin/bitcoin/pull/14088/files

This revision is now accepted and ready to land.Jun 6 2019, 18:21

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

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.