From 04300e5690aff199563cf69db39639d7cca32ce6 Mon Sep 17 00:00:00 2001 From: Yaroslav Brustinov Date: Wed, 26 Oct 2016 17:15:53 +0200 Subject: typo --- scripts/automation/regression/stateful_tests/trex_rx_test.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'scripts/automation/regression') diff --git a/scripts/automation/regression/stateful_tests/trex_rx_test.py b/scripts/automation/regression/stateful_tests/trex_rx_test.py index 8bcdc83f..6c6c535a 100755 --- a/scripts/automation/regression/stateful_tests/trex_rx_test.py +++ b/scripts/automation/regression/stateful_tests/trex_rx_test.py @@ -67,13 +67,16 @@ class CTRexRx_Test(CTRexGeneral_Test): # the check. in loopback expect 0 problems, at others allow errors % of total_rx total_errors = sum(rx_counters.values()) + sum(latency_counters_compare.values()) - error_tolerance = self.get_benchmark_param('error_tolerance', 0.1) - if not error_tolerance or not allow_error_tolerance: - error_tolerance = 0 + error_tolerance = self.get_benchmark_param('error_tolerance') + if not error_tolerance: + if not allow_error_tolerance: + error_tolerance = 0 + else: + error_tolerance = 0.1 error_percentage = total_errors * 100.0 / total_rx if total_errors > 0: - if self.is_loopback or error_percentage > error_tolerance: + if error_percentage > error_tolerance: self.fail('Too much errors in rx_check. (~%s%% of traffic)' % error_percentage) else: print('There are errors in rx_check (%f%%), not exceeding allowed limit (%s%%)' % (error_percentage, error_tolerance)) -- cgit 1.2.3-korg