From: Ido Schimmel Date: Thu, 3 May 2018 07:51:32 +0000 (+0300) Subject: selftests: forwarding: Increase maximum deviation in multipath test X-Git-Tag: v4.18-rc1~114^2~318^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9413248753c4c5eba5a9e2548e7d98c73230763d;p=thirdparty%2Fkernel%2Flinux.git selftests: forwarding: Increase maximum deviation in multipath test We sometimes observe failures in the test due to too large discrepancy between the measured and expected ratios. For example: TEST: ECMP [FAIL] Too large discrepancy between expected and measured ratios INFO: Expected ratio 1.00 Measured ratio 1.11 Fix this by allowing an up to 15% deviation between both ratios. Another possibility is to increase the number of generated flows, but this will prolong the execution time of the test, which is already quite high. Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller --- diff --git a/tools/testing/selftests/net/forwarding/router_multipath.sh b/tools/testing/selftests/net/forwarding/router_multipath.sh index 3bc351008db63..2bd3d41354d09 100755 --- a/tools/testing/selftests/net/forwarding/router_multipath.sh +++ b/tools/testing/selftests/net/forwarding/router_multipath.sh @@ -191,7 +191,7 @@ multipath_eval() diff=$(echo $weights_ratio - $packets_ratio | bc -l) diff=${diff#-} - test "$(echo "$diff / $weights_ratio > 0.1" | bc -l)" -eq 0 + test "$(echo "$diff / $weights_ratio > 0.15" | bc -l)" -eq 0 check_err $? "Too large discrepancy between expected and measured ratios" log_test "$desc" log_info "Expected ratio $weights_ratio Measured ratio $packets_ratio"