Skip to content
Permalink
Browse files

Add zstd to tests

FIXME

 - adds zstd to history_002_pos.ksh
 - adds random levels of zstd to history_002_pos.ksh
 - adds zstd-fast to history_002_pos.ksh
 - adds random levels of zstd-fast to history_002_pos.ksh
 - ...

Signed-off-by: Allan Jude <allanjude@freebsd.org>
Signed-off-by: Sebastian Gottschall <s.gottschall@dd-wrt.com>
Signed-off-by: Kjeld Schouten-Lebbing <kjeld@schouten-lebbing.nl>
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
  • Loading branch information...
c0d3z3r0 committed Dec 1, 2019
1 parent d1ad340 commit b6a031903be732e54a223836b5b28b4f3ed834a3
@@ -2541,9 +2541,9 @@ function get_compress_opts
gzip-6 gzip-7 gzip-8 gzip-9"

if [[ $1 == "zfs_compress" ]] ; then
COMPRESS_OPTS="on lzjb"
COMPRESS_OPTS="on lzjb zstd"
elif [[ $1 == "zfs_set" ]] ; then
COMPRESS_OPTS="on off lzjb"
COMPRESS_OPTS="on off lzjb zstd"
fi
typeset valid_opts="$COMPRESS_OPTS"
zfs get 2>&1 | grep gzip >/dev/null 2>&1
@@ -14,7 +14,8 @@
#

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')
'gzip-3' 'gzip-4' 'gzip-5' 'gzip-6' 'gzip-7' 'gzip-8' 'gzip-9' 'zle'
'lz4' 'zstd')
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'
@@ -94,5 +94,6 @@ if is_linux; then
"feature@resilver_defer"
"feature@bookmark_v2"
"feature@livelist"
"feature@zstd_compress"
)
fi
@@ -86,7 +86,9 @@ props=(
canmount off canmount on
xattr on xattr off
compression gzip compression gzip-$((RANDOM%9 + 1))
copies $((RANDOM%3 + 1))
compression zstd compression zstd-$((RANDOM%9 + 1))
compression zstd-fast copies $((RANDOM%3 + 1))
compression zstd-fast-$((RANDOM%9 + 1))
)
else
# property value property value
@@ -123,7 +123,7 @@ for fs in "$POOL" "$POOL/pclone" "$POOL/$FS" "$POOL/$FS/fs1" \
rand_set_prop $fs checksum "on" "off" "fletcher2" "fletcher4" "sha256"
rand_set_prop $fs compression "on" "off" "lzjb" "gzip" \
"gzip-1" "gzip-2" "gzip-3" "gzip-4" "gzip-5" "gzip-6" \
"gzip-7" "gzip-8" "gzip-9"
"gzip-7" "gzip-8" "gzip-9" "zstd"
rand_set_prop $fs copies "1" "2" "3"
rand_set_prop $fs devices "on" "off"
rand_set_prop $fs exec "on" "off"
@@ -140,7 +140,7 @@ 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"
"gzip-7" "gzip-8" "gzip-9" "zstd"
rand_set_prop $vol readonly "on" "off"
rand_set_prop $vol copies "1" "2" "3"
rand_set_prop $vol user:prop "aaa" "bbb" "23421" "()-+?"
@@ -34,7 +34,7 @@ verify_runnable "both"

log_assert "Verify compressed streams are rejected if incompatible."

typeset compress_types="off gzip lz4"
typeset compress_types="off gzip lz4 zstd"
typeset send_ds=$POOL2/testds
typeset recv_ds=$POOL3/testds

@@ -28,7 +28,7 @@
#

verify_runnable "both"
typeset compress_types="off gzip lz4"
typeset compress_types="off gzip lz4 zstd"
typeset send_ds="$POOL2/testfs"
typeset send_vol="$POOL2/vol"
typeset send_voldev="$ZVOL_DEVDIR/$POOL2/vol"
@@ -78,7 +78,7 @@ for i in {1..$passes}; do
# Randomly modify several dataset properties in order to generate
# more interesting incremental send streams.
rand_set_prop $POOL/fs checksum "off" "fletcher4" "sha256"
rand_set_prop $POOL/fs compression "off" "lzjb" "gzip" "lz4"
rand_set_prop $POOL/fs compression "off" "lzjb" "gzip" "lz4" "zstd"
rand_set_prop $POOL/fs recordsize "32K" "128K"
rand_set_prop $POOL/fs dnodesize "legacy" "auto" "4k"
rand_set_prop $POOL/fs xattr "on" "sa"
@@ -71,7 +71,7 @@ for i in {1..$passes}; do
# Randomly modify several dataset properties in order to generate
# more interesting incremental send streams.
rand_set_prop $POOL/fs checksum "off" "fletcher4" "sha256"
rand_set_prop $POOL/fs compression "off" "lzjb" "gzip" "lz4"
rand_set_prop $POOL/fs compression "off" "lzjb" "gzip" "lz4" "zstd"
rand_set_prop $POOL/fs recordsize "32K" "128K"
rand_set_prop $POOL/fs dnodesize "legacy" "auto" "4k"
rand_set_prop $POOL/fs xattr "on" "sa"

0 comments on commit b6a0319

Please sign in to comment.
You can’t perform that action at this time.