summaryrefslogtreecommitdiffstats
path: root/scripts/stl
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2016-04-10 10:44:23 +0300
committerimarom <imarom@cisco.com>2016-04-10 12:37:22 +0300
commit8ac45c1c3b2d10d4679fd2c662b6a78c2c2c27a5 (patch)
treebb4f6fbca5e95ff6def2d8136cf6f1a917610f92 /scripts/stl
parentc48c89a97ad070b8f79ac746b6b83aab1cc6f177 (diff)
added tests for multi core
Diffstat (limited to 'scripts/stl')
-rw-r--r--scripts/stl/tests/many_streams.py50
-rw-r--r--scripts/stl/tests/multi_burst.py17
-rw-r--r--scripts/stl/tests/single_burst.py17
-rw-r--r--scripts/stl/tests/single_cont.py17
4 files changed, 101 insertions, 0 deletions
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()
+
+
+