]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: rbd valgrind tests should use failure exit code
authorJason Dillaman <dillaman@redhat.com>
Wed, 31 May 2017 19:57:39 +0000 (15:57 -0400)
committerJason Dillaman <dillaman@redhat.com>
Fri, 2 Jun 2017 12:55:08 +0000 (08:55 -0400)
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
qa/suites/rbd/valgrind/validator/memcheck.yaml
qa/workunits/rbd/test_librbd.sh
qa/workunits/rbd/test_librbd_python.sh
qa/workunits/rbd/test_rbd_mirror.sh
src/valgrind.supp

index 4ee49f16eb8e8a7970f61859a5e5a135cfe94542..c5348269a89b261a9d24049a6dd4ae8da54dcffe 100644 (file)
@@ -8,4 +8,4 @@ overrides:
     valgrind: ["--tool=memcheck"]
   workunit:
     env:
-      VALGRIND: "memcheck"
+      VALGRIND: "--tool=memcheck --leak-check=full"
index f3999f4bba4a651535d4d62dfbdf36d35dd83115..447306bb41c97e6d0b22989d895fd52fbdfa16bb 100755 (executable)
@@ -1,8 +1,8 @@
 #!/bin/sh -e
 
 if [ -n "${VALGRIND}" ]; then
-  valgrind --tool=${VALGRIND} --suppressions=${TESTDIR}/valgrind.supp \
-    ceph_test_librbd
+  valgrind ${VALGRIND} --suppressions=${TESTDIR}/valgrind.supp \
+    --error-exitcode=1 ceph_test_librbd
 else
   ceph_test_librbd
 fi
index 9bef91b4ebfec0adacda1f878e80c0022c242eb8..656a5bd165739d913c4d10529eb4e2ed7c63c639 100755 (executable)
@@ -3,7 +3,8 @@
 relpath=$(dirname $0)/../../../src/test/pybind
 
 if [ -n "${VALGRIND}" ]; then
-  valgrind --tool=${VALGRIND} --suppressions=${TESTDIR}/valgrind.supp \
+  valgrind ${VALGRIND} --suppressions=${TESTDIR}/valgrind.supp \
+    --errors-for-leak-kinds=definite --error-exitcode=1 \
     nosetests -v $relpath/test_rbd.py
 else
   nosetests -v $relpath/test_rbd.py
index 725e1d3df53e64ca8f081991236e203b48848705..e139dd7e450459f0c41bd6980ccd1fd008c7452a 100755 (executable)
@@ -1,8 +1,8 @@
 #!/bin/sh -e
 
 if [ -n "${VALGRIND}" ]; then
-  valgrind --tool=${VALGRIND} --suppressions=${TESTDIR}/valgrind.supp \
-    ceph_test_rbd_mirror
+  valgrind ${VALGRIND} --suppressions=${TESTDIR}/valgrind.supp \
+    --error-exitcode=1 ceph_test_rbd_mirror
 else
   ceph_test_rbd_mirror
 fi
index f9c9c717313fe5b11244d4696bfdb03fa0db25ba..369d7b821b440c8c3480af75918bf0bee781945b 100644 (file)
    fun:pthread_create@*
    ...
 }
+
+# rados cython constants
+{
+   <insert_a_suppression_name_here>
+   Memcheck:Leak
+   match-leak-kinds: definite
+   fun:malloc
+   fun:PyObject_Malloc
+   fun:PyCode_New
+   fun:__Pyx_InitCachedConstants
+   fun:initrados
+   fun:_PyImport_LoadDynamicModule
+   ...
+   fun:PyImport_ImportModuleLevel
+   ...
+   fun:PyObject_Call
+   fun:PyEval_CallObjectWithKeywords
+   fun:PyEval_EvalFrameEx
+}
+
+# rbd cython constants
+{
+   <insert_a_suppression_name_here>
+   Memcheck:Leak
+   match-leak-kinds: definite
+   fun:malloc
+   fun:PyObject_Malloc
+   fun:PyCode_New
+   fun:__Pyx_InitCachedConstants
+   fun:initrbd
+   fun:_PyImport_LoadDynamicModule
+   ...
+   fun:PyImport_ImportModuleLevel
+   ...
+   fun:PyObject_Call
+   fun:PyEval_CallObjectWithKeywords
+   fun:PyEval_EvalFrameEx
+}