-
Notifications
You must be signed in to change notification settings - Fork 1k
Fix buffer queue cnt test to account for different BUFFER_QUEUE configs #19310
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
Changes from all commits
6b99d76
cfd7333
6bdd9ed
c0f8b59
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -31,7 +31,8 @@ | |||||||||||||
|
|
||||||||||||||
| def load_new_cfg(duthost, data): | ||||||||||||||
| duthost.copy(content=json.dumps(data, indent=4), dest=CFG_DB_PATH) | ||||||||||||||
| config_reload(duthost, config_source='config_db', safe_reload=True, check_intf_up_ports=True, wait_for_bgp=True) | ||||||||||||||
| config_reload(duthost, config_source='config_db', safe_reload=True, check_intf_up_ports=True, | ||||||||||||||
| wait_for_bgp=True, yang_validate=False) | ||||||||||||||
| # config reload overrides testing telemetry config, ensure testing config exists | ||||||||||||||
| setup_telemetry_forpyclient(duthost) | ||||||||||||||
|
|
||||||||||||||
|
|
@@ -185,26 +186,60 @@ def test_telemetry_queue_buffer_cnt(duthosts, enum_rand_one_per_hwsku_hostname, | |||||||||||||
| pytest.skip("Skipping test as there are none interfaces in admin'up' state with buffer queues to check") | ||||||||||||||
|
|
||||||||||||||
| interface_buffer_queues = [bq for bq in buffer_queues if any(val in interface_to_check for val in bq.split('|'))] | ||||||||||||||
| if len(interface_buffer_queues) == 0: | ||||||||||||||
| pytest.skip("No valid entry for any interface:queue entry") | ||||||||||||||
|
|
||||||||||||||
| """If all queues for that pool are in the same pool ex Ethernet0|0-9 | ||||||||||||||
| We will modify to separate the first queue and the remaining such | ||||||||||||||
| that we get a separate entry for Ethernet0|0 and Ethernet0|1-9""" | ||||||||||||||
|
Comment on lines
+192
to
+194
|
||||||||||||||
| """If all queues for that pool are in the same pool ex Ethernet0|0-9 | |
| We will modify to separate the first queue and the remaining such | |
| that we get a separate entry for Ethernet0|0 and Ethernet0|1-9""" | |
| # If all queues for that pool are in the same pool, e.g., Ethernet0|0-9, | |
| # we will modify to separate the first queue and the remaining such | |
| # that we get a separate entry for Ethernet0|0 and Ethernet0|1-9. |
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.
lol so useless
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.
Add a check to ensure interface_buffer_queues is not empty before accessing interface_buffer_queues[0]
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.
Done
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.
nit: the logic here is pretty useful for other use cases too. Wanna split the logic out into a helper func to make it more readable?
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 take this effort in some future PR.
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
yang_validateto False intentional?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.
Yes, after modifying BUFFER_QUEUE and doing config reload, we will skip yang validation.