diff options
Diffstat (limited to 'scripts/automation/regression/stateful_tests/trex_imix_test.py')
-rwxr-xr-x | scripts/automation/regression/stateful_tests/trex_imix_test.py | 95 |
1 files changed, 94 insertions, 1 deletions
diff --git a/scripts/automation/regression/stateful_tests/trex_imix_test.py b/scripts/automation/regression/stateful_tests/trex_imix_test.py index f8fe0ed1..5f52fab7 100755 --- a/scripts/automation/regression/stateful_tests/trex_imix_test.py +++ b/scripts/automation/regression/stateful_tests/trex_imix_test.py @@ -18,6 +18,99 @@ class CTRexIMIX_Test(CTRexGeneral_Test): # self.router.clear_counters() pass + def test_short_flow(self): + """ short UDP flow with 64B packets, this test with small number of active flows """ + # test initializtion + if not self.is_loopback: + self.router.configure_basic_interfaces() + self.router.config_pbr(mode = "config") + + mult = self.get_benchmark_param('multiplier') + core = self.get_benchmark_param('cores') + + ret = self.trex.start_trex( + c = core, + m = mult, + p = True, + nc = True, + d = 30, + f = 'cap2/cur_flow.yaml', + l = 1000) + + trex_res = self.trex.sample_to_run_finish() + + # trex_res is a CTRexResult instance- and contains the summary of the test results + # you may see all the results keys by simply calling here for 'print trex_res.result' + print("\nLATEST RESULT OBJECT:") + print(trex_res) + + self.check_general_scenario_results(trex_res) + self.check_CPU_benchmark(trex_res) + + def test_short_flow_high_active(self): + """ short UDP flow with 64B packets, this test with 8M active flows """ + # test initializtion + if not self.is_loopback: + self.router.configure_basic_interfaces() + self.router.config_pbr(mode = "config") + + mult = self.get_benchmark_param('multiplier') + core = self.get_benchmark_param('cores') + active_flows =self.get_benchmark_param('active_flows') + + + ret = self.trex.start_trex( + c = core, + m = mult, + p = True, + nc = True, + d = 60, + active_flows = active_flows, + f = 'cap2/cur_flow.yaml', + l = 1000) + + trex_res = self.trex.sample_to_run_finish() + + # trex_res is a CTRexResult instance- and contains the summary of the test results + # you may see all the results keys by simply calling here for 'print trex_res.result' + print("\nLATEST RESULT OBJECT:") + print(trex_res) + + self.check_general_scenario_results(trex_res) + self.check_CPU_benchmark(trex_res) + + def test_short_flow_high_active2(self): + """ short UDP flow with 64B packets, this test with 8M active flows """ + # test initializtion + if not self.is_loopback: + self.router.configure_basic_interfaces() + self.router.config_pbr(mode = "config") + + mult = self.get_benchmark_param('multiplier') + core = self.get_benchmark_param('cores') + active_flows =self.get_benchmark_param('active_flows') + + + ret = self.trex.start_trex( + c = core, + m = mult, + p = True, + nc = True, + d = 60, + active_flows = active_flows, + f = 'cap2/cur_flow_single.yaml', + l = 1000) + + trex_res = self.trex.sample_to_run_finish() + + # trex_res is a CTRexResult instance- and contains the summary of the test results + # you may see all the results keys by simply calling here for 'print trex_res.result' + print("\nLATEST RESULT OBJECT:") + print(trex_res) + + self.check_general_scenario_results(trex_res) + self.check_CPU_benchmark(trex_res) + def test_routing_imix_64(self): # test initializtion if not self.is_loopback: @@ -112,7 +205,7 @@ class CTRexIMIX_Test(CTRexGeneral_Test): ret = self.trex.start_trex( c = core, m = mult, - p = True, + e = True, nc = True, d = 60, f = 'cap2/imix_fast_1g.yaml', |