Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

event_set_mem_functions is not available on all libevents #9493

Closed
luke-jr opened this issue Jan 8, 2017 · 0 comments · Fixed by #9647
Closed

event_set_mem_functions is not available on all libevents #9493

luke-jr opened this issue Jan 8, 2017 · 0 comments · Fixed by #9647
Milestone

Comments

@luke-jr
Copy link
Member

luke-jr commented Jan 8, 2017

#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:

test/raii_event_tests.cpp: In member function ‘void raii_event_tests::raii_event_creation::test_method()’:
test/raii_event_tests.cpp:39:58: error: ‘event_set_mem_functions’ was not declared in this scope
     event_set_mem_functions(tag_malloc, realloc, tag_free);
                                                          ^
test/raii_event_tests.cpp: In member function ‘void raii_event_tests::raii_event_order::test_method()’:
test/raii_event_tests.cpp:68:58: error: ‘event_set_mem_functions’ was not declared in this scope
     event_set_mem_functions(tag_malloc, realloc, tag_free);
                                                          ^
Makefile:8355: recipe for target 'test/test_test_bitcoin-raii_event_tests.o' failed

Probably we should skip this test if libevent doesn't support overriding memory functions.

(event.h defines EVENT_SET_MEM_FUNCTIONS_IMPLEMENTED if it is available.)

@maflcko maflcko added this to the 0.14.0 milestone Jan 8, 2017
candrews added a commit to candrews/bitcoin that referenced this issue Aug 7, 2019
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 added a commit to candrews/bitcoin that referenced this issue Aug 7, 2019
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 added a commit to candrews/bitcoin that referenced this issue Aug 7, 2019
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
luke-jr pushed a commit to luke-jr/bitcoin that referenced this issue Sep 20, 2019
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
maflcko pushed a commit to maflcko/bitcoin-core that referenced this issue May 31, 2020
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
sidhujag pushed a commit to syscoin/syscoin that referenced this issue Jun 1, 2020
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
stackman27 pushed a commit to stackman27/bitcoin that referenced this issue Jun 26, 2020
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
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this issue Jun 27, 2021
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
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this issue Jun 28, 2021
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
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this issue Jun 29, 2021
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
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this issue Jul 1, 2021
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
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this issue Jul 1, 2021
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
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this issue Jul 14, 2021
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
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this issue Jul 15, 2021
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
Fabcien pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this issue Aug 25, 2021
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
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants