chiark / gitweb /
Test example: instructions for running under valgrind memcheck.
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 2 Jul 2011 17:44:28 +0000 (18:44 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 13 Jul 2011 17:33:34 +0000 (18:33 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
test-example/README
test-example/memcheck.suppressions [new file with mode: 0644]

index a6416f6..4c2eca3 100644 (file)
@@ -19,3 +19,8 @@ To run the test:
  Then in a third
   ping -I secnet-test-i 172.18.232.2 
  
+For running under valgrind memcheck, do something like this:
+  valgrind --num-callers=40 --gen-suppressions=yes --db-attach=yes \
+    --leak-check=full --suppressions=test-example/memcheck.suppressions \
+    ./secnet -dvnc test-example/outside.conf
+NB that --num-callers is needed as secnet's stack can be deep.
diff --git a/test-example/memcheck.suppressions b/test-example/memcheck.suppressions
new file mode 100644 (file)
index 0000000..42080da
--- /dev/null
@@ -0,0 +1,14 @@
+{
+   secnet_read_conffile
+   Memcheck:Leak
+   ...
+   fun:read_conffile
+   fun:main
+}
+{
+   secnet_enter_phase
+   Memcheck:Leak
+   ...
+   fun:enter_phase
+   fun:main
+}