Skip to content

Commit

Permalink
tests/bcachefs/fstests.ktest: check for leaks
Browse files Browse the repository at this point in the history
Signed-off-by: Kent Overstreet <[email protected]>
  • Loading branch information
Kent Overstreet committed Aug 19, 2024
1 parent f09ad07 commit 1bc644c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/fs/bcachefs/bcachefs-test-libs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ export BCACHEFS_KERNEL_ONLY=1
#Expensive:
#require-kernel-config CLOSURE_DEBUG

check_bcachefs_leaks()
{
! grep -v "0 0" /proc/allocinfo|grep fs/bcachefs/
}

expect_sysfs()
{
prefix=$1
Expand Down
2 changes: 2 additions & 0 deletions tests/fs/bcachefs/fstests.ktest
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ run_test()

run_fstests "$@"

check_bcachefs_leaks

check_counters ${ktest_scratch_dev[0]}
check_counters ${ktest_scratch_dev[1]}
}
Expand Down

0 comments on commit 1bc644c

Please sign in to comment.