diff options
author | imarom <imarom@cisco.com> | 2016-08-07 10:58:07 +0300 |
---|---|---|
committer | imarom <imarom@cisco.com> | 2016-08-07 11:47:36 +0300 |
commit | 384a2f8e5ceca4279a9e7a1bce5a3ca9697c294b (patch) | |
tree | aedff9df79274a25bc9319857602bdb3b4fa7637 /scripts/stl | |
parent | e946a09e5237da5d87048c0f07e0685a99ba193c (diff) |
random tests are now provided with seed
Diffstat (limited to 'scripts/stl')
-rwxr-xr-x | scripts/stl/hlt/hlt_udp_rand_len_9k.py | 3 | ||||
-rwxr-xr-x | scripts/stl/hlt/hlt_vlans_vm.py | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/scripts/stl/hlt/hlt_udp_rand_len_9k.py b/scripts/stl/hlt/hlt_udp_rand_len_9k.py index 1966823c..38d7d565 100755 --- a/scripts/stl/hlt/hlt_udp_rand_len_9k.py +++ b/scripts/stl/hlt/hlt_udp_rand_len_9k.py @@ -6,7 +6,7 @@ class STLS1(object): Create Eth/IP/UDP steam with random packet size (L3 size from 50 to 9*1024) ''' - def get_streams (self, direction = 0, **kwargs): + def get_streams (self, direction = 0, random_seed = 0, **kwargs): min_size = 50 max_size = 9*1024 return [STLHltStream(length_mode = 'random', @@ -20,6 +20,7 @@ class STLS1(object): udp_dst_port = 12, rate_pps = 1000, ignore_macs = True, + consistent_random = (random_seed != 0) ) ] diff --git a/scripts/stl/hlt/hlt_vlans_vm.py b/scripts/stl/hlt/hlt_vlans_vm.py index 70bf1aad..aad0fc5e 100755 --- a/scripts/stl/hlt/hlt_vlans_vm.py +++ b/scripts/stl/hlt/hlt_vlans_vm.py @@ -7,7 +7,8 @@ class STLS1(object): Missing values will be filled with defaults ''' - def get_streams (self, direction = 0, **kwargs): + def get_streams (self, direction = 0, random_seed = 0, **kwargs): + return STLHltStream(frame_size = 100, vlan_id = '1 2 1000 4 5', # 5 vlans vlan_id_mode = 'increment fixed decrement random', # 5th vlan will be default fixed @@ -16,6 +17,7 @@ class STLS1(object): l3_protocol = 'ipv4', l4_protocol = 'udp', direction = direction, + consistent_random = (random_seed != 0) ) # dynamic load - used for trex console or simulator |