From 384a2f8e5ceca4279a9e7a1bce5a3ca9697c294b Mon Sep 17 00:00:00 2001 From: imarom Date: Sun, 7 Aug 2016 10:58:07 +0300 Subject: random tests are now provided with seed --- scripts/stl/hlt/hlt_udp_rand_len_9k.py | 3 ++- scripts/stl/hlt/hlt_vlans_vm.py | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'scripts/stl') 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 -- cgit 1.2.3-korg