Fix a bug in the -s test script that failed to detect failures.
This commit is contained in:
parent
e4b6cd9bcd
commit
f728c13edf
@ -15,14 +15,17 @@
|
|||||||
|
|
||||||
start_test "zzuf -s test"
|
start_test "zzuf -s test"
|
||||||
|
|
||||||
for ratio in 1 0.1 0.01 0.001 0.0001; do
|
t=0
|
||||||
if test $ratio = 0.0001; then
|
while : ; do
|
||||||
bytes=1024
|
case $t in
|
||||||
elif test $ratio = 0.001; then
|
0) ratio=1; bytes=32768 ;;
|
||||||
bytes=8192
|
1) ratio=0.1; bytes=32768 ;;
|
||||||
else
|
2) ratio=0.01; bytes=32768 ;;
|
||||||
bytes=32768
|
3) ratio=0.001; bytes=8192 ;;
|
||||||
fi
|
4) ratio=0.0001; bytes=1024 ;;
|
||||||
|
*) break ;;
|
||||||
|
esac
|
||||||
|
t=$(expr $t + 1)
|
||||||
new_test "$bytes B of zeroes, ratio $ratio"
|
new_test "$bytes B of zeroes, ratio $ratio"
|
||||||
zeroes=$(expr $bytes '*' 4)
|
zeroes=$(expr $bytes '*' 4)
|
||||||
passes=10
|
passes=10
|
||||||
@ -32,7 +35,7 @@ for ratio in 1 0.1 0.01 0.001 0.0001; do
|
|||||||
echo " $zeroes"
|
echo " $zeroes"
|
||||||
passes=$(expr '(' $passes '*' 7 + 3 ')' / 4)
|
passes=$(expr '(' $passes '*' 7 + 3 ')' / 4)
|
||||||
done
|
done
|
||||||
if test $passes -lt 2000000; then
|
if test $passes -lt 200000; then
|
||||||
pass_test " ok"
|
pass_test " ok"
|
||||||
else
|
else
|
||||||
pass_test " FAILED"
|
pass_test " FAILED"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user