-
Notifications
You must be signed in to change notification settings - Fork 557
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
base: master
Are you sure you want to change the base?
Conversation
tests/test_cableBuffer.py
Outdated
|
||
|
||
class TestCableBufferProfile(object): | ||
cable_list = ['5m', '40m', '300m'] |
There was a problem hiding this comment.
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?
tests/test_cableBuffer.py
Outdated
@@ -0,0 +1,134 @@ | |||
""" | |||
test_Cablebuffer.py implements list of tests to check whether the approprotae buffer profile |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
@prsunny , Any update upon when it will be merged ? |
@yxieca, this is approved from my side. Can you sign-off? |
There was a problem hiding this 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?
…c-net#487) Signed-off-by: Ying Xie <[email protected]>
Signed-off-by: Nazarii Hnydyn <[email protected]>
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