From cfb1536cee5c2ba40b3a3d276d0e4b14dd07df42 Mon Sep 17 00:00:00 2001 From: David Diaz Date: Wed, 13 Dec 2017 15:59:23 -0600 Subject: [PATCH 1/3] chg: dev: Add documentation for memcheck --- .../plugins/sources/valgrind/memcheck.py | 82 ++++++++++++++++++- 1 file changed, 81 insertions(+), 1 deletion(-) diff --git a/lib/flowbber/plugins/sources/valgrind/memcheck.py b/lib/flowbber/plugins/sources/valgrind/memcheck.py index 3073468..e8bd2c5 100644 --- a/lib/flowbber/plugins/sources/valgrind/memcheck.py +++ b/lib/flowbber/plugins/sources/valgrind/memcheck.py @@ -41,9 +41,89 @@ .. code-block:: json { - "FIXME": "FIXME" + "status":[ + { + "state":"RUNNING", + "time":"00:00:00:00.268" + }, + { + "state":"FINISHED", + "time":"00:00:00:59.394" + } + ], + "ppid":"4242", + "preamble":{ + "line":[ + "Memcheck, a memory error detector", + "Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.", + "Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info", + "Command: ./binary" + ] + }, + "suppcounts":{ + "pair":[ + { + "name":"reachable memory from libstdc++ pool", + "count":"1" + } + ] + }, + "pid":"424242", + "errorcounts":null, + "protocoltool":"memcheck", + "protocolversion":"4", + "tool":"memcheck", + "error":[ + { + "kind":"Leak_DefinitelyLost", + "stack":{ + "frame":[ + { + "obj":"/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so", + "ip":"0x4C2FB55", + "fn":"calloc" + }, + { + "dir":"/home/library", + "obj":"/home/library/binary", + "line":"76", + "ip":"0xED467F", + "fn":"hello_world()", + "file":"hello.cpp" + }, + ] + }, + "xwhat":{ + "leakedblocks":"1", + "text":"8 bytes in 1 blocks are definitely lost in loss record 1 of 5", + "leakedbytes":"8" + }, + "tid":"1", + "unique":"0x0" + } + ], + "args":{ + "vargv":{ + "exe":"/usr/bin/valgrind.bin", + "arg":[ + "--track-origins=yes", + "--leak-check=full", + "--show-leak-kinds=all", + "--errors-for-leak-kinds=definite", + "--error-exitcode=1", + "--xml=yes", + "--xml-file=memcheck.xml", + "--suppressions=/home/library/suppressions.supp" + ] + }, + "argv":{ + "exe":"./binary", + "arg":[] + } + } } + **Dependencies:** .. code-block:: sh From 799ebe8ecf4b9121cecfa382621ca1e544951a62 Mon Sep 17 00:00:00 2001 From: David Diaz Date: Wed, 13 Dec 2017 16:00:04 -0600 Subject: [PATCH 2/3] chg: dev: make memcheck source treat error as list always --- lib/flowbber/plugins/sources/valgrind/memcheck.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/flowbber/plugins/sources/valgrind/memcheck.py b/lib/flowbber/plugins/sources/valgrind/memcheck.py index e8bd2c5..b337662 100644 --- a/lib/flowbber/plugins/sources/valgrind/memcheck.py +++ b/lib/flowbber/plugins/sources/valgrind/memcheck.py @@ -192,7 +192,7 @@ def collect(self): 'No such file {}'.format(infile) ) - doc = parse(infile.read_text()) + doc = parse(infile.read_text(), force_list=('error',)) return doc['valgrindoutput'] From 9b8fd5c323dec1b6cbdb92ba7e30ed8f2073327a Mon Sep 17 00:00:00 2001 From: David Diaz Date: Thu, 14 Dec 2017 15:51:15 -0600 Subject: [PATCH 3/3] fix: dev: Pytest 3.3.0 introduces conflicts with flowbber loggin --- requirements.dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.dev.txt b/requirements.dev.txt index 28b2c67..3e700e6 100644 --- a/requirements.dev.txt +++ b/requirements.dev.txt @@ -15,7 +15,7 @@ ipdb # Testing # ####################### -pytest +pytest==3.2.5 pytest-cov #######################