Skip to content

Conversation

elichai
Copy link
Contributor

@elichai elichai commented Dec 30, 2019

Technically the notes only show an "example" of how to run valgrind with the suppression file,
but now that #17633 is merged then maybe this can encourage more people to run also the functional tests in valgrind

@DrahtBot DrahtBot added the Docs label Dec 30, 2019
@instagibbs
Copy link
Member

MAC build having (unrelated) issue:

Running test/util/bitcoin-util-test.py...
/usr/local/bin/python ../test/util/bitcoin-util-test.py
Traceback (most recent call last):
  File "../test/util/bitcoin-util-test.py", line 14, in <module>
    import configparser
ImportError: No module named configparser

@elichai
Copy link
Contributor Author

elichai commented Dec 30, 2019

MAC build having (unrelated) issue:

Running test/util/bitcoin-util-test.py...
/usr/local/bin/python ../test/util/bitcoin-util-test.py
Traceback (most recent call last):
  File "../test/util/bitcoin-util-test.py", line 14, in <module>
    import configparser
ImportError: No module named configparser

Thanks. yeah, i'm trying to figure out what's going on

@@ -250,6 +250,7 @@ $ valgrind --suppressions=contrib/valgrind.supp src/test/test_bitcoin
$ valgrind --suppressions=contrib/valgrind.supp --leak-check=full \
--show-leak-kinds=all src/test/test_bitcoin --log_level=test_suite
$ valgrind -v --leak-check=full src/bitcoind -printtoconsole
$ ./test/functional/test_runner.py --valgrind
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thoughts:

  • This should wait for tests: Add "make check-valgrind" to run the unit tests under Valgrind #17639
  • This is example is visible when running .test/functional/test_runner.py --help, which is not the case for the existing examples
  • There should be a dedicated valgrind doc to link to here, and/or sections in test/README.md and test/functional/README.md about running with valgrind
  • In general, this section could use more documentation, updating, or a link to more details
  • This example requires valgrind 3.14 or later, which is not the case for the existing examples, and that should be documented

@maflcko
Copy link
Member

maflcko commented Mar 11, 2020

@instagibbs python2 is not supported, have you tried with python3?

@maflcko maflcko merged commit 90b3e59 into bitcoin:master Mar 11, 2020
@elichai elichai deleted the patch-1 branch March 11, 2020 14:27
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Mar 11, 2020
155a11f doc: Added running functional tests in valgrind (Elichai Turkel)

Pull request description:

  Technically the notes only show an "example" of how to run valgrind with the suppression file,
  but now that bitcoin#17633 is merged then maybe this can encourage more people to run also the functional tests in valgrind

Top commit has no ACKs.

Tree-SHA512: b8417249b720d0ed5e10b732648f2e07e8889bfc7aa7e94192d1c049b4b7837971678d30c535f273c227848f1290cf11e14369fd6c1924b734f2e47e2af41401
@therealdannzor
Copy link

Hi @MarcoFalke, I just had the same problem as @instagibbs and I'm also on OSX. You are right in that running python3 ./test/util/bitcoin-util-test.py does work correctly but when running make check in root, it is still on 2.7 as can be seen in the Makefile on L:433 (after building the project).

PYTHON = /usr/local/bin/python2.7

@maflcko
Copy link
Member

maflcko commented Apr 24, 2020

This should never happen when python3 is available. The order to pick up python versions is this:

$ git grep 'python3.8'
configure.ac:AC_PATH_PROGS([PYTHON], [python3.5 python3.6 python3.7 python3.8 python3 python])

sidhujag pushed a commit to syscoin-core/syscoin that referenced this pull request Nov 10, 2020
155a11f doc: Added running functional tests in valgrind (Elichai Turkel)

Pull request description:

  Technically the notes only show an "example" of how to run valgrind with the suppression file,
  but now that bitcoin#17633 is merged then maybe this can encourage more people to run also the functional tests in valgrind

Top commit has no ACKs.

Tree-SHA512: b8417249b720d0ed5e10b732648f2e07e8889bfc7aa7e94192d1c049b4b7837971678d30c535f273c227848f1290cf11e14369fd6c1924b734f2e47e2af41401
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Feb 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants