[ $a -gt $b ]
compares integers.
in ladvise_willread_performance(), average_ladvise and lowest_speedup
are calculated to 2 decimals, so they probably aren't integers. So
this (nearly) always fails, but as the failure is not reported when a
VM is detected, the failure goes unnoticed.
The bash [[ ]] command can be used instead. Its '>' operator compares
floats.
Test-Parameters: trivial
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: Ifc674d5804b1269cebce82893a08eace9ffd9be4
Reviewed-on: https://review.whamcloud.com/40001
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
return 0
lowest_speedup=$(bc <<<"scale=2; $average_cache / 2")
- [ ${average_ladvise%.*} -gt $lowest_speedup ] ||
+ [[ ${average_ladvise%.*} > $lowest_speedup ]] ||
error_not_in_vm "Speedup with willread is less than " \
"$lowest_speedup%, got $average_ladvise%"
}