Skip to content

Commit

Permalink
[dhcp_relay] Fix faillure in test_dhcp_relay_default[single] (sonic-n…
Browse files Browse the repository at this point in the history
…et#11935)

What is the motivation for this PR?
DHCP broadcast flooding was resolved by this PR: sonic-net/sonic-buildimage#18064. Hence interfaces under Vlan would not received broadcast flooding packets. Remove this verification.

How did you do it?
Removed verification of receiving of DHCP broadcast flooding packets in other_client_ports.

How did you verify/test it?
Run tests.
  • Loading branch information
yaqiangz authored and mssonicbld committed Mar 13, 2024
1 parent 0f5bb6d commit 12fbc81
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions ansible/roles/test/files/ptftests/py3/dhcp_relay_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,5 @@ def runTest(self):

# Below verification will be done only when client port is set in ptf_runner
if not self.dual_tor and 'other_client_port' in self.test_params:
self.verify_dhcp_relay_pkt_on_other_client_port_with_no_padding(
self.dest_mac_address, self.client_udp_src_port)
self.verify_dhcp_relay_pkt_on_server_port_with_no_padding(
self.dest_mac_address, self.client_udp_src_port)
4 changes: 2 additions & 2 deletions tests/dhcp_relay/test_dhcp_relay.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,8 @@ def test_dhcp_relay_default(ptfhost, dut_dhcp_relay_data, validate_dut_routes_ex
expected_agg_counter_message = (
r".*dhcp_relay#dhcpmon\[[0-9]+\]: "
r"\[\s*Agg-%s\s*-[\sA-Za-z0-9]+\s*rx/tx\] "
r"Discover: +1/ +%d, Offer: +1/ +1, Request: +3/ +%d, ACK: +1/ +1+"
) % (dhcp_relay['downlink_vlan_iface']['name'], dhcp_server_num, dhcp_server_num * 3)
r"Discover: +1/ +%d, Offer: +1/ +1, Request: +2/ +%d, ACK: +1/ +1+"
) % (dhcp_relay['downlink_vlan_iface']['name'], dhcp_server_num, dhcp_server_num * 2)
loganalyzer = LogAnalyzer(ansible_host=duthost, marker_prefix="dhcpmon counter")
marker = loganalyzer.init()
loganalyzer.expect_regex = [expected_agg_counter_message]
Expand Down

0 comments on commit 12fbc81

Please sign in to comment.