aboutsummaryrefslogtreecommitdiffstats
path: root/test/valgrind.awk
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2016-11-07 21:24:31 +0200
committerArnold D. Robbins <arnold@skeeve.com>2016-11-07 21:24:31 +0200
commit61daea989c84d97c552ea2daf168e7117d82aae0 (patch)
tree5bc3904b11feb564171865690eddea9ff34cdc41 /test/valgrind.awk
parent9ae43a6c83ef1c843072d93216c6267383df9bfa (diff)
parent8444d69c736b76678d96a993f27853173a9e0e77 (diff)
downloadegawk-61daea989c84d97c552ea2daf168e7117d82aae0.tar.gz
egawk-61daea989c84d97c552ea2daf168e7117d82aae0.tar.bz2
egawk-61daea989c84d97c552ea2daf168e7117d82aae0.zip
Merge branch 'master' into feature/nocopy
Diffstat (limited to 'test/valgrind.awk')
-rw-r--r--test/valgrind.awk43
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() }