done
done
+ # the number of "bad" hashes is random, as it depends on the random
+ # filenames generated by "mktemp". Allow some margin in the results.
echo "$((same/${#patterns[*]}))/$count matches, expect ~$expect for $1"
- (( same / ${#patterns[*]} < expect * 5 / 4 &&
- same / ${#patterns[*]} > expect * 4 / 5 )) ||
+ (( same / ${#patterns[*]} <= expect * 9 / 7 &&
+ same / ${#patterns[*]} > expect * 5 / 7 )) ||
error "MDT index match $((same / ${#patterns[*]}))/$count times"
same=0
done
done
+ # the number of "bad" hashes is random, as it depends on the random
+ # filenames generated by "mktemp". Allow some margin in the results.
echo "$((same/${#patterns[*]}))/$count matches, expect ~$expect for $1"
- (( same / ${#patterns[*]} < expect * 5 / 4 &&
- same / ${#patterns[*]} > expect * 4 / 5 )) ||
+ (( same / ${#patterns[*]} <= expect * 9 / 7 &&
+ same / ${#patterns[*]} > expect * 5 / 7 )) ||
error "MDT index match $((same / ${#patterns[*]}))/$count times"
}