From d279c8c12f136ab15b5fefd496c296ef1585c628 Mon Sep 17 00:00:00 2001 From: Yaroslav Brustinov Date: Mon, 23 May 2016 15:30:21 +0300 Subject: replace t-rex to TRex regression: instead of checking map and reconnecting for eact STL test, do in only for those with disconnect (+revert of commit 0f8e6065f467703b1461e87c3912f8d4bd616807) --- .../regression/stateful_tests/trex_general_test.py | 22 +++++++++++----------- .../regression/stateful_tests/trex_imix_test.py | 2 +- .../regression/stateful_tests/trex_ipv6_test.py | 2 +- .../regression/stateful_tests/trex_nat_test.py | 4 ++-- .../regression/stateful_tests/trex_nbar_test.py | 2 +- .../regression/stateful_tests/trex_rx_test.py | 2 +- 6 files changed, 17 insertions(+), 17 deletions(-) (limited to 'scripts/automation/regression/stateful_tests') diff --git a/scripts/automation/regression/stateful_tests/trex_general_test.py b/scripts/automation/regression/stateful_tests/trex_general_test.py index d2aaefa9..86fe93e7 100755 --- a/scripts/automation/regression/stateful_tests/trex_general_test.py +++ b/scripts/automation/regression/stateful_tests/trex_general_test.py @@ -9,8 +9,8 @@ Name: Description: - This script creates the functionality to test the performance of the T-Rex traffic generator - The tested scenario is a T-Rex TG directly connected to a Cisco router. + This script creates the functionality to test the performance of the TRex traffic generator + The tested scenario is a TRex TG directly connected to a Cisco router. :: @@ -18,7 +18,7 @@ Description: ------- -------- | | Tx---1gig/10gig----Rx | | - | T-Rex | | router | + | TRex | | router | | | Rx---1gig/10gig----Tx | | ------- -------- @@ -46,7 +46,7 @@ def tearDownModule(module): pass class CTRexGeneral_Test(unittest.TestCase): - """This class defines the general stateful testcase of the T-Rex traffic generator""" + """This class defines the general stateful testcase of the TRex traffic generator""" def __init__ (self, *args, **kwargs): sys.stdout.flush() unittest.TestCase.__init__(self, *args, **kwargs) @@ -102,7 +102,7 @@ class CTRexGeneral_Test(unittest.TestCase): print(termstyle.green('\t!!!\tRunning with modes: %s, not suitable tests will be skipped.\t!!!' % list(self.modes))) CTRexScenario.is_init = True - print(termstyle.green("Done instantiating T-Rex scenario!\n")) + print(termstyle.green("Done instantiating TRex scenario!\n")) # raise RuntimeError('CTRexScenario class is not initialized!') self.router = CTRexScenario.router @@ -205,17 +205,17 @@ class CTRexGeneral_Test(unittest.TestCase): try: # check if test is valid if not trex_res.is_done_warmup(): - self.fail('T-Rex did not reach warm-up situtaion. Results are not valid.') + self.fail('TRex did not reach warm-up situtaion. Results are not valid.') # check history size is enough if len(trex_res._history) < 5: - self.fail('T-Rex results list is too short. Increase the test duration or check unexpected stopping.') + self.fail('TRex results list is too short. Increase the test duration or check unexpected stopping.') - # check T-Rex number of drops + # check TRex number of drops trex_tx_pckt = trex_res.get_last_value("trex-global.data.m_total_tx_pkts") trex_drops = trex_res.get_total_drops() trex_drop_rate = trex_res.get_drop_rate() - if ( trex_drops > 0.001 * trex_tx_pckt) and (trex_drop_rate > 0.0): # deliberately mask kickoff drops when T-Rex first initiated + if ( trex_drops > 0.001 * trex_tx_pckt) and (trex_drop_rate > 0.0): # deliberately mask kickoff drops when TRex first initiated self.fail('Number of packet drops larger than 0.1% of all traffic') # check queue full, queue drop, allocation error @@ -231,7 +231,7 @@ class CTRexGeneral_Test(unittest.TestCase): allowed_queue_full = 1000 + trex_tx_pckt / 1000 self.assert_gt(allowed_queue_full, m_total_queue_full, 'Too much queue_full (%s), please review multiplier.' % m_total_queue_full) - # # check T-Rex expected counters + # # check TRex expected counters #trex_exp_rate = trex_res.get_expected_tx_rate().get('m_tx_expected_bps') #assert trex_exp_rate is not None #trex_exp_gbps = trex_exp_rate/(10**9) @@ -271,7 +271,7 @@ class CTRexGeneral_Test(unittest.TestCase): #assert False # except AssertionError as e: - # e.args += ('T-Rex has crashed!') + # e.args += ('TRex has crashed!') # raise @staticmethod diff --git a/scripts/automation/regression/stateful_tests/trex_imix_test.py b/scripts/automation/regression/stateful_tests/trex_imix_test.py index cafa1c55..f8fe0ed1 100755 --- a/scripts/automation/regression/stateful_tests/trex_imix_test.py +++ b/scripts/automation/regression/stateful_tests/trex_imix_test.py @@ -7,7 +7,7 @@ import time from nose.tools import nottest class CTRexIMIX_Test(CTRexGeneral_Test): - """This class defines the IMIX testcase of the T-Rex traffic generator""" + """This class defines the IMIX testcase of the TRex traffic generator""" def __init__(self, *args, **kwargs): # super(CTRexIMIX_Test, self).__init__() CTRexGeneral_Test.__init__(self, *args, **kwargs) diff --git a/scripts/automation/regression/stateful_tests/trex_ipv6_test.py b/scripts/automation/regression/stateful_tests/trex_ipv6_test.py index 6aba9ae0..b03de0b4 100755 --- a/scripts/automation/regression/stateful_tests/trex_ipv6_test.py +++ b/scripts/automation/regression/stateful_tests/trex_ipv6_test.py @@ -5,7 +5,7 @@ import time from nose.tools import assert_equal class CTRexIPv6_Test(CTRexGeneral_Test): - """This class defines the IPv6 testcase of the T-Rex traffic generator""" + """This class defines the IPv6 testcase of the TRex traffic generator""" def __init__(self, *args, **kwargs): super(CTRexIPv6_Test, self).__init__(*args, **kwargs) diff --git a/scripts/automation/regression/stateful_tests/trex_nat_test.py b/scripts/automation/regression/stateful_tests/trex_nat_test.py index b2df684d..6e030ffe 100755 --- a/scripts/automation/regression/stateful_tests/trex_nat_test.py +++ b/scripts/automation/regression/stateful_tests/trex_nat_test.py @@ -7,7 +7,7 @@ from nose.tools import assert_equal class CTRexNoNat_Test(CTRexGeneral_Test):#(unittest.TestCase): - """This class defines the NAT testcase of the T-Rex traffic generator""" + """This class defines the NAT testcase of the TRex traffic generator""" def __init__(self, *args, **kwargs): super(CTRexNoNat_Test, self).__init__(*args, **kwargs) self.unsupported_modes = ['loopback'] # NAT requires device @@ -73,7 +73,7 @@ class CTRexNoNat_Test(CTRexGeneral_Test):#(unittest.TestCase): class CTRexNat_Test(CTRexGeneral_Test):#(unittest.TestCase): - """This class defines the NAT testcase of the T-Rex traffic generator""" + """This class defines the NAT testcase of the TRex traffic generator""" def __init__(self, *args, **kwargs): super(CTRexNat_Test, self).__init__(*args, **kwargs) self.unsupported_modes = ['loopback'] # NAT requires device diff --git a/scripts/automation/regression/stateful_tests/trex_nbar_test.py b/scripts/automation/regression/stateful_tests/trex_nbar_test.py index fa3f3485..6611ac96 100755 --- a/scripts/automation/regression/stateful_tests/trex_nbar_test.py +++ b/scripts/automation/regression/stateful_tests/trex_nbar_test.py @@ -6,7 +6,7 @@ from nose.tools import nottest from misc_methods import print_r class CTRexNbar_Test(CTRexGeneral_Test): - """This class defines the NBAR testcase of the T-Rex traffic generator""" + """This class defines the NBAR testcase of the TRex traffic generator""" def __init__(self, *args, **kwargs): super(CTRexNbar_Test, self).__init__(*args, **kwargs) self.unsupported_modes = ['loopback'] # obviously no NBar in loopback diff --git a/scripts/automation/regression/stateful_tests/trex_rx_test.py b/scripts/automation/regression/stateful_tests/trex_rx_test.py index c097b180..40528d16 100755 --- a/scripts/automation/regression/stateful_tests/trex_rx_test.py +++ b/scripts/automation/regression/stateful_tests/trex_rx_test.py @@ -9,7 +9,7 @@ from nose.tools import nottest import traceback class CTRexRx_Test(CTRexGeneral_Test): - """This class defines the rx testcase of the T-Rex traffic generator""" + """This class defines the rx testcase of the TRex traffic generator""" def __init__(self, *args, **kwargs): CTRexGeneral_Test.__init__(self, *args, **kwargs) self.unsupported_modes = ['virt_nics'] # TODO: fix -- cgit 1.2.3-korg