From 0823d8417295ab9b347211e2afadc364bb0e860e Mon Sep 17 00:00:00 2001 From: Ornias1993 Date: Tue, 26 Nov 2019 15:17:47 +0100 Subject: [PATCH] Removed duplicate and random algorithms from tests - Random tests (send-c_verify_ratio) lead to inpredicatble results - Duplicate algorithms lead to duplicate execution of tests - Combined the effects are even worse and lead to false positives Signed-off-by: Kjeld Schouten-Lebbing --- tests/zfs-tests/include/properties.shlib | 5 ++--- tests/zfs-tests/tests/functional/rsend/rsend_012_pos.ksh | 4 +--- .../zfs-tests/tests/functional/rsend/send-c_verify_ratio.ksh | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/tests/zfs-tests/include/properties.shlib b/tests/zfs-tests/include/properties.shlib index 25a9846ddd93..0bc772d08201 100644 --- a/tests/zfs-tests/include/properties.shlib +++ b/tests/zfs-tests/include/properties.shlib @@ -13,8 +13,7 @@ # Copyright (c) 2012, 2016 by Delphix. All rights reserved. # -typeset -a compress_prop_vals=('on' 'off' 'lzjb' 'gzip' 'gzip-1' 'gzip-2' - 'gzip-3' 'gzip-4' 'gzip-5' 'gzip-6' 'gzip-7' 'gzip-8' 'gzip-9' 'zle' 'lz4') +typeset -a compress_prop_vals=('off' 'lzjb' 'gzip' 'zle' 'lz4') typeset -a checksum_prop_vals=('on' 'off' 'fletcher2' 'fletcher4' 'sha256' 'noparity' 'sha512' 'skein' 'edonr') typeset -a recsize_prop_vals=('512' '1024' '2048' '4096' '8192' '16384' @@ -60,7 +59,7 @@ function get_rand_prop function get_rand_compress { - get_rand_prop compress_prop_vals $1 2 + get_rand_prop compress_prop_vals $1 1 } function get_rand_compress_any diff --git a/tests/zfs-tests/tests/functional/rsend/rsend_012_pos.ksh b/tests/zfs-tests/tests/functional/rsend/rsend_012_pos.ksh index d85970a74217..d6adb1863619 100755 --- a/tests/zfs-tests/tests/functional/rsend/rsend_012_pos.ksh +++ b/tests/zfs-tests/tests/functional/rsend/rsend_012_pos.ksh @@ -138,9 +138,7 @@ done for vol in "$POOL/vol" "$POOL/$FS/vol" ; do rand_set_prop $vol checksum "on" "off" "fletcher2" "fletcher4" "sha256" - rand_set_prop $vol compression "on" "off" "lzjb" "gzip" \ - "gzip-1" "gzip-2" "gzip-3" "gzip-4" "gzip-5" "gzip-6" \ - "gzip-7" "gzip-8" "gzip-9" + rand_set_prop $vol compression "off" "lzjb" "gzip" "lz4" rand_set_prop $vol readonly "on" "off" rand_set_prop $vol copies "1" "2" "3" rand_set_prop $vol user:prop "aaa" "bbb" "23421" "()-+?" diff --git a/tests/zfs-tests/tests/functional/rsend/send-c_verify_ratio.ksh b/tests/zfs-tests/tests/functional/rsend/send-c_verify_ratio.ksh index 9b886f81572c..dbb8b9d5a28d 100755 --- a/tests/zfs-tests/tests/functional/rsend/send-c_verify_ratio.ksh +++ b/tests/zfs-tests/tests/functional/rsend/send-c_verify_ratio.ksh @@ -37,7 +37,7 @@ log_onexit cleanup_pool $POOL2 typeset sendfs=$POOL2/$FS typeset megs=128 -for prop in $(get_rand_compress_any 6); do +for prop in 'off' 'lzjb' 'gzip' 'zle' 'lz4'; do for compressible in 'yes' 'no'; do log_must zfs create -o compress=$prop $sendfs