diff options
author | 2016-02-24 16:08:33 +0200 | |
---|---|---|
committer | 2016-02-24 16:08:33 +0200 | |
commit | 4ae35508f6b448162aa4707264895b4dc42dd0de (patch) | |
tree | 671c99ed4607e5e23954239d52f6fbd289e94266 /scripts | |
parent | 5a844c9d72411435842e5a0674c6fdc04e5d4e84 (diff) |
add seed per stream
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/automation/regression/unit_tests/functional_tests/stl_basic_tests.py | 6 | ||||
-rw-r--r-- | scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py | 5 | ||||
-rw-r--r-- | scripts/exp/syn_attack.pcap | bin | 3824 -> 3824 bytes | |||
-rw-r--r-- | scripts/exp/udp_rand_len_9k.pcap | bin | 230576 -> 204608 bytes | |||
-rw-r--r-- | scripts/stl/syn_attack.py | 1 | ||||
-rw-r--r-- | scripts/stl/udp_rand_len_9k.py | 1 |
6 files changed, 10 insertions, 3 deletions
diff --git a/scripts/automation/regression/unit_tests/functional_tests/stl_basic_tests.py b/scripts/automation/regression/unit_tests/functional_tests/stl_basic_tests.py index eb8bf1a6..22a63ddd 100644 --- a/scripts/automation/regression/unit_tests/functional_tests/stl_basic_tests.py +++ b/scripts/automation/regression/unit_tests/functional_tests/stl_basic_tests.py @@ -141,12 +141,12 @@ class CStlBasic_Test(functional_general_test.CGeneralFunctional_Test): p = [ ["udp_1pkt_1mac_override.py","-m 1 -l 50",True], - ["syn_attack.py","-m 1 -l 50",False], # can't compare random now + ["syn_attack.py","-m 1 -l 50",True], # can't compare random now ["udp_1pkt_1mac.py","-m 1 -l 50",True], ["udp_1pkt_mac.py","-m 1 -l 50",True], ["udp_1pkt.py","-m 1 -l 50",True], ["udp_1pkt_tuple_gen.py","-m 1 -l 50",True], - ["udp_rand_len_9k.py","-m 1 -l 50",False], # can't do the compare + ["udp_rand_len_9k.py","-m 1 -l 50",True], # can't do the compare ["udp_1pkt_mpls.py","-m 1 -l 50",True], ["udp_1pkt_mpls_vm.py","-m 1 ",True], ["imix.py","-m 1 -l 100",True], @@ -190,7 +190,7 @@ class CStlBasic_Test(functional_general_test.CGeneralFunctional_Test): ]; - p1 = [ ["udp_1pkt_range_clients_split_garp.py","-m 1 -l 10 ",True] ] + p1 = [ ["udp_rand_len_9k.py","-m 1 -l 50",True] ] for obj in p: diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py index 127d1669..fdd330a5 100644 --- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py +++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py @@ -152,6 +152,7 @@ class STLStream(object): next = None, stream_id = None, action_count = 0, + random_seed =0, mac_src_override_by_pkt=None, mac_dst_override_mode=None #see STLStreamDstMAC_xx ): @@ -163,6 +164,7 @@ class STLStream(object): validate_type('self_start', self_start, bool) validate_type('isg', isg, (int, float)) validate_type('stream_id', stream_id, (NoneType, int)) + validate_type('random_seed',random_seed,int); if (type(mode) == STLTXCont) and (next != None): raise STLError("continuous stream cannot have a next stream ID") @@ -207,6 +209,9 @@ class STLStream(object): self.fields['self_start'] = self_start self.fields['isg'] = isg + if random_seed !=0 : + self.fields['random_seed'] = random_seed # optional + # mode self.fields['mode'] = mode.to_json() self.mode_desc = str(mode) diff --git a/scripts/exp/syn_attack.pcap b/scripts/exp/syn_attack.pcap Binary files differindex d1aa5f6f..aa420d2c 100644 --- a/scripts/exp/syn_attack.pcap +++ b/scripts/exp/syn_attack.pcap diff --git a/scripts/exp/udp_rand_len_9k.pcap b/scripts/exp/udp_rand_len_9k.pcap Binary files differindex 5e3a06d2..3f4c7c37 100644 --- a/scripts/exp/udp_rand_len_9k.pcap +++ b/scripts/exp/udp_rand_len_9k.pcap diff --git a/scripts/stl/syn_attack.py b/scripts/stl/syn_attack.py index eba11a82..55abadf1 100644 --- a/scripts/stl/syn_attack.py +++ b/scripts/stl/syn_attack.py @@ -38,6 +38,7 @@ class STLS1(object): vm = vm) return STLStream(packet = pkt, + random_seed = 0x1234,# can be remove. will give the same random value any run mode = STLTXCont()) diff --git a/scripts/stl/udp_rand_len_9k.py b/scripts/stl/udp_rand_len_9k.py index cf78b1c9..335a6b33 100644 --- a/scripts/stl/udp_rand_len_9k.py +++ b/scripts/stl/udp_rand_len_9k.py @@ -30,6 +30,7 @@ class STLS1(object): vm = vm) return STLStream(packet = pkt, + random_seed = 0x1234, mode = STLTXCont()) |