Whamcloud - gitweb
LU-8565 test: change sanity 255a to not fail for performance when running in VM 75/22375/3
authorGu Zheng <gzheng@ddn.com>
Thu, 8 Sep 2016 02:57:25 +0000 (10:57 +0800)
committerAndreas Dilger <andreas.dilger@intel.com>
Thu, 8 Sep 2016 07:49:15 +0000 (07:49 +0000)
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>
lustre/tests/sanity.sh

index 34a1df4..b6cd7ec 100755 (executable)
@@ -14098,6 +14098,15 @@ ladvise_willread_performance()
        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
@@ -14147,8 +14156,8 @@ ladvise_willread_performance()
 
        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%"
 }