mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-02 01:36:13 +00:00
test: Move valgrind.supp to the other sanitizer_suppressions files
This commit is contained in:
parent
fa9cf81d39
commit
fab51e470e
@ -12,7 +12,7 @@ for b_name in "${BASE_OUTDIR}/bin"/*; do
|
||||
echo "Wrap $b ..."
|
||||
mv "$b" "${b}_orig"
|
||||
echo '#!/usr/bin/env bash' > "$b"
|
||||
echo "exec valgrind --gen-suppressions=all --quiet --error-exitcode=1 --suppressions=${BASE_ROOT_DIR}/contrib/valgrind.supp \"${b}_orig\" \"\$@\"" >> "$b"
|
||||
echo "exec valgrind --gen-suppressions=all --quiet --error-exitcode=1 --suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/valgrind.supp \"${b}_orig\" \"\$@\"" >> "$b"
|
||||
chmod +x "$b"
|
||||
done
|
||||
done
|
||||
|
||||
@ -384,13 +384,13 @@ other input.
|
||||
|
||||
Valgrind is a programming tool for memory debugging, memory leak detection, and
|
||||
profiling. The repo contains a Valgrind suppressions file
|
||||
([`valgrind.supp`](https://github.com/bitcoin/bitcoin/blob/master/contrib/valgrind.supp))
|
||||
([`valgrind.supp`](/test/sanitizer_suppressions/valgrind.supp))
|
||||
which includes known Valgrind warnings in our dependencies that cannot be fixed
|
||||
in-tree. Example use:
|
||||
|
||||
```shell
|
||||
$ valgrind --suppressions=contrib/valgrind.supp build/bin/test_bitcoin
|
||||
$ valgrind --suppressions=contrib/valgrind.supp --leak-check=full \
|
||||
$ valgrind --suppressions=test/sanitizer_suppressions/valgrind.supp build/bin/test_bitcoin
|
||||
$ valgrind --suppressions=test/sanitizer_suppressions/valgrind.supp --leak-check=full \
|
||||
--show-leak-kinds=all build/bin/test_bitcoin --log_level=test_suite
|
||||
$ valgrind -v --leak-check=full build/bin/bitcoind -printtoconsole
|
||||
$ ./build/test/functional/test_runner.py --valgrind
|
||||
|
||||
@ -251,7 +251,7 @@ class Binaries:
|
||||
def __init__(self, paths, bin_dir, *, use_valgrind=False):
|
||||
self.paths = paths
|
||||
self.bin_dir = bin_dir
|
||||
suppressions_file = pathlib.Path(__file__).resolve().parents[3] / "contrib" / "valgrind.supp"
|
||||
suppressions_file = pathlib.Path(__file__).resolve().parents[3] / "test" / "sanitizer_suppressions" / "valgrind.supp"
|
||||
self.valgrind_cmd = [
|
||||
"valgrind",
|
||||
f"--suppressions={suppressions_file}",
|
||||
|
||||
@ -2,12 +2,12 @@
|
||||
# dependencies that cannot be fixed in-tree.
|
||||
#
|
||||
# Example use:
|
||||
# $ valgrind --suppressions=contrib/valgrind.supp build/bin/test_bitcoin
|
||||
# $ valgrind --suppressions=contrib/valgrind.supp --leak-check=full \
|
||||
# $ valgrind --suppressions=test/sanitizer_suppressions/valgrind.supp build/bin/test_bitcoin
|
||||
# $ valgrind --suppressions=test/sanitizer_suppressions/valgrind.supp --leak-check=full \
|
||||
# --show-leak-kinds=all build/bin/test_bitcoin
|
||||
#
|
||||
# To create suppressions for found issues, use the --gen-suppressions=all option:
|
||||
# $ valgrind --suppressions=contrib/valgrind.supp --leak-check=full \
|
||||
# $ valgrind --suppressions=test/sanitizer_suppressions/valgrind.supp --leak-check=full \
|
||||
# --show-leak-kinds=all --gen-suppressions=all --show-reachable=yes \
|
||||
# --error-limit=no build/bin/test_bitcoin
|
||||
#
|
||||
Loading…
x
Reference in New Issue
Block a user