sonic-net / sonic-mgmt

Configuration management examples for SONiC
Other
194 stars 713 forks source link

Add ASIC DB validation to ACL tests #13574

Closed opcoder0 closed 2 months ago

opcoder0 commented 3 months ago

Description of PR

This PR extends AsicDbCli, SonicDbCli and adds fixtures for tests to be able to perform ASIC DB validation. The PR includes the following changes -

Summary: Fixes # Not Applicable

Type of change

Back port request

Approach

What is the motivation for this PR?

Performing ASIC DB validation for test cases improves the depth of the coverage of tests.

How did you do it?

By extending AsicDbCli and SonicDbCli. Added methods to access ASIC DB entries for route entry table, next hop table, ACL entries. Added ASIC DB validation to ACL tests.

How did you verify/test it?

Ran ACL tests on s6100 and 8111 DUTs.

Any platform specific information?

None

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

Not applicable

Documentation

Not applicable

wsycqyz commented 2 months ago

Re-trigger PR test

wsycqyz commented 2 months ago

Do we need this PR in 2024 or 2023 branch?

opcoder0 commented 2 months ago

Do we need this PR in 2024 or 2023 branch?

I think so. @wangxin can you please confirm?

yutongzhang-microsoft commented 2 months ago

Hi, @opcoder0, do you think we should add some unit tests for sonic_db.py

opcoder0 commented 2 months ago

Hi, @opcoder0, do you think we should add some unit tests for sonic_db.py

Thanks for the suggestion @yutongzhang-microsoft I have added a task for this and will implement that in a separate PR.

opcoder0 commented 2 months ago

/azp run

azure-pipelines[bot] commented 2 months ago
Commenter does not have sufficient privileges for PR 13574 in repo sonic-net/sonic-mgmt
wangxin commented 2 months ago

/azp run

azure-pipelines[bot] commented 2 months ago
Azure Pipelines successfully started running 1 pipeline(s).
wangxin commented 2 months ago

Do we need this PR in 2024 or 2023 branch?

I think so. @wangxin can you please confirm?

The guideline is to only backport bug fixes to release branches.This is something new for PR testing. We'd better keep it in master branch.

yejianquan commented 3 weeks ago

I'm enhancing test_acl with multi-thread on master and 202405, But a key block is this PR causes much difference between master and 202405, it's hard and unsafe to write different version of multi-thread codes for master and 202405. I will cherry-pick it to 202405 FYI @wangxin

mssonicbld commented 3 weeks ago

@opcoder0 PR conflicts with 202405 branch

yejianquan commented 3 weeks ago

I'm enhancing test_acl with multi-thread on master and 202405, But a key block is this PR causes much difference between master and 202405, it's hard and unsafe to write different version of multi-thread codes for master and 202405. I will cherry-pick it to 202405 FYI @wangxin

NVM, too much conflict if we want to cherry-pick this one, aborting the cherry-pick