Skip to content

[lldp_neighbor]: Add proper tests for system name, system description, port ID and port description#234

Merged
jleveque merged 4 commits intosonic-net:masterfrom
jleveque:better_lldp_neighbor_test
Aug 1, 2017
Merged

[lldp_neighbor]: Add proper tests for system name, system description, port ID and port description#234
jleveque merged 4 commits intosonic-net:masterfrom
jleveque:better_lldp_neighbor_test

Conversation

@jleveque
Copy link
Copy Markdown
Contributor

@jleveque jleveque commented Aug 1, 2017

  • Chassis ID test still only check for empty field; will require more work to implement proper test.

# FIXME: use more strict assertions
- name: verify the dut system name field is not empty
assert: {that: "'{{ ansible_lldp_facts[neighbor_interface]['neighbor_sys_name'] }}' != ''"}
- name: Verify the published DuT system name field is correct
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

DUT is more common than DuT.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Resolved.

- name: Print LLDP facts from neighbors
debug: msg="{{ ansible_lldp_facts }}"

# FIXME: use more strict assertions
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is it easy/possible to FIXME now?

Copy link
Copy Markdown
Contributor Author

@jleveque jleveque Aug 1, 2017

Choose a reason for hiding this comment

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

I figured out a fairly straightforward way to test the system description, and just made a new commit. Chassis ID, however, can take a few forms, and will require more advanced logic and parsing. Most likely outside the scope of Ansible; will require separate script. Need to think more about how to best implement it.

Copy link
Copy Markdown
Contributor

@qiluo-msft qiluo-msft left a comment

Choose a reason for hiding this comment

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

As comments

- name: Iterate through each LLDP neighbor and verify the information received by neighbor are also correct
- block:
- name: Obtain the system description of the DUT chassis
become: true
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No need to become

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks. Resolved.

@jleveque jleveque changed the title [lldp_neighbor]: Add proper tests for system name, port ID and port description fields [lldp_neighbor]: Add proper tests for system name, system description, port ID and port description fields Aug 1, 2017
@jleveque jleveque changed the title [lldp_neighbor]: Add proper tests for system name, system description, port ID and port description fields [lldp_neighbor]: Add proper tests for system name, system description, port ID and port description Aug 1, 2017
@jleveque jleveque merged commit db066dd into sonic-net:master Aug 1, 2017
@jleveque jleveque deleted the better_lldp_neighbor_test branch August 1, 2017 21:37
lguohan pushed a commit that referenced this pull request Aug 3, 2017
nhe-NV pushed a commit to nhe-NV/sonic-mgmt that referenced this pull request May 12, 2025
…ts. (sonic-net#234)

<!--
Please make sure you've read and understood our contributing guidelines;
https://github.com/sonic-net/SONiC/blob/gh-pages/CONTRIBUTING.md

Please provide following information to help code review process a bit easier:
-->
### Description of PR
<!--
- Please include a summary of the change and which issue is fixed.
- Please also include relevant motivation and context. Where should reviewer start? background context?
- List any dependencies that are required for this change.
-->

Summary:
Fixes # 17611

### Type of change

<!--
- Fill x for your type of change.
- e.g.
- [x] Bug fix
-->

- [X] Bug fix
- [ ] Testbed and Framework(new/improvement)
- [ ] New Test case
 - [ ] Skipped for non-supported platforms
- [ ] Test case improvement

### Back port request
- [ ] 202012
- [ ] 202205
- [ ] 202305
- [ ] 202311
- [X] 202405
- [X] 202411

### Approach
#### What is the motivation for this PR?
The recent addition for static route in snappi tests for cisco-8000 broke other platform runs. This PR attempts to fix the new function for the other platforms.

#### How did you do it?
Converted the runtimeError to a warning, and return the same address.

#### How did you verify/test it?
Ran it with my TB, with both == cisco-8000, and != cisco-8000 checks.

and verified that the issue in the above git issue is not seen(global_pause is unsupported in cisco-8000):
```=========================================================================================================== PASSES ===========================================================================================================
___________________________________________________________________________________________ test_global_pause[multidut_port_info1] ___________________________________________________________________________________________
--------------------------------------------------------------------------- generated xml file: /run_logs/ixia/pretest/2025-03-20-07-23-24/tr.xml ----------------------------------------------------------------------------
INFO:root:Can not get Allure report URL. Please check logs
================================================================================================== short test summary info ===================================================================================================
PASSED snappi_tests/pfc/test_global_pause_with_snappi.py::test_global_pause[multidut_port_info1]
ERROR snappi_tests/pfc/test_global_pause_with_snappi.py::test_global_pause[multidut_port_info3] - Failed: Processes "['analyze_logs--<MultiAsicSonicHost yy39top-lc2>']" failed with exit code "1"
FAILED snappi_tests/pfc/test_global_pause_with_snappi.py::test_global_pause[multidut_port_info0] - Failed: Background Flow Prio 1 should not have any dropped packet
FAILED snappi_tests/pfc/test_global_pause_with_snappi.py::test_global_pause[multidut_port_info2] - Failed: Background Flow Prio 1 should not have any dropped packet
FAILED snappi_tests/pfc/test_global_pause_with_snappi.py::test_global_pause[multidut_port_info3] - Failed: Background Flow Prio 1 should not have any dropped packet
=============================================================================== 3 failed, 1 passed, 8 warnings, 1 error in 2068.50s (0:34:28) ================================================================================
sonic@snappi-sonic-mgmt-msft-t2:/data/tests$ vi common/plugins/conditional_mark/tests_mark_conditions.yaml
```

@amitpawar12 , @sdszhang : Pls try it out and let me know how it goes. Thanks.
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
60f5237 (HEAD, origin/202012) [multi-asic]: Udpate to use SonicDBConfig from swsscommon (sonic-net#219)
5c0d941 [201911][RFC1213]: Initialize lag oid map in reinit_data (sonic-net#234)

Signed-off-by: Suvarna Meenakshi <sumeenak@microsoft.com>
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
sonic-snmpagent
7e46eb1 [201911][RFC1213]: Initialize lag oid map in reinit_data (sonic-net#234)
aa98ded CPU Spike because of redundant and flooded keyspace notifis handled (sonic-net#230)

sonic-swss
bc4e334 [Mux orch] Handle setting unknown mux state (sonic-net#1984)
bd3630b [tunnel decap] Change tunnel orch order (sonic-net#1977)
87a673a Fix the option missing in kernel config issue (sonic-net#1973)
57967a1 [orchagent] Fix group name of port-buffer-drop in flexcounterorch.cpp (sonic-net#1967)

sonic-utilities
181e8b0 Fix the option missing in kernel config issue (sonic-net#1888)
21c0cc0 [watermarkstat] Fix for error in processing empty array from couters db (sonic-net#1810)
7f15755 [chassis][supervisor][show][interfaces]show interfaces command warning on Supervisor card (sonic-net#1771)
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
Fix for vlan-id ACL filter introduced in SONiC 201911 sonic-net#234

Signed-off-by: Roman Savchuk <romanx.savchuk@intel.com>
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.

4 participants