Considering we may run our testing in VMs with other parallel workloads,
and also out VMs are short on memory. Therefore the complete time of I/O
task is unreliable and depends on the workload on the host machine when
the task is running.
So as Andreas suggested, here we change sanity 255a to not fail even if
the performance isn't as expected when running in a VM, like we did to
sanity 248.
Test-Parameters: trivial
Change-Id: If2a76c64f053dc6c7dc8acf4afd5a68ea3a757b6
Signed-off-by: Gu Zheng <gzheng@ddn.com>
Reviewed-on: http://review.whamcloud.com/22375
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
local repeat=10
local average_cache=0
local average_ladvise=0
local repeat=10
local average_cache=0
local average_ladvise=0
+ local my_error=error
+
+ # This test case is time sensitive and Maloo uses KVM to run autotest.
+ # Therefore the complete time of I/O task is unreliable and depends on
+ # the workload on the host machine when the task is running.
+ local virt=$(running_in_vm)
+ [ -n "$virt" ] && echo "running in VM '$virt', ignore error" &&
+ my_error="error_ignore env=$virt"
+
for ((i = 1; i <= $repeat; i++)); do
echo "Iter $i/$repeat: reading without willread hint"
cancel_lru_locks osc
for ((i = 1; i <= $repeat; i++)); do
echo "Iter $i/$repeat: reading without willread hint"
cancel_lru_locks osc
local lowest_speedup=$((average_cache / 2))
[ $average_ladvise -gt $lowest_speedup ] ||
local lowest_speedup=$((average_cache / 2))
[ $average_ladvise -gt $lowest_speedup ] ||
- error "Speedup with willread is less than $lowest_speedup%,"\
- "got $average_ladvise%"
+ $my_error "Speedup with willread is less than "\
+ "$lowest_speedup%, got $average_ladvise%"
echo "Speedup with willread ladvise: $average_ladvise%"
echo "Speedup with cache: $average_cache%"
}
echo "Speedup with willread ladvise: $average_ladvise%"
echo "Speedup with cache: $average_cache%"
}