]> git.proxmox.com Git - mirror_zfs.git/commitdiff
Skip slow tests when kmemleak is enabled
authorBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 14 Dec 2016 17:33:07 +0000 (09:33 -0800)
committerGitHub <noreply@github.com>
Wed, 14 Dec 2016 17:33:07 +0000 (09:33 -0800)
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

tests/zfs-tests/include/libtest.shlib
tests/zfs-tests/tests/functional/cli_root/zfs_get/zfs_get_009_pos.ksh
tests/zfs-tests/tests/functional/cli_root/zpool_clear/zpool_clear_001_pos.ksh
tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_024_pos.ksh
tests/zfs-tests/tests/functional/features/async_destroy/async_destroy_001_pos.ksh
tests/zfs-tests/tests/functional/inheritance/inherit_001_pos.ksh

index c5fd8b78ae1c01cf894a88d3b1d25cd46bef79c8..483542e3136404c6d5bf3671ae8c23271ce7c4cf 100644 (file)
@@ -57,6 +57,19 @@ function is_32bit
        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
 #
 # $1 dataset name
index 11eadaadd02208924d46546c58fba01886e0fb51..411914effc5faded2017ceb9cce3bd409cd19d1c 100755 (executable)
 
 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_onexit depth_fs_cleanup
 
index b2a2ed5e4dc5e22e831dbdd398ea026fba02797d..b88fbc8b70dc5bd6275d14ad0f6c649505e48128 100755 (executable)
 
 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
 {
         poolexists $TESTPOOL1 && \
@@ -55,7 +60,6 @@ function cleanup
         done
 }
 
-
 log_assert "Verify 'zpool clear' can clear errors of a storage pool."
 log_onexit cleanup
 
index 1fa22d6ca4263447fb45e0354dc79f82d9c6b0e2..c38abf22b54d97390517ce5e0be77964c24f0da5 100755 (executable)
 
 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
 {
        if [[ -n "$child_pids" ]]; then
index 130c8f2f52ae19ca005838618087ace97ca2d260..c7e984f542aeca98116348399289f26cb5a92dda 100755 (executable)
@@ -46,6 +46,11 @@ TEST_FS=$TESTPOOL/async_destroy
 
 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
 {
        datasetexists $TEST_FS && log_must $ZFS destroy $TEST_FS
index 6677d11e4f751e172e0178068cb4777f2f392d51..2eff8cbe82020dbd412e0835220a00fb231ab58c 100755 (executable)
 
 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"
 
 #