summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2016-07-02 15:08:40 +0200
committerlouiz’ <louiz@louiz.org>2016-07-02 15:10:23 +0200
commit8cef7303187297bc98d8a9ddceef4674a9297e9d (patch)
tree8987e0d4429c6fdab832772701fc7a8174d2e336
parent79002aa5c9ada3a09d5f09cde0cac4c456adaa47 (diff)
downloadbiboumi-8cef7303187297bc98d8a9ddceef4674a9297e9d.tar.gz
biboumi-8cef7303187297bc98d8a9ddceef4674a9297e9d.tar.bz2
biboumi-8cef7303187297bc98d8a9ddceef4674a9297e9d.tar.xz
biboumi-8cef7303187297bc98d8a9ddceef4674a9297e9d.zip
Add a valgrind suppression file
-rw-r--r--CMakeLists.txt4
-rw-r--r--tests/end_to_end/__main__.py2
-rw-r--r--tests/end_to_end/biboumi.supp10
3 files changed, 13 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7249aa4..132e353 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -205,8 +205,8 @@ add_custom_target(check COMMAND "test_suite"
DEPENDS test_suite biboumi)
add_custom_target(e2e COMMAND "python3" "${CMAKE_CURRENT_SOURCE_DIR}/tests/end_to_end/"
DEPENDS biboumi)
-add_custom_target(e2e_valgrind COMMAND "E2E_BIBOUMI_VALGRIND=1" "python3" "${CMAKE_CURRENT_SOURCE_DIR}/tests/end_to_end/"
- DEPENDS biboumi)
+add_custom_target(e2e_valgrind COMMAND "E2E_BIBOUMI_SUPP_DIR=${CMAKE_CURRENT_SOURCE_DIR}/tests/end_to_end/" "E2E_BIBOUMI_VALGRIND=1" "python3" "${CMAKE_CURRENT_SOURCE_DIR}/tests/end_to_end/"
+ DEPENDS biboumi)
#
diff --git a/tests/end_to_end/__main__.py b/tests/end_to_end/__main__.py
index e6ed911..0223e47 100644
--- a/tests/end_to_end/__main__.py
+++ b/tests/end_to_end/__main__.py
@@ -187,7 +187,7 @@ class BiboumiRunner(ProcessRunner):
self.name = name
self.fd = open("biboumi_%s_output.txt" % (name,), "w")
if with_valgrind:
- self.create = asyncio.create_subprocess_exec("valgrind", "--leak-check=full", "--show-leak-kinds=all",
+ self.create = asyncio.create_subprocess_exec("valgrind", "--suppressions=" + (os.environ.get("E2E_BIBOUMI_SUPP_DIR") or "") + "biboumi.supp", "--leak-check=full", "--show-leak-kinds=all",
"--errors-for-leak-kinds=all", "--error-exitcode=16",
"./biboumi", "test.conf", stdin=None, stdout=self.fd,
stderr=self.fd, loop=None, limit=None)
diff --git a/tests/end_to_end/biboumi.supp b/tests/end_to_end/biboumi.supp
new file mode 100644
index 0000000..d153665
--- /dev/null
+++ b/tests/end_to_end/biboumi.supp
@@ -0,0 +1,10 @@
+{
+ stdlibc++ thingy
+ Memcheck:Leak
+ match-leak-kinds: reachable
+ fun:malloc
+ ...
+ fun:call_init.part.0
+ fun:_dl_init
+ ...
+}