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:
Pawel Jakub Dawidek
2023-12-26 12:01:53 -08:00
committed by Brian Behlendorf
parent f94a77951d
commit c16d103422
32 changed files with 1767 additions and 73 deletions
+2 -1
View File
@@ -98,7 +98,8 @@ export SYSTEM_FILES_COMMON='awk
uname
uniq
vmstat
wc'
wc
xargs'
export SYSTEM_FILES_FREEBSD='chflags
compress
+12 -1
View File
@@ -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
}