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

Modified test cases by QOS DB reference format remove #3824

Merged

Conversation

AshokDaparthi
Copy link
Contributor

Depends on sonic-net/sonic-utilities#1626
Depends on sonic-net/sonic-swss#1754
Depends on sonic-net/sonic-buildimage#7752

QOS tables in config db used ABNF format i.e "[TABLE_NAME|name] to refer fieldvalue to other qos tables.

Example:
Config DB:
"Ethernet92|3": {
"scheduler": "[SCHEDULER|scheduler.1]",
"wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
},
"Ethernet0|0": {
"profile": "[BUFFER_PROFILE|ingress_lossy_profile]"
},
"Ethernet0": {
"dscp_to_tc_map": "[DSCP_TO_TC_MAP|AZURE]",
"pfc_enable": "3,4",
"pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]",
"tc_to_pg_map": "[TC_TO_PRIORITY_GROUP_MAP|AZURE]",
"tc_to_queue_map": "[TC_TO_QUEUE_MAP|AZURE]"
},
This format is not consistent with other DB schema followed in sonic.
And also this reference in DB is not required, This is taken care by YANG "leafref".

Removed this format from all platform files to consistent with other sonic db schema.
Example:
"Ethernet92|3": {
"scheduler": "scheduler.1",
"wred_profile": "AZURE_LOSSLESS"
},

Modified test cases to remove DB references.

@lgtm-com
Copy link

lgtm-com bot commented Jul 20, 2021

This pull request introduces 1 alert when merging a5e6a86df1ae9ad301312a78d758c858cde3194a into 8f3ae4f - view on LGTM.com

new alerts:

  • 1 for Syntax error

@yxieca yxieca requested a review from neethajohn July 20, 2021 22:42
@yxieca
Copy link
Collaborator

yxieca commented Jul 20, 2021

@AshokDaparthi please explain how this change was tested? Why would LGTM catch syntax errors?

@AshokDaparthi
Copy link
Contributor Author

@AshokDaparthi please explain how this change was tested? Why would LGTM catch syntax errors?

This code testing needs others repo changes, At present even i mentioned "Depends on" at present pull request "Checks/regression tests" not using new packages. I am looking at how to run sonic-mgmt tests.

tests/qos/test_buffer.py Outdated Show resolved Hide resolved
Copy link
Contributor

@stephenxs stephenxs left a comment

Choose a reason for hiding this comment

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

Approved for test_buffer (pytest). Please check with other reviewers as well.
Thanks.

@stephenxs
Copy link
Contributor

HI @yxieca @lguohan @AshokDaparthi @neethajohn
To which branch will the feature be merged?
I just realized the sonic-mgmt change can affect all the existing branches without this feature.
After the PR is merged, sonic-mgmt will assume the format of qos/buffer references to be [<field-name>], like ingress_lossless_pool.
However, in the branches without this feature, the qos/buffer references are still in the old format, like [BUFFER_POOL|ingress_lossless_pool]. This will fail the qos test in old branches.
I think there are two ways to handle this

  • Fork a dedicated branch of sonic-mgmt for older branches
  • Handle the format of qos/buffer references per version.
    • in older branches, like 202012, the format should be [<table-name>|<field-name>]
    • in the latest branch, the format should be <field-name>.

@zhangyanzhao
Copy link
Contributor

Build failure need be handled, this PR blocks sonic-net/sonic-buildimage#7375

@AshokDaparthi AshokDaparthi force-pushed the sonic-yang-qos-fv-db-ref-remove branch 2 times, most recently from 7d417cb to 7eeac59 Compare September 20, 2021 04:00
Syntax error fix

Addressed review comment
@lgtm-com
Copy link

lgtm-com bot commented Sep 20, 2021

This pull request introduces 1 alert when merging 3038adf34405243a2f2a612c76a2bccca8b823f5 into 79e5e78 - view on LGTM.com

new alerts:

  • 1 for Variable defined multiple times

@AshokDaparthi
Copy link
Contributor Author

@stephenxs , @neethajohn - Could you please review this, Modified test cases to handle release.

@neethajohn
Copy link
Contributor

@AshokDaparthi , there is a lot of code change here. I am unable to tell for sure if all the relevant files have been modified. What is the testing that you have done? Can you share the test results?

@AshokDaparthi
Copy link
Contributor Author

@neethajohn - I depend on "Checks" in pull requests. I tried simulating "present/master" release as new format and also tested "present/master" as old format. Both got passed. We do not have any simulated setup which can run sonic-mgmt qos test cases with h/w or vs. I did manual testing in broadcom platform.

ansible/roles/fanout/templates/sonic_deploy_arista_7060.j2 Outdated Show resolved Hide resolved
@@ -15,7 +15,7 @@ def config_port_qos_map(dut, obj_name, interface, **kwargs):
st.log("Please provide obj_name like 'AZURE' and interface like 'Ethernet0,Ethernet1'")
return False
else:
cos_specific_dict = {"tc_to_queue_map": "[TC_TO_QUEUE_MAP|" + obj_name + "]", "dscp_to_tc_map": "[DSCP_TO_TC_MAP|" + obj_name + "]" }
cos_specific_dict = {"tc_to_queue_map": obj_name, "dscp_to_tc_map": obj_name}
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see any version check for all the files changed under the spytest folder. Am I missing something?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@neethajohn - spytest are not handled for backward compatibility, i hope spytest are not used actively for sanity or test. I will take this up after all changes merged.

Copy link
Contributor

Choose a reason for hiding this comment

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

@ramakristipati , please review the spytest changes

tests/common/utilities.py Outdated Show resolved Hide resolved
@neethajohn
Copy link
Contributor

@stephenxs , there are some new changes. Can you please review again?

Copy link
Contributor

@stephenxs stephenxs left a comment

Choose a reason for hiding this comment

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

@AshokDaparthi Some minor comments.

tests/qos/test_buffer.py Outdated Show resolved Hide resolved
tests/qos/test_buffer.py Outdated Show resolved Hide resolved
tests/qos/test_buffer.py Outdated Show resolved Hide resolved
@smaheshm smaheshm merged commit 97d31d4 into sonic-net:master Sep 27, 2021
lolyu pushed a commit that referenced this pull request Sep 29, 2021
Description of PR
Qos sai failures seen due to changes in #3824

Signed-off-by: Neetha John <nejo@microsoft.com>
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.

6 participants