ZTS: Don't use edonr on FreeBSD

FreeBSD doesn't support feature@edonr.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Closes #9901
This commit is contained in:
Ryan Moeller 2020-01-28 11:38:02 -05:00 committed by Brian Behlendorf
parent 7a298ae975
commit 0ecd910923
5 changed files with 19 additions and 14 deletions

View File

@ -13,9 +13,14 @@
# Copyright (c) 2012, 2016, Delphix. All rights reserved. # Copyright (c) 2012, 2016, Delphix. All rights reserved.
# #
. $STF_SUITE/include/libtest.shlib
typeset -a compress_prop_vals=('off' 'lzjb' 'lz4' 'gzip' 'zle') typeset -a compress_prop_vals=('off' 'lzjb' 'lz4' 'gzip' 'zle')
typeset -a checksum_prop_vals=('on' 'off' 'fletcher2' 'fletcher4' 'sha256' typeset -a checksum_prop_vals=('on' 'off' 'fletcher2' 'fletcher4' 'sha256'
'noparity' 'sha512' 'skein' 'edonr') 'noparity' 'sha512' 'skein')
if ! is_freebsd; then
checksum_prop_vals+=('edonr')
fi
typeset -a recsize_prop_vals=('512' '1024' '2048' '4096' '8192' '16384' typeset -a recsize_prop_vals=('512' '1024' '2048' '4096' '8192' '16384'
'32768' '65536' '131072' '262144' '524288' '1048576') '32768' '65536' '131072' '262144' '524288' '1048576')
typeset -a canmount_prop_vals=('on' 'off' 'noauto') typeset -a canmount_prop_vals=('on' 'off' 'noauto')

View File

@ -28,4 +28,9 @@
# Copyright (c) 2013 by Delphix. All rights reserved. # Copyright (c) 2013 by Delphix. All rights reserved.
# #
set -A CHECKSUM_TYPES "fletcher2" "fletcher4" "sha256" "sha512" "skein" "edonr" . $STF_SUITE/include/libtest.shlib
set -A CHECKSUM_TYPES "fletcher2" "fletcher4" "sha256" "sha512" "skein"
if ! is_freebsd; then
CHECKSUM_TYPES+=("edonr")
fi

View File

@ -75,11 +75,6 @@ firstvdev=${array[0]}
typeset -i i=1 typeset -i i=1
while [[ $i -lt ${#CHECKSUM_TYPES[*]} ]]; do while [[ $i -lt ${#CHECKSUM_TYPES[*]} ]]; do
type=${CHECKSUM_TYPES[i]} type=${CHECKSUM_TYPES[i]}
# edonr not supported on FreeBSD
if is_freebsd && [[ "$type" == "edonr" ]] ; then
(( i = i + 1 ))
continue
fi
log_must zfs set checksum=$type $TESTPOOL log_must zfs set checksum=$type $TESTPOOL
log_must file_write -o overwrite -f $TESTDIR/test_$type \ log_must file_write -o overwrite -f $TESTDIR/test_$type \
-b $WRITESZ -c 5 -d R -b $WRITESZ -c 5 -d R
@ -101,11 +96,6 @@ log_assert "Test corrupting the files and seeing checksum errors"
typeset -i j=1 typeset -i j=1
while [[ $j -lt ${#CHECKSUM_TYPES[*]} ]]; do while [[ $j -lt ${#CHECKSUM_TYPES[*]} ]]; do
type=${CHECKSUM_TYPES[$j]} type=${CHECKSUM_TYPES[$j]}
# edonr not supported on FreeBSD
if is_freebsd && [[ "$type" == "edonr" ]] ; then
(( j = j + 1 ))
continue
fi
log_must zfs set checksum=$type $TESTPOOL log_must zfs set checksum=$type $TESTPOOL
log_must file_write -o overwrite -f $TESTDIR/test_$type \ log_must file_write -o overwrite -f $TESTDIR/test_$type \
-b $WRITESZ -c 5 -d R -b $WRITESZ -c 5 -d R

View File

@ -71,7 +71,6 @@ typeset -a properties=(
"feature@large_blocks" "feature@large_blocks"
"feature@sha512" "feature@sha512"
"feature@skein" "feature@skein"
"feature@edonr"
"feature@device_removal" "feature@device_removal"
"feature@obsolete_counts" "feature@obsolete_counts"
"feature@zpool_checkpoint" "feature@zpool_checkpoint"
@ -95,3 +94,9 @@ if is_linux || is_freebsd; then
"feature@livelist" "feature@livelist"
) )
fi fi
if ! is_freebsd; then
properties+=(
"feature@edonr"
)
fi

View File

@ -29,7 +29,7 @@ BLOCKSIZE=8192
origin="$TESTPOOL/$TESTFS" origin="$TESTPOOL/$TESTFS"
log_must zfs set compress=on $origin log_must zfs set compress=on $origin
log_must zfs set checksum=edonr $origin log_must zfs set checksum=skein $origin
log_must zfs set recordsize=8k $origin log_must zfs set recordsize=8k $origin
dd if=/dev/urandom of=$TESTDIR/file_8k bs=1024k count=$MEGS oflag=sync \ dd if=/dev/urandom of=$TESTDIR/file_8k bs=1024k count=$MEGS oflag=sync \