Skip slow tests when kmemleak is enabled

When running the ZFS Test Suite with a kmemleak enabled kernel
the following test cases run far slower than usual and may hit
their timeout threshold.  Skip the following test cases.

Test: cli_root/zfs_get/zfs_get_009_pos (run as root) [55:43]
Test: cli_root/zpool_clear/zpool_clear_001_pos (run as root) [11:32]
Test: cli_root/zpool_create/zpool_create_024_pos (run as root) [11:01]
Test: features/async_destroy/async_destroy_001_pos (run as root) [41:15]
Test: inheritance/inherit_001_pos (run as root) [09:08]

Reviewed-by: Chunwei Chen <david.chen@osnexus.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #5479 
Closes #5480
This commit is contained in:
Brian Behlendorf 2016-12-14 09:33:07 -08:00 committed by GitHub
parent f974e25dc1
commit c6ced7261c
6 changed files with 38 additions and 1 deletions

View File

@ -57,6 +57,19 @@ function is_32bit
fi fi
} }
# Determine if kmemleak is enabled
#
# Return 0 if kmemleak is enabled, 1 if otherwise
function is_kmemleak
{
if is_linux && [[ -e /sys/kernel/debug/kmemleak ]]; then
return 0
else
return 1
fi
}
# Determine whether a dataset is mounted # Determine whether a dataset is mounted
# #
# $1 dataset name # $1 dataset name

View File

@ -41,6 +41,11 @@
verify_runnable "both" verify_runnable "both"
# See issue: https://github.com/zfsonlinux/zfs/issues/5479
if is_kmemleak; then
log_unsupported "Test case runs slowly when kmemleak is enabled"
fi
log_assert "'zfs get -d <n>' should get expected output." log_assert "'zfs get -d <n>' should get expected output."
log_onexit depth_fs_cleanup log_onexit depth_fs_cleanup

View File

@ -45,6 +45,11 @@
verify_runnable "global" verify_runnable "global"
# See issue: https://github.com/zfsonlinux/zfs/issues/5479
if is_kmemleak; then
log_unsupported "Test case runs slowly when kmemleak is enabled"
fi
function cleanup function cleanup
{ {
poolexists $TESTPOOL1 && \ poolexists $TESTPOOL1 && \
@ -55,7 +60,6 @@ function cleanup
done done
} }
log_assert "Verify 'zpool clear' can clear errors of a storage pool." log_assert "Verify 'zpool clear' can clear errors of a storage pool."
log_onexit cleanup log_onexit cleanup

View File

@ -39,6 +39,11 @@
verify_runnable "global" verify_runnable "global"
# See issue: https://github.com/zfsonlinux/zfs/issues/5479
if is_kmemleak; then
log_unsupported "Test case runs slowly when kmemleak is enabled"
fi
function cleanup function cleanup
{ {
if [[ -n "$child_pids" ]]; then if [[ -n "$child_pids" ]]; then

View File

@ -46,6 +46,11 @@ TEST_FS=$TESTPOOL/async_destroy
verify_runnable "both" verify_runnable "both"
# See issue: https://github.com/zfsonlinux/zfs/issues/5479
if is_kmemleak; then
log_unsupported "Test case runs slowly when kmemleak is enabled"
fi
function cleanup function cleanup
{ {
datasetexists $TEST_FS && log_must $ZFS destroy $TEST_FS datasetexists $TEST_FS && log_must $ZFS destroy $TEST_FS

View File

@ -45,6 +45,11 @@
verify_runnable "global" verify_runnable "global"
# See issue: https://github.com/zfsonlinux/zfs/issues/5479
if is_kmemleak; then
log_unsupported "Test case runs slowly when kmemleak is enabled"
fi
log_assert "Test properties are inherited correctly" log_assert "Test properties are inherited correctly"
# #