summaryrefslogtreecommitdiffstats
path: root/tests/shell/run-tests-kmemleak.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/shell/run-tests-kmemleak.sh')
-rw-r--r--tests/shell/run-tests-kmemleak.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/shell/run-tests-kmemleak.sh b/tests/shell/run-tests-kmemleak.sh
new file mode 100644
index 0000000..16e6cfd
--- /dev/null
+++ b/tests/shell/run-tests-kmemleak.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+rm -f leak.txt
+
+cat x | while read line
+do
+ echo "running $line..."
+ sh -c 'echo clear > /sys/kernel/debug/kmemleak'
+ ./run-tests.sh $line
+ echo "... checking for leaks"
+ sh -c 'echo scan > /sys/kernel/debug/kmemleak'
+ LINES=`cat /sys/kernel/debug/kmemleak | grep nfnetlink | wc -l | cut -d' ' -f 1`
+ echo $LINES
+ if [ $LINES -ne 0 ]
+ then
+ echo "POSSIBLE LEAK!!!!!!!!!"
+ echo "$line" >> leak.txt
+ fi
+done