Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test script for null_route_helper #3812

Merged
merged 2 commits into from
Aug 16, 2021

Conversation

bingwang-ms
Copy link
Collaborator

Signed-off-by: bingwang [email protected]

Description of PR

Summary:
PR sonic-net/sonic-utilities#1718 introduced a new helper script null_route_helper. This PR is to implement test cases for the new script.

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?

This PR is to add test cases for null_route_helper

How did you do it?

  1. Create ACL tables on all uplink interfaces
  2. Create some ACL rules as production does
  3. Add block/unblock rules with null_route_helper script, and verify if packets are dropped or forwarded as expected.

How did you verify/test it?

Verified on SN4600, T0 testbed.

Any platform specific information?

No.

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

Running on T0 topo.

Documentation

@bingwang-ms bingwang-ms requested a review from a team as a code owner July 19, 2021 07:07
@bingwang-ms
Copy link
Collaborator Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@bingwang-ms bingwang-ms requested a review from qiluo-msft July 19, 2021 09:27
assert(send_and_verify_packet(ptfadapter, pkt, exp_pkt, random.choice(ptf_t1_interfaces), rx_port, expected_result))



Copy link
Contributor

@qiluo-msft qiluo-msft Jul 22, 2021

Choose a reason for hiding this comment

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

Remove extra empty lines #Closed

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Updated. Thanks

Build ipv4 and ipv6 packets/expected_packets for testing.
"""
pkt = None
exp_pkt = None
Copy link
Contributor

@qiluo-msft qiluo-msft Jul 22, 2021

Choose a reason for hiding this comment

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

exp_pkt = None


You can remove the init lines? #Closed

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Updated. Thanks

@bingwang-ms bingwang-ms force-pushed the null_route_helper_test branch from 470ea4b to af2a244 Compare July 22, 2021 09:12
Signed-off-by: bingwang <[email protected]>
@bingwang-ms
Copy link
Collaborator Author

Please hold on merging this PR until null_route_helper script is checked in.

@bingwang-ms bingwang-ms merged commit 143fb4a into sonic-net:master Aug 16, 2021
vmittal-msft pushed a commit to vmittal-msft/sonic-mgmt that referenced this pull request Sep 28, 2021
* Add test script for null_route_helper

Signed-off-by: bingwang <[email protected]>
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