@@ -41,8 +41,7 @@ def arp_setup(ptfhost):
4141
4242
4343def validate_traffic_results (tor_IO , allowed_disruption , delay ,
44- allow_disruption_before_traffic = False ,
45- allowed_duplication = None ):
44+ allow_disruption_before_traffic = False ):
4645 """
4746 Generates a report (dictionary) of I/O metrics that were calculated as part
4847 of the dataplane test. This report is to be used by testcases to verify the
@@ -108,12 +107,7 @@ def validate_traffic_results(tor_IO, allowed_disruption, delay,
108107 "Maximum allowed disruption: {}s"
109108 .format (server_ip , longest_disruption , delay ))
110109
111- # NOTE: Not all testcases set the allowed duplication threshold and the duplication check
112- # uses the allowed disruption threshold here.q So let's set the allowed duplication to
113- # allowed disruption if the allowed duplication is provided here.
114- if allowed_duplication is None :
115- allowed_duplication = allowed_disruption
116- if total_duplications > allowed_duplication :
110+ if total_duplications > allowed_disruption :
117111 failures .append ("Traffic to server {} was duplicated {} times. "
118112 "Allowed number of duplications: {}"
119113 .format (server_ip , total_duplications , allowed_disruption ))
@@ -156,12 +150,11 @@ def _validate_long_disruption(disruptions, allowed_disruption, delay):
156150
157151
158152def verify_and_report (tor_IO , verify , delay , allowed_disruption ,
159- allow_disruption_before_traffic = False , allowed_duplication = None ):
153+ allow_disruption_before_traffic = False ):
160154 # Wait for the IO to complete before doing checks
161155 if verify :
162156 validate_traffic_results (tor_IO , allowed_disruption = allowed_disruption , delay = delay ,
163- allow_disruption_before_traffic = allow_disruption_before_traffic ,
164- allowed_duplication = allowed_duplication )
157+ allow_disruption_before_traffic = allow_disruption_before_traffic )
165158 return tor_IO .get_test_results ()
166159
167160
@@ -274,8 +267,7 @@ def send_t1_to_server_with_action(duthosts, ptfhost, ptfadapter, tbinfo,
274267
275268 def t1_to_server_io_test (activehost , tor_vlan_port = None ,
276269 delay = 0 , allowed_disruption = 0 , action = None , verify = False , send_interval = 0.1 ,
277- stop_after = None , allow_disruption_before_traffic = False ,
278- allowed_duplication = None ):
270+ stop_after = None , allow_disruption_before_traffic = False ):
279271 """
280272 Helper method for `send_t1_to_server_with_action`.
281273 Starts sender and sniffer before performing the action on the tor host.
@@ -310,8 +302,7 @@ def t1_to_server_io_test(activehost, tor_vlan_port=None,
310302 if delay and not allowed_disruption :
311303 allowed_disruption = 1
312304
313- return verify_and_report (tor_IO , verify , delay , allowed_disruption , allow_disruption_before_traffic ,
314- allowed_duplication = allowed_duplication )
305+ return verify_and_report (tor_IO , verify , delay , allowed_disruption , allow_disruption_before_traffic )
315306
316307 yield t1_to_server_io_test
317308
@@ -425,7 +416,7 @@ def send_t1_to_soc_with_action(duthosts, ptfhost, ptfadapter, tbinfo,
425416
426417 def t1_to_soc_io_test (activehost , tor_vlan_port = None ,
427418 delay = 0 , allowed_disruption = 0 , action = None , verify = False , send_interval = 0.01 ,
428- stop_after = None , allowed_duplication = None ):
419+ stop_after = None ):
429420
430421 tor_IO = run_test (duthosts , activehost , ptfhost , ptfadapter , vmhost ,
431422 action , tbinfo , tor_vlan_port , send_interval ,
@@ -441,8 +432,7 @@ def t1_to_soc_io_test(activehost, tor_vlan_port=None,
441432 if asic_type == "vs" :
442433 logging .info ("Skipping verify on VS platform" )
443434 return
444- return verify_and_report (tor_IO , verify , delay , allowed_disruption ,
445- allowed_duplication = allowed_duplication )
435+ return verify_and_report (tor_IO , verify , delay , allowed_disruption )
446436
447437 yield t1_to_soc_io_test
448438
0 commit comments