Skip to content

Add test cases for hardware BFD#4992

Merged
prsunny merged 5 commits intosonic-net:masterfrom
shi-su:bfd_test
Jan 28, 2022
Merged

Add test cases for hardware BFD#4992
prsunny merged 5 commits intosonic-net:masterfrom
shi-su:bfd_test

Conversation

@shi-su
Copy link
Contributor

@shi-su shi-su commented Jan 20, 2022

Description of PR

Summary:
Fixes # (issue)

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Back port request

  • 201911

Approach

What is the motivation for this PR?

Add sonic-mgmt test cases for BFD support.

Note: The BFD SAI is not available in many current SAI implementations. The tests are expected to fail before the support is available.

How did you do it?

Set up test cases to bring up BFD sessions between the DUT and ptf. Verify state changes of the BFD sessions.

How did you verify/test it?

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

@shi-su shi-su requested a review from prsunny January 20, 2022 18:13
@shi-su shi-su marked this pull request as ready for review January 26, 2022 21:51
@shi-su shi-su requested a review from a team as a code owner January 26, 2022 21:51
from tests.common import constants

pytestmark = [
pytest.mark.topology('t0')
Copy link
Contributor

Choose a reason for hiding this comment

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

i think this should be on t1/t1-lag

ptfhost.shell("ip addr del {}/{} dev eth{}".format(neighbor_addrs[idx], prefix_len, neighbor_interfaces[idx]), module_ignore_errors=True)


def check_ptf_bfd_statue(ptfhost, neighbor_addr, local_addr, expected_state):
Copy link
Contributor

Choose a reason for hiding this comment

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

status -> typo?

assert line.split('=')[1].strip() == expected_state


def check_dut_bfd_statue(duthost, neighbor_addr, expected_state):
Copy link
Contributor

Choose a reason for hiding this comment

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

status -> typo?

@prsunny prsunny merged commit a5f5c43 into sonic-net:master Jan 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants