Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion tests/bfd/test_bfd.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,10 @@ def test_bfd_basic(request, rand_selected_dut, ptfhost, tbinfo, ipv6, dut_init_f
add_dut_ip(duthost, neighbor_devs, local_addrs, prefix_len)
init_ptf_bfd(ptfhost)
add_ipaddr(ptfhost, neighbor_addrs, prefix_len, neighbor_interfaces, ipv6)

# Delay to allow for IPv6 addresses to be fully programmed so IPv6
# neighborship can be resolved on PTF side.
time.sleep(5)
create_bfd_sessions(ptfhost, duthost, local_addrs, neighbor_addrs, dut_init_first)

time.sleep(1)
Expand All @@ -401,7 +405,9 @@ def test_bfd_basic(request, rand_selected_dut, ptfhost, tbinfo, ipv6, dut_init_f

for idx, neighbor_addr in enumerate(neighbor_addrs):
if idx == update_idx:
check_dut_bfd_status(duthost, neighbor_addr, "Admin_Down")
# RFC 5880, section 6.2: Remote system (dut) to enter "Down"
# state when local system (ptf) is set to "AdminDown" state.
check_dut_bfd_status(duthost, neighbor_addr, "Down")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dypet could you please add the RFC req as the comment and we could change the state later.

Copy link
Contributor Author

@dypet dypet Apr 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @kperumalbfn,
Just to confirm, do you want to leave the expected state as "Admin_Down"? If it is not changed to "Down" this test case will fail on Cisco platforms which follow the RFC. It should still pass on other platforms which report "Admin_Down" if the expected state is changed to "Down" due to the way state is checked:
https://github.com/sonic-net/sonic-mgmt/blob/master/tests/bfd/test_bfd.py#L232

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dypet No need to update the test as it may break the other SKUs for now. Please add a comment in test_bfd.py, so we can do the other changes later.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dypet Your change looks good, please add a comment in the file.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @dypet

check_ptf_bfd_status(ptfhost, neighbor_addr, local_addrs[idx], "AdminDown")
else:
check_dut_bfd_status(duthost, neighbor_addr, "Up")
Expand Down
Loading