mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-23 02:44:41 +03:00
Block cloning tests.
The test mostly focus on testing various corner cases. The tests take a long time to run, so for the common.run runfile we randomly select a hundred tests. To run all the bclone tests, bclone.run runfile should be used. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Pawel Jakub Dawidek <pawel@dawidek.net> Closes #15631
This commit is contained in:
committed by
Brian Behlendorf
parent
f94a77951d
commit
c16d103422
@@ -98,7 +98,8 @@ export SYSTEM_FILES_COMMON='awk
|
||||
uname
|
||||
uniq
|
||||
vmstat
|
||||
wc'
|
||||
wc
|
||||
xargs'
|
||||
|
||||
export SYSTEM_FILES_FREEBSD='chflags
|
||||
compress
|
||||
|
||||
@@ -123,10 +123,21 @@ function verify_ne # <a> <b> <type>
|
||||
#
|
||||
# $1 lower bound
|
||||
# $2 upper bound
|
||||
# [$3 how many]
|
||||
function random_int_between
|
||||
{
|
||||
typeset -i min=$1
|
||||
typeset -i max=$2
|
||||
typeset -i count
|
||||
typeset -i i
|
||||
|
||||
echo $(( (RANDOM % (max - min + 1)) + min ))
|
||||
if [[ -z "$3" ]]; then
|
||||
count=1
|
||||
else
|
||||
count=$3
|
||||
fi
|
||||
|
||||
for (( i = 0; i < $count; i++ )); do
|
||||
echo $(( (RANDOM % (max - min + 1)) + min ))
|
||||
done
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user