Commit 94132487 authored by Ido Schimmel's avatar Ido Schimmel Committed by David S. Miller

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: default avatarIdo Schimmel <idosch@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5f110899
...@@ -191,7 +191,7 @@ multipath_eval() ...@@ -191,7 +191,7 @@ multipath_eval()
diff=$(echo $weights_ratio - $packets_ratio | bc -l) diff=$(echo $weights_ratio - $packets_ratio | bc -l)
diff=${diff#-} 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" check_err $? "Too large discrepancy between expected and measured ratios"
log_test "$desc" log_test "$desc"
log_info "Expected ratio $weights_ratio Measured ratio $packets_ratio" log_info "Expected ratio $weights_ratio Measured ratio $packets_ratio"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment