From c307aa7656977e0e54dd07067334f9e5dbbbc6a3 Mon Sep 17 00:00:00 2001 From: Longxiang Lyu <35479537+lolyu@users.noreply.github.com> Date: Fri, 6 Jun 2025 09:43:57 +0800 Subject: [PATCH] [dualtor-io] Fix duplication merge condition (#18828) What is the motivation for this PR? Work Item: 33161844 Actually, there is only one disruption, but due to the vlan flooding behavior, packet with id 70 is flooded in the vlan and received; so two disruptions are detected. So for this case, the following two disruptions should be merged into one. How did you do it? Change the merge condition to allow merge in this case. How did you verify/test it? Run on Cisco dualtor testbed and pass. Signed-off-by: Longxiang Lyu --- tests/common/dualtor/data_plane_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/common/dualtor/data_plane_utils.py b/tests/common/dualtor/data_plane_utils.py index 379ef57c55b..87f496c2169 100644 --- a/tests/common/dualtor/data_plane_utils.py +++ b/tests/common/dualtor/data_plane_utils.py @@ -87,7 +87,7 @@ def validate_traffic_results(tor_IO, allowed_disruption, delay, # The dualtor I/O flow examine logic will regard those duplications as packet delivery, # so multiple disruptions will be reported. So we need to reassemble the true disruption # with the duplications here. - if merge_duplications_into_disruptions and result['disruptions'] and result['duplications']: + if merge_duplications_into_disruptions and result['disruptions']: logger.debug("Server %s disruptions before merge:\n%s", server_ip, json.dumps(result['disruptions'], indent=4)) logger.debug("Server %s duplications before merge:\n%s",