From 43aa6ade6fd3f23695cda41abb66ad9e7b9b438c Mon Sep 17 00:00:00 2001 From: Eric Soroos Date: Fri, 9 Apr 2021 13:39:28 +0200 Subject: [PATCH] Local valgrind test target --- Makefile | 6 ++++++ Tests/oss-fuzz/python.supp | 16 ++++++++++++++++ requirements.txt | 1 + 3 files changed, 23 insertions(+) create mode 100644 Tests/oss-fuzz/python.supp diff --git a/Makefile b/Makefile index 53eaa0566..7d0c86abf 100644 --- a/Makefile +++ b/Makefile @@ -102,6 +102,12 @@ sdist: test: pytest -qq +.PHONY: valgrind +valgrind: + PYTHONMALLOC=malloc valgrind --suppressions=Tests/oss-fuzz/python.supp --leak-check=no \ + --log-file=/tmp/valgrind-output \ + python3 -m pytest --no-memcheck -vv --valgrind --valgrind-log=/tmp/valgrind-output + .PHONY: readme readme: python3 setup.py --long-description | markdown2 > .long-description.html && open .long-description.html diff --git a/Tests/oss-fuzz/python.supp b/Tests/oss-fuzz/python.supp new file mode 100644 index 000000000..94cc87db9 --- /dev/null +++ b/Tests/oss-fuzz/python.supp @@ -0,0 +1,16 @@ +{ + + Memcheck:Cond + ... + fun:encode_current_locale +} + + +{ + + Memcheck:Cond + fun:inflate + fun:ZIPDecode + fun:_TIFFReadEncodedTileAndAllocBuffer + ... +} diff --git a/requirements.txt b/requirements.txt index 4b534ae53..1b4a04a75 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,6 +9,7 @@ pyroma pytest pytest-cov pytest-timeout +pytest-valgrind sphinx>=2.4 sphinx-issues sphinx-removed-in