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 Cable and Buffer test #487

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

chitra-raghavan
Copy link

@chitra-raghavan chitra-raghavan commented Apr 24, 2018

What I did
Adding Testcase for verifying dynamic buffer_profile depending upon cable and speed length

Why I did it
No existing script to check BufferProfile depending upon cable length

How I verified it
Running the script using vs in vs environment
Pass Log :
test_CableBuffer-PassLog.log



class TestCableBufferProfile(object):
cable_list = ['5m', '40m', '300m']
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you rename this set to cable_len_list or cable_length_list?

@@ -0,0 +1,134 @@
"""
test_Cablebuffer.py implements list of tests to check whether the approprotae buffer profile
Copy link
Collaborator

Choose a reason for hiding this comment

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

typo.. appropriate

asic_port_records = asic_port_table.getKeys()
assert len(asic_port_records) == (self.num_ports + 1) # +CPU port
num_set = 0
for k in asic_port_records:
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 CPU port assumed to be at the end of records? Else I think the below logic would fail right?

Copy link
Author

Choose a reason for hiding this comment

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

There is an conditional check for getting the speed Fv for all the port records .For cpu port case, conditional check will get skipped and it will not evaluated. So this has been handled in the below code.

                (status, fvs) = asic_port_table.get(k)
                assert status == True
                for fv in fvs:
                    if fv[0] == "SAI_PORT_ATTR_SPEED":
                        assert fv[1] == speed
                        num_set += 1

@chitra-raghavan
Copy link
Author

@prsunny , Any update upon when it will be merged ?

@prsunny
Copy link
Collaborator

prsunny commented Jul 23, 2018

@yxieca, this is approved from my side. Can you sign-off?

Copy link
Contributor

@yxieca yxieca left a comment

Choose a reason for hiding this comment

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

@chitra-raghavan This changes looks like an improvement of https://github.com/Azure/sonic-swss/blob/master/tests/test_speed.py. Can this test replace test_speed.py?

EdenGri pushed a commit to EdenGri/sonic-swss that referenced this pull request Feb 28, 2022
oleksandrivantsiv pushed a commit to oleksandrivantsiv/sonic-swss that referenced this pull request Mar 1, 2023
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.

4 participants