test: Always define the raii_event_tests test suite#16564
test: Always define the raii_event_tests test suite#16564maflcko merged 1 commit intobitcoin:masterfrom
Conversation
|
Don't make pull requests into existing releases, make them into master. Edit: the maintainers pull things into the tagged release versions as appropriate. Pull requests basically always go into master, unless they are specific to some release. Yours seems like a generic fix, although I recognize the gentoo downstream issue. |
2728557 to
b2c8450
Compare
I've rebased this on master, thank you very much in advance |
|
Are there steps to reproduce the bug and see that this commit fixes it? |
Have libevent installed so that With this change, you don't get such a failure. |
|
See also #16228 |
|
Could you move the |
|
Agree that this is an issue and needs to be fixed, however I don't think running empty tests is the right fix to allow for conditional tests. |
|
I agree - I much prefer the approach taken in #16228 - perhaps that can be merged? |
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsNo conflicts as of last run. |
src/test/raii_event_tests.cpp
Outdated
There was a problem hiding this comment.
Suggest replacing with:
// It would probably be ideal to report skipped, but boost::test doesn't seem to make that practical (at least not in versions available with common distros)
BOOST_TEST_MESSAGE("Skipping raii_event_tess: libevent doesn't support event_set_mem_functions");
src/test/raii_event_tests.cpp
Outdated
There was a problem hiding this comment.
Maybe consider making this an #else later on (or at least turn the existing #ifdef into an #else if we prefer the skip-test on top)
src/test/raii_event_tests.cpp
Outdated
There was a problem hiding this comment.
Also suggest renaming the test to raii_event_tests_SKIPPED
The test suite must always be defined (even when EVENT_SET_MEM_FUNCTIONS_IMPLEMENTED is not defined) so that the test harness doesn't fail due to not being able to find the raii_event_tests test. This improves upon 95f97f4 actually fixing bitcoin#9493
|
@candrews Here's a branch that can be force-pushed over this one if you like it: master...luke-jr:raii_event_test_fix-0.14 (Cleanly merges to 0.14.0 through master) |
Awesome, that looks great! |
|
re-run ci |
|
I'd strongly prefer a solution that doesn't run |
|
HI @candrews - bumping this to see if you'd like to continue to move this forward towards a solution that doesn't run |
If someone has a suggestion as to how to do that, I'd be happy to update this PR to implement it. |
|
IMO we should just merge this until a better solution is implemented |
|
An alternative would be to kill xenial and use something like this: https://www.boost.org/doc/libs/1_59_0/libs/test/doc/html/boost_test/tests_organization/enabling.html |
|
https://packages.debian.org/jessie/libboost-all-dev is going to die in about a month https://wiki.debian.org/DebianReleases#Production_Releases https://packages.ubuntu.com/xenial/libboost-all-dev is going to die in less than a year https://ubuntu.com/about/release-cycle |
|
Or another alternative (if raising the minimum version of boost is too controversial), could be to make the test skipable when a recent boost version is available or otherwise just make it mandatory and require |
|
The alternative was closed #16228 (comment), so this seems the best bet right now. It can be improved upon later by bumping boost #16564 (comment), but that might or might not be controversial. ACK |
|
Tested ACK:
ACK 9a19c9a 🎹 Show signature and timestampSignature: Timestamp of file with hash |
9a19c9a Always define the raii_event_tests test suite (Craig Andrews) Pull request description: The test suite must always be defined (even when EVENT_SET_MEM_FUNCTIONS_IMPLEMENTED is not defined) so that the test harness doesn't fail due to not being able to find the raii_event_tests test. This improves upon 95f97f4 actually fixing bitcoin#9493 ACKs for top commit: MarcoFalke: ACK 9a19c9a 🎹 Tree-SHA512: 3c42f17a9b5d56c8841f3aa9ac19da91c10aff210026266f31f7eb98a62528740d7c518c121452b68e8f801d6c80ecfb627d137ec6ed533289fa3beb08b4f176
9a19c9a Always define the raii_event_tests test suite (Craig Andrews) Pull request description: The test suite must always be defined (even when EVENT_SET_MEM_FUNCTIONS_IMPLEMENTED is not defined) so that the test harness doesn't fail due to not being able to find the raii_event_tests test. This improves upon 95f97f4 actually fixing bitcoin#9493 ACKs for top commit: MarcoFalke: ACK 9a19c9a 🎹 Tree-SHA512: 3c42f17a9b5d56c8841f3aa9ac19da91c10aff210026266f31f7eb98a62528740d7c518c121452b68e8f801d6c80ecfb627d137ec6ed533289fa3beb08b4f176
9a19c9a Always define the raii_event_tests test suite (Craig Andrews) Pull request description: The test suite must always be defined (even when EVENT_SET_MEM_FUNCTIONS_IMPLEMENTED is not defined) so that the test harness doesn't fail due to not being able to find the raii_event_tests test. This improves upon 95f97f4 actually fixing bitcoin#9493 ACKs for top commit: MarcoFalke: ACK 9a19c9a 🎹 Tree-SHA512: 3c42f17a9b5d56c8841f3aa9ac19da91c10aff210026266f31f7eb98a62528740d7c518c121452b68e8f801d6c80ecfb627d137ec6ed533289fa3beb08b4f176
Summary: PR description: > The test suite must always be defined (even when EVENT_SET_MEM_FUNCTIONS_IMPLEMENTED is not defined) so that the test harness doesn't fail due to not being able to find the raii_event_tests test. > > This improves upon 95f97f4 actually fixing bitcoin/bitcoin#9493 Context from issue: > [[bitcoin/bitcoin#9387 | core#9387]] added a new test that uses libevent's event_set_mem_functions which is sometimes not included with libevent. In particular, Gentoo only enables this when libevent is installed with the "debug" option. > Currently, this causes the build to simply fail on tests This is a backport of [[bitcoin/bitcoin#16564 | core#16564]] Test Plan: `ninja check` Reviewers: #bitcoin_abc, majcosta Reviewed By: #bitcoin_abc, majcosta Differential Revision: https://reviews.bitcoinabc.org/D9930
The test suite must always be defined (even when EVENT_SET_MEM_FUNCTIONS_IMPLEMENTED is not defined) so that the test harness doesn't fail due to not being able to find the raii_event_tests test.
This improves upon 95f97f4 actually fixing #9493