Dummy callbacks for tests #971
pull aahadley-anchorage wants to merge 2 commits into bitcoin-core:master from aahadley-anchorage:master changing 1 files +12 −0-
aahadley-anchorage commented at 6:12 pm on September 1, 2021: noneIf external callbacks are specified, the build can fail at link time since these functions aren’t defined yet. Give the linker some definitions to make it happy.
-
provide dummy callbacks for tests b6032d4d34
-
make that an ifdef 91e75a6737
-
aahadley-anchorage marked this as ready for review on Sep 1, 2021
-
real-or-random commented at 4:43 pm on September 3, 2021: contributor
Hm, that’s an issue indeed.
If you use the external callbacks, then you probably do because you don’t have
printf
orabort
on your platform. In tests, we use these function anyway, so I think this change is fine. But wouldn’t it be simpler to#undef USE_EXTERNAL_CALLBACKS
?Ideally, we’d move into the other direction and make it possible to run the tests without
printf
. But that’s more complicated.I wonder if could we just abuse the external callbacks for exactly that purpose? Instead of making
CHECK
call abort, we could make this macro reset the default callback and then invoke it. If you don’t haveprintf
orabort
, you’d be able provide a different external callback… Except I don’t know how to print the seed then or the final success message. Maybe it’s just cleaner to let the user provide some print function… -
real-or-random cross-referenced this on May 11, 2023 from issue build: Make tests work with external default callbacks by real-or-random
-
real-or-random commented at 5:12 pm on May 11, 2023: contributorClosing in favor of #1306
-
real-or-random closed this on May 11, 2023
This is a metadata mirror of the GitHub repository bitcoin-core/secp256k1. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-23 09:15 UTC
More mirrored repositories can be found on mirror.b10c.me