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

[action] [PR:11180] [SNMP]: Modify test to verify all queue indexes are present #11308

Merged
merged 1 commit into from
Jan 17, 2024

Conversation

mssonicbld
Copy link
Collaborator

Description of PR

Summary:
Fixes # (issue)

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Back port request

  • 201911
  • 202012
  • 202205
  • 202305

Approach

What is the motivation for this PR?

ADO : 26336010

Modify test to detect issue sonic-net/sonic-buildimage#17448.

How did you do it?

Currently test_snmp_queue only verifies that each interface does have queue counters associated with it.
It does not verify if all the expected queue counters are present.
Modify test_snmp_queue to add 2 additional checks:

  1. Ensure that queue index with queue configuration in config_db, is present for each interface.
  2. Ensure that the number of Unicast queue counters for each interface in 'show queue counters is the same as the number of queue indexes in the SNMP result.

How did you verify/test it?

Test case passes for single-asic/multi-asic/Chassis platforms.
Test case passed with: 202205/202305/202311/master images
Test case fails when run on device with image which has the issue: sonic-net/sonic-buildimage#17448.

 snmp_q_idx = int(queue_idx) + 1
 if str(snmp_q_idx) not in v['queues'][direction_type]:
 pytest.fail("\
 Expected queue index %d not present in SNMP \
> result for interface %s" % (snmp_q_idx, v['name']))
E Failed: Expected queue index 6 not present in SNMP result for interface Ethernet13/3

..
snmp/test_snmp_queue.py:87: Failed
-------------------------------------------------------------------------------------------------- generated xml file: /data/sonic-mgmt-int/tests/logs/tr.xml --------------------------------------------------------------------------------------------------
=================================================================================================================== short test summary info ====================================================================================================================
FAILED snmp/test_snmp_queue.py::test_snmp_queues[str3-7060-acs-1] - Failed: Expected queue index 6 not present in SNMP result for interface Ethernet13/3
================================================================================================================== 1 failed in 248.30 seconds ==================================================================================================================
INFO:root:Can not get Allure report URL. Please check logs

Any platform specific information?

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

Documentation

…t#11180)

## Approach
#### What is the motivation for this PR?
ADO : 26336010

Modify test to detect issue sonic-net/sonic-buildimage#17448.
#### How did you do it?
Currently test_snmp_queue only verifies that each interface does have queue counters associated with it.
It does not verify if all the expected queue counters are present.
Modify test_snmp_queue to add 2 additional checks:
1. Ensure that queue index with queue configuration in config_db, is present for each interface.
2. Ensure that the number of Unicast queue counters for each interface in 'show queue counters <interface name> is the same as the number of queue indexes in the SNMP result.
#### How did you verify/test it?
Test case passes for single-asic/multi-asic/Chassis platforms.
Test case passed with: 202205/202305/202311/master images
Test case fails when run on device with image which has the issue: sonic-net/sonic-buildimage#17448.
```
                        snmp_q_idx = int(queue_idx) + 1
                        if str(snmp_q_idx) not in v['queues'][direction_type]:
                            pytest.fail("\
                                    Expected queue index %d not present in SNMP \
>                                           result for interface %s" % (snmp_q_idx, v['name']))
E                           Failed:                                 Expected queue index 6 not present in SNMP                                         result for interface Ethernet13/3

..
snmp/test_snmp_queue.py:87: Failed
-------------------------------------------------------------------------------------------------- generated xml file: /data/sonic-mgmt-int/tests/logs/tr.xml --------------------------------------------------------------------------------------------------
=================================================================================================================== short test summary info ====================================================================================================================
FAILED snmp/test_snmp_queue.py::test_snmp_queues[str3-7060-acs-1] - Failed:                                 Expected queue index 6 not present in SNMP                                         result for interface Ethernet13/3
================================================================================================================== 1 failed in 248.30 seconds ==================================================================================================================
INFO:root:Can not get Allure report URL. Please check logs
```
@mssonicbld
Copy link
Collaborator Author

Original PR: #11180

@mssonicbld mssonicbld merged commit 3601e68 into sonic-net:202205 Jan 17, 2024
10 checks passed
@mssonicbld mssonicbld deleted the cherry/202205/11180 branch February 4, 2024 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants