summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorHanoh Haim <hhaim@cisco.com>2016-09-13 15:26:27 +0300
committerHanoh Haim <hhaim@cisco.com>2016-09-13 19:37:29 +0300
commit9df89870d053a01a8b65afc1484db6185309ddd8 (patch)
treed4508df995d3a1499664fc78795b0b1130b7fb2d /scripts
parentb424cd3de89ce5dbf67b349d3fe9ffe15b521452 (diff)
fix random_limit max value
Diffstat (limited to 'scripts')
-rw-r--r--scripts/automation/regression/functional_tests/stl_basic_tests.py5
-rwxr-xr-xscripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_packet_builder_scapy.py6
-rw-r--r--scripts/exp/udp_1pkt_repeat_random.pcapbin3824 -> 3824 bytes
-rw-r--r--scripts/stl/udp_1pkt_repeat_random.py2
4 files changed, 5 insertions, 8 deletions
diff --git a/scripts/automation/regression/functional_tests/stl_basic_tests.py b/scripts/automation/regression/functional_tests/stl_basic_tests.py
index 5af1e4de..df377037 100644
--- a/scripts/automation/regression/functional_tests/stl_basic_tests.py
+++ b/scripts/automation/regression/functional_tests/stl_basic_tests.py
@@ -273,12 +273,9 @@ class CStlBasic_Test(functional_general_test.CGeneralFunctional_Test):
["udp_1pkt_range_clients_split_garp.py","-m 1 -l 50",True],
["udp_1pkt_src_ip_split.py","-m 1 -l 50 --cores 2",True],
["udp_1pkt_repeat_random.py","-m 1 -l 50",True],
-
-
];
-
- p = [ ["udp_1pkt_repeat_random.py","-m 1 -l 50",True] ]
+ p = [ ["udp_1pkt_repeat_random.py","-m 1 -l 50",True] ];
for obj in p:
diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_packet_builder_scapy.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_packet_builder_scapy.py
index 5f3a0078..079a8d3c 100755
--- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_packet_builder_scapy.py
+++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_packet_builder_scapy.py
@@ -751,9 +751,9 @@ class STLVmFlowVarRepetableRandom(CTRexVmDescBase):
self.min_value = convert_val (min_value);
if max_value == None :
- max_value = get_max_by_size()
-
- self.max_value = get_max_by_size (self.size)
+ self.max_value = get_max_by_size (self.size)
+ else:
+ self.max_value = convert_val (max_value)
if self.min_value > self.max_value :
raise CTRexPacketBuildException(-11,("max %d is lower than min %d ") % (self.max_value,self.min_value) );
diff --git a/scripts/exp/udp_1pkt_repeat_random.pcap b/scripts/exp/udp_1pkt_repeat_random.pcap
index 33c5a085..61d5c52f 100644
--- a/scripts/exp/udp_1pkt_repeat_random.pcap
+++ b/scripts/exp/udp_1pkt_repeat_random.pcap
Binary files differ
diff --git a/scripts/stl/udp_1pkt_repeat_random.py b/scripts/stl/udp_1pkt_repeat_random.py
index 8149f263..cdbf976f 100644
--- a/scripts/stl/udp_1pkt_repeat_random.py
+++ b/scripts/stl/udp_1pkt_repeat_random.py
@@ -26,7 +26,7 @@ class STLS1(object):
min_value="48.0.0.1",
max_value="48.0.0.255",
size=4,
- limit=5, seed=0x1234),
+ limit=5, seed=0x1235),
STLVmWrFlowVar (fv_name="ip_src", pkt_offset= "IP.src" ), # write ip to packet IP.src
STLVmWrFlowVar (fv_name="ip_dst", pkt_offset= "IP.dst" ), # write ip to packet IP.dst