diff options
-rw-r--r-- | scripts/automation/regression/functional_tests/stl_basic_tests.py | 11 | ||||
-rw-r--r-- | scripts/stl/tests/many_streams.py | 50 | ||||
-rw-r--r-- | scripts/stl/tests/multi_burst.py | 17 | ||||
-rw-r--r-- | scripts/stl/tests/single_burst.py | 17 | ||||
-rw-r--r-- | scripts/stl/tests/single_cont.py | 17 |
5 files changed, 112 insertions, 0 deletions
diff --git a/scripts/automation/regression/functional_tests/stl_basic_tests.py b/scripts/automation/regression/functional_tests/stl_basic_tests.py index 2bf97307..8b8f2097 100644 --- a/scripts/automation/regression/functional_tests/stl_basic_tests.py +++ b/scripts/automation/regression/functional_tests/stl_basic_tests.py @@ -262,3 +262,14 @@ class CStlBasic_Test(functional_general_test.CGeneralFunctional_Test): + def test_multicore_scheduling (self): + mc_tests = ['stl/tests/single_cont.py', + 'stl/tests/single_burst.py', + 'stl/tests/multi_burst.py', + 'stl/tests/many_streams.py', + ] + + for mc_test in mc_tests: + rc = self.run_sim(mc_test, output = None, options = '--test_multi_core --limit=3840', silent = True) + assert_equal(rc, True) + diff --git a/scripts/stl/tests/many_streams.py b/scripts/stl/tests/many_streams.py new file mode 100644 index 00000000..eace7640 --- /dev/null +++ b/scripts/stl/tests/many_streams.py @@ -0,0 +1,50 @@ +from trex_stl_lib.api import * + +class STLS1(object): + + def get_streams (self, direction = 0, **kwargs): + s1 = STLStream(name = 's1', + packet = STLPktBuilder(pkt = Ether()/IP(src="16.0.0.1",dst="48.0.0.1")/UDP(dport=12,sport=1025)/(10*'x')), + mode = STLTXSingleBurst(pps = 100, total_pkts = 7), + next = 's2' + + ) + s2 = STLStream(name = 's2', + self_start = False, + packet = STLPktBuilder(pkt = Ether()/IP(src="16.0.0.1",dst="48.0.0.2")/UDP(dport=12,sport=1025)/(10*'x')), + mode = STLTXSingleBurst(pps = 317, total_pkts = 13), + next = 's3' + ) + + + s3 = STLStream(name = 's3', + self_start = False, + packet = STLPktBuilder(pkt = Ether()/IP(src="16.0.0.1",dst="48.0.0.3")/UDP(dport=12,sport=1025)/(10*'x')), + mode = STLTXMultiBurst(pps = 57, pkts_per_burst = 9, count = 5, ibg = 12), + next = 's4' + ) + + s4 = STLStream(name = 's4', + self_start = False, + packet = STLPktBuilder(pkt = Ether()/IP(src="16.0.0.1",dst="48.0.0.3")/UDP(dport=12,sport=1025)/(10*'x')), + mode = STLTXSingleBurst(pps = 4, total_pkts = 22), + next = 's5' + ) + + s5 = STLStream(name = 's5', + self_start = False, + packet = STLPktBuilder(pkt = Ether()/IP(src="16.0.0.1",dst="48.0.0.3")/UDP(dport=12,sport=1025)/(10*'x')), + mode = STLTXSingleBurst(pps = 17, total_pkts = 27), + action_count = 17, + next = 's1' + ) + + return [ s1, s2, s3, s4, s5 ] + + +# dynamic load - used for trex console or simulator +def register(): + return STLS1() + + + diff --git a/scripts/stl/tests/multi_burst.py b/scripts/stl/tests/multi_burst.py new file mode 100644 index 00000000..68a239f5 --- /dev/null +++ b/scripts/stl/tests/multi_burst.py @@ -0,0 +1,17 @@ +from trex_stl_lib.api import * + +class STLS1(object): + + def get_streams (self, direction = 0, **kwargs): + s1 = STLStream(packet = STLPktBuilder(pkt = Ether()/IP(src="16.0.0.1",dst="48.0.0.1")/UDP(dport=12,sport=1025)/(10*'x')), + mode = STLTXMultiBurst(pkts_per_burst = 9, count = 2, ibg = 13)) + + return [s1] + + +# dynamic load - used for trex console or simulator +def register(): + return STLS1() + + + diff --git a/scripts/stl/tests/single_burst.py b/scripts/stl/tests/single_burst.py new file mode 100644 index 00000000..c46ebf87 --- /dev/null +++ b/scripts/stl/tests/single_burst.py @@ -0,0 +1,17 @@ +from trex_stl_lib.api import * + +class STLS1(object): + + def get_streams (self, direction = 0, **kwargs): + s1 = STLStream(packet = STLPktBuilder(pkt = Ether()/IP(src="16.0.0.1",dst="48.0.0.1")/UDP(dport=12,sport=1025)/(10*'x')), + mode = STLTXSingleBurst(total_pkts = 27)) + + return [s1] + + +# dynamic load - used for trex console or simulator +def register(): + return STLS1() + + + diff --git a/scripts/stl/tests/single_cont.py b/scripts/stl/tests/single_cont.py new file mode 100644 index 00000000..19563105 --- /dev/null +++ b/scripts/stl/tests/single_cont.py @@ -0,0 +1,17 @@ +from trex_stl_lib.api import * + +class STLS1(object): + + def get_streams (self, direction = 0, **kwargs): + s1 = STLStream(packet = STLPktBuilder(pkt = Ether()/IP(src="16.0.0.1",dst="48.0.0.1")/UDP(dport=12,sport=1025)/(10*'x')), + mode = STLTXCont(pps = 2000)) + + return [s1] + + +# dynamic load - used for trex console or simulator +def register(): + return STLS1() + + + |