Skip to content

[ACL] Add ACL stress test#15225

Merged
wangxin merged 24 commits intosonic-net:masterfrom
opcoder0:testgap/add-acl-stress-test
Mar 12, 2025
Merged

[ACL] Add ACL stress test#15225
wangxin merged 24 commits intosonic-net:masterfrom
opcoder0:testgap/add-acl-stress-test

Conversation

@opcoder0
Copy link
Contributor

@opcoder0 opcoder0 commented Oct 29, 2024

Description of PR

The PR adds stress test to ACL. The test generates number rules depending on the hardware SKU and its ACL entry capacity.

Summary:
Fixes #3595

Type of change

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

Back port request

  • 202012
  • 202205
  • 202305
  • 202311
  • 202405

Approach

What is the motivation for this PR?

Fixes: #3595

How did you do it?

Add a new test to perform stress tests.

How did you verify/test it?

Manually on 7050cx3 and 4600.

Any platform specific information?

None

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

Documentation

Not applicable

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@opcoder0 opcoder0 marked this pull request as ready for review December 31, 2024 10:13
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@kevinskwang
Copy link
Contributor

LGTM

@kevinskwang
Copy link
Contributor

@bingwang-ms pls take a look as well

"test_vlan_ping.py" \
"test_auto_techsupport.py" \
"test_platform_info.py")

Copy link
Collaborator

Choose a reason for hiding this comment

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

Is it a good idea to hard code list of flaky tests here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Its been a while this is due to merge issue doesn't belong to this PR. I will have re-merge.

tests/pytest.ini Outdated
static_config: static_config marker
dependency: dependency marker
skip_traffic_test: skip_traffic_test marker
stress: stress test marker
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is the behavior of pytest stress plugin to run a test many times until the time upper limit is reached?
This way of doing stress test is not efficient enough for our test design. Each of the test script has a large overhead of setting up the global fixtures, do sanity check, etc.
Maybe use the confidence level is more appropriate? You can search the code base for examples of confidence level.
Basically the idea to use in-test-script loop to run something really matters many times. This way can avoid the overhead.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will look into it. Unfortunately, there is no way to skip setup and teardown between stress runs. I would think that was the whole idea of the stress test is to do setup, run test N times and then tear down. But pytest-stress doesn't do that. And it appeared to me at that time that I had to manually run it in a loop say 1000 times. I can add an option to pass in the number of loops to run the test; in this case it would translate to number of times the packet is sent/received after the ACL has been setup.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you @wangxin. I have reverted the reliance on pytest-stress and have relied on using completeness level that other stress tests use.

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@opcoder0 opcoder0 requested a review from wangxin February 20, 2025 06:42
@opcoder0
Copy link
Contributor Author

@bingwang-ms can you please review as well. Thanks!

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@wangxin wangxin merged commit 0568ea6 into sonic-net:master Mar 12, 2025
18 checks passed
nnelluri-cisco pushed a commit to nnelluri-cisco/sonic-mgmt that referenced this pull request Mar 15, 2025
The PR adds stress test to ACL. The test generates number rules depending on the hardware SKU and its ACL entry capacity.

What is the motivation for this PR?
Fixes: sonic-net#3595

How did you do it?
Add a new test to perform stress tests.

How did you verify/test it?
Manually on 7050cx3 and 4600.

Any platform specific information?
None
OriTrabelsi pushed a commit to OriTrabelsi/sonic-mgmt that referenced this pull request Apr 1, 2025
The PR adds stress test to ACL. The test generates number rules depending on the hardware SKU and its ACL entry capacity.

What is the motivation for this PR?
Fixes: sonic-net#3595

How did you do it?
Add a new test to perform stress tests.

How did you verify/test it?
Manually on 7050cx3 and 4600.

Any platform specific information?
None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Need new test: Access-control lists (ACL) on Data-plane

7 participants