mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
common: fix kmemleak to work with sections
Refactor the kmemleak code to work correctly with sections. This requires changing the location of the "is kmemleak enabled?" flag to use /tmp instead of RESULT_BASE, scanning for leaks after every test, and clarifying which functions get used when. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Eryu Guan <guaneryu@gmail.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
This commit is contained in:
committed by
Eryu Guan
parent
c869a6712a
commit
0c24aa077f
@@ -496,7 +496,7 @@ _expunge_test()
|
||||
return 0
|
||||
}
|
||||
|
||||
_init_kmemleak
|
||||
_detect_kmemleak
|
||||
_prepare_test_list
|
||||
|
||||
if $OPTIONS_HAVE_SECTIONS; then
|
||||
@@ -771,9 +771,12 @@ for section in $HOST_OPTIONS_SECTIONS; do
|
||||
# and log messages that shouldn't be there.
|
||||
_check_filesystems
|
||||
_check_dmesg || err=true
|
||||
_check_kmemleak || err=true
|
||||
fi
|
||||
|
||||
# Scan for memory leaks after every test so that associating
|
||||
# a leak to a particular test will be as accurate as possible.
|
||||
_check_kmemleak || err=true
|
||||
|
||||
# test ends after all checks are done.
|
||||
$timestamp && _timestamp
|
||||
stop=`_wallclock`
|
||||
|
||||
Reference in New Issue
Block a user