diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2016-11-07 21:24:05 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2016-11-07 21:24:05 +0200 |
commit | 4334b4e9c3c0e260c71a38b5be4c0818e7419d47 (patch) | |
tree | 19318c7067540a08c01026e6b235fb7f380198a6 /test/valgrind.awk | |
parent | 85a7b0820be8172ad8af797cf70cf21164aef5a4 (diff) | |
parent | 8444d69c736b76678d96a993f27853173a9e0e77 (diff) | |
download | egawk-4334b4e9c3c0e260c71a38b5be4c0818e7419d47.tar.gz egawk-4334b4e9c3c0e260c71a38b5be4c0818e7419d47.tar.bz2 egawk-4334b4e9c3c0e260c71a38b5be4c0818e7419d47.zip |
Merge branch 'master' into feature/cmake
Diffstat (limited to 'test/valgrind.awk')
-rw-r--r-- | test/valgrind.awk | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/test/valgrind.awk b/test/valgrind.awk new file mode 100644 index 00000000..95699da1 --- /dev/null +++ b/test/valgrind.awk @@ -0,0 +1,43 @@ +function show() +{ + error_count++ + if (cmd) { + printf "%s: %s\n", FILENAME, cmd + cmd = "" + } + printf "\t%s\n",$0 +} + +FNR == 1 { + error_count = 0 +} + +{ $1 = "" } + +$2 == "Command:" { + incmd = 1 + $2 = "" + cmd = $0 + next +} + +incmd { + if (/Parent PID:/) + incmd = 0 + else { + cmd = (cmd $0) + next + } +} + +/ERROR SUMMARY:/ && !/: 0 errors from 0 contexts/ && error_count > 0 { + show() +} + +/definitely lost:/ && !/: 0 bytes in 0 blocks/ { show() } + +# /possibly lost:/ && !/: 0 bytes in 0 blocks/ { show() } + +# / suppressed:/ && !/: 0 bytes in 0 blocks/ { show() } + +/[Ii]nvalid (read|write)/ { show() } |