common/rc: report kmemleak errors

If kmemleak is enabled, scan and report memory leaks after every
test.

Note that the kmemleak check support is EXPERIMENTAL! Due to the way
kmemleak works, the leak might be from an earlier test, or something
totally unrelated.

[eguan: add EXPERIMENTAL disclaimer in commit log too]

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
This commit is contained in:
Darrick J. Wong
2018-01-24 15:53:23 -08:00
committed by Eryu Guan
parent f2afd6331d
commit 074740a32c
2 changed files with 62 additions and 0 deletions
+2
View File
@@ -499,6 +499,7 @@ _expunge_test()
return 0
}
_init_kmemleak
_prepare_test_list
if $OPTIONS_HAVE_SECTIONS; then
@@ -791,6 +792,7 @@ for section in $HOST_OPTIONS_SECTIONS; do
n_try=`expr $n_try + 1`
_check_filesystems
_check_dmesg || err=true
_check_kmemleak || err=true
fi
fi