summaryrefslogtreecommitdiffstats
path: root/scripts/automation/regression/unit_tests
diff options
context:
space:
mode:
authorYaroslav Brustinov <ybrustin@cisco.com>2016-01-10 17:24:17 +0200
committerYaroslav Brustinov <ybrustin@cisco.com>2016-01-10 17:24:17 +0200
commitf1c78acf1648abd6c06a070ef4e6465e5478eab8 (patch)
treebf9c218903b1082e39e95037ca1274b5465cd13a /scripts/automation/regression/unit_tests
parent1d074bf3b198c1f160f6e636c21c16c9c833ce61 (diff)
add alloc_error, queue_full, queue_drop stats report via ZMQ
regression: update kiwi02 and trex08 benchmarks add common "scripts_dir" variable for usage in tests configure router with proper MTU in jumbo test add --local flag for not connecting to remote server (useful for functional tests)
Diffstat (limited to 'scripts/automation/regression/unit_tests')
-rwxr-xr-xscripts/automation/regression/unit_tests/trex_general_test.py11
-rwxr-xr-xscripts/automation/regression/unit_tests/trex_imix_test.py3
2 files changed, 11 insertions, 3 deletions
diff --git a/scripts/automation/regression/unit_tests/trex_general_test.py b/scripts/automation/regression/unit_tests/trex_general_test.py
index 92ece30f..efe24711 100755
--- a/scripts/automation/regression/unit_tests/trex_general_test.py
+++ b/scripts/automation/regression/unit_tests/trex_general_test.py
@@ -55,6 +55,7 @@ class CTRexScenario():
trex_version = None
report_dir = 'reports'
# logger = None
+ scripts_dir = None
#scenario = CTRexScenario()
@@ -150,7 +151,7 @@ class CTRexGeneral_Test(unittest.TestCase):
def assert_gt(self, v1, v2, s):
if not v1 > v2:
- error='ERROR {big} > {small} {str}'.format(big = v1, small = v2, str = s)
+ error='ERROR {big} < {small} {str}'.format(big = v1, small = v2, str = s)
self.fail(error)
def check_results_eq (self,res,name,val):
@@ -232,6 +233,14 @@ class CTRexGeneral_Test(unittest.TestCase):
if ( (trex_drops/trex_tx_pckt) > 0.001) and (trex_drop_rate > 0.0): # deliberately mask kickoff drops when T-Rex first initiated
self.fail('Number of packet drops larger than 0.1% of all traffic')
+ # check queue full, queue drop, allocation error
+ m_total_alloc_error = trex_res.get_last_value("trex-global.data.m_total_alloc_error")
+ m_total_queue_full = trex_res.get_last_value("trex-global.data.m_total_queue_full")
+ m_total_queue_drop = trex_res.get_last_value("trex-global.data.m_total_queue_drop")
+ self.assert_gt( 999, m_total_alloc_error, 'Got allocation errors. (%s), please review multiplier and templates configuration.' % m_total_alloc_error)
+ self.assert_gt( max(9999, trex_tx_pckt / 1000 ), m_total_queue_full, 'Too much queue_full (%s), please review multiplier.' % m_total_queue_full)
+ self.assert_gt( 999, m_total_queue_drop, 'Too much queue_drop (%s), please review multiplier.' % m_total_queue_drop)
+
# # check T-Rex expected counters
#trex_exp_rate = trex_res.get_expected_tx_rate().get('m_tx_expected_bps')
#assert trex_exp_rate is not None
diff --git a/scripts/automation/regression/unit_tests/trex_imix_test.py b/scripts/automation/regression/unit_tests/trex_imix_test.py
index f5ebeb30..770edbb9 100755
--- a/scripts/automation/regression/unit_tests/trex_imix_test.py
+++ b/scripts/automation/regression/unit_tests/trex_imix_test.py
@@ -169,8 +169,7 @@ class CTRexIMIX_Test(CTRexGeneral_Test):
def test_jumbo(self):
if not self.is_loopback:
- self.skip('Verify drops in router') # TODO: verify and remove ASAP
- self.router.configure_basic_interfaces()
+ self.router.configure_basic_interfaces(mtu = 9216)
self.router.config_pbr(mode = "config")
mult = self.get_benchmark_param('multiplier')