[lldp] Add test_lldp_after_config_reload to verify LLDP recovery#22562
Merged
yxieca merged 1 commit intosonic-net:masterfrom Feb 24, 2026
Merged
[lldp] Add test_lldp_after_config_reload to verify LLDP recovery#22562yxieca merged 1 commit intosonic-net:masterfrom
yxieca merged 1 commit intosonic-net:masterfrom
Conversation
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Verify LLDP neighbors are fully restored after config reload, including: - All pre-reload LLDP neighbors are present post-reload - Neighbor names match pre-reload state - Chassis ID type is MAC (not hostname) - Chassis MAC matches management interface MAC - lldpcli show interfaces lists all expected ports - Syslog checked for 'cannot find port' errors Addresses test gap issue sonic-net#22376. Related PR: sonic-net/sonic-buildimage#25436 Signed-off-by: Ying Xie <ying.xie@microsoft.com>
119899d to
d35ddfb
Compare
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
wangxin
approved these changes
Feb 24, 2026
Merged
12 tasks
aronovic
pushed a commit
to aronovic/sonic-mgmt
that referenced
this pull request
Mar 3, 2026
…ic-net#22562) What is the motivation for this PR? Add a new test case to verify LLDP neighbors are fully restored after config reload. Addresses test gap issue sonic-net#22376. Related fix PR: sonic-net/sonic-buildimage#25436 How did you do it? Added test_lldp_after_config_reload to tests/lldp/test_lldp.py that: 1. Records LLDP neighbors before config reload 2. Performs config reload (safe_reload) 3. Waits for LLDP neighbors to be restored 4. Verifies all neighbors present with matching names 5. Verifies Chassis ID type is MAC 6. Verifies Chassis MAC matches management interface MAC 7. Checks lldpcli show interfaces and syslog for errors How did you verify/test it? lldp/test_lldp.py::test_lldp_after_config_reload[vlab-01-None] PASSED 1 passed, 83 warnings in 221.39s (0:03:41) Tested on KVM testbed (T0, converged peers). Signed-off-by: Ying Xie <ying.xie@microsoft.com> Signed-off-by: Mihut Aronovici <aronovic@cisco.com>
rraghav-cisco
pushed a commit
to rraghav-cisco/sonic-mgmt
that referenced
this pull request
Mar 3, 2026
…ic-net#22562) What is the motivation for this PR? Add a new test case to verify LLDP neighbors are fully restored after config reload. Addresses test gap issue sonic-net#22376. Related fix PR: sonic-net/sonic-buildimage#25436 How did you do it? Added test_lldp_after_config_reload to tests/lldp/test_lldp.py that: 1. Records LLDP neighbors before config reload 2. Performs config reload (safe_reload) 3. Waits for LLDP neighbors to be restored 4. Verifies all neighbors present with matching names 5. Verifies Chassis ID type is MAC 6. Verifies Chassis MAC matches management interface MAC 7. Checks lldpcli show interfaces and syslog for errors How did you verify/test it? lldp/test_lldp.py::test_lldp_after_config_reload[vlab-01-None] PASSED 1 passed, 83 warnings in 221.39s (0:03:41) Tested on KVM testbed (T0, converged peers). Signed-off-by: Ying Xie <ying.xie@microsoft.com> Signed-off-by: Raghavendran Ramanathan <rraghav@cisco.com>
kazinator-arista
pushed a commit
to kazinator-arista/sonic-mgmt
that referenced
this pull request
Mar 4, 2026
<!--
Please make sure you've read and understood our contributing guidelines:
https://github.com/Azure/SONiC/blob/gh-pages/CONTRIBUTING.md
** Make sure all your commits include a signature generated with `git commit -s` **
If this is a bug fix, make sure your description includes "fixes #xxxx", or
"closes #xxxx" or "resolves #xxxx"
Please provide the following information:
-->
#### Why I did it
This PR is to add a symbol link to Mellanox-SN2700 HWSKU so that we can use the exact same HWSKU name for `x86_64-mlnx_msn2700a1-r0` platform.
##### Work item tracking
- Microsoft ADO **32671789**:
#### How I did it
Make a symbol link under `x86_64-mlnx_msn2700a1-r0` folder.
#### How to verify it
The change is verified by deploying a new HWSKU on a SN2700-A1 platform.
<!--
If PR needs to be backported, then the PR must be tested against the base branch and the earliest backport release branch and provide tested image version on these two branches. For example, if the PR is requested for master, 202211 and 202012, then the requester needs to provide test results on master and 202012.
-->
#### Which release branch to backport (provide reason below if selected)
<!--
- Note we only backport fixes to a release branch, *not* features!
- Please also provide a reason for the backporting below.
- e.g.
- [x] 202006
-->
- [ ] 201811
- [ ] 201911
- [ ] 202006
- [ ] 202012
- [ ] 202106
- [ ] 202111
- [ ] 202205
- [ ] 202211
- [ ] 202305
#### Tested branch (Please provide the tested image version)
<!--
- Please provide tested image version
- e.g.
- [x] 20201231.100
-->
- [ ] <!-- image version 1 -->
- [ ] <!-- image version 2 -->
#### Description for the changelog
<!--
Write a short (one line) summary that describes the changes in this
pull request for inclusion in the changelog:
-->
<!--
Ensure to add label/tag for the feature raised. example - PR#2174 under sonic-utilities repo. where, Generic Config and Update feature has been labelled as GCU.
-->
This PR is to add a symbol link to Mellanox-SN2700 HWSKUs.
#### Link to config_db schema for YANG module changes
<!--
Provide a link to config_db schema for the table for which YANG model
is defined
Link should point to correct section on https://github.com/Azure/sonic-buildimage/blob/master/src/sonic-yang-models/doc/Configuration.md
-->
No config_db change involved.
#### A picture of a cute animal (not mandatory but encouraged)
StormLiangMS
pushed a commit
that referenced
this pull request
Mar 23, 2026
…ncomplete scenarios (#22420) What is the motivation for this PR? To add 2 new test cases to check if all lldp neighbors exist and if all interfaces exists in lldpcli show interfaces. We don't have a test case to cover the issue we found in PR: sonic-net/sonic-buildimage#25436 #22562 cover some scenarios, but not all of them. So I removed the test case in #22562 and add 2 test cases with more checks in this PR. How did you do it? 1. test_lldp_interfaces Purpose: Verify LLDP functionality across all interfaces without config reload Key Features: Validates LLDP table completeness Verifies lldpcli interface discovery Checks lldpctl_facts consistency Validates chassis ID and capabilities Active syslog monitoring via loganalyzer Test Steps: Recording Phase: Capture all interfaces from show interface status LLDP Table Verification: Compare LLDP table with interface status (admin up, no PortChannels) lldpcli Verification: Compare lldpcli output with interface status (all interfaces, no PortChannels) lldpctl_facts Verification: Compare lldpctl_facts with interface status (admin up, no PortChannels) Consistency Check: Verify all lldpctl_facts interfaces exist in lldpcli Chassis Verification: Validate chassis MAC address and capabilities (Bridge: on, Router: on, Wlan: off, Station: off) 2. test_lldp_interface_config_reload Purpose: Verify LLDP functionality persists correctly after config reload Key Features: Tests LLDP recovery after config reload Validates interface persistence Ensures neighbor rediscovery Monitors for LLDP-specific errors while ignoring expected reload errors Addresses the core issue from GitHub [test gap] check lldp neighbors after config reload #22376 Test Steps: Pre-Reload Recording: Capture all interfaces before config reload Config Reload: Perform safe config reload with interface checks Stabilization Wait: Wait for critical services and LLDP convergence LLDP Table Verification: Compare LLDP table with pre-reload interfaces (admin up, no PortChannels) lldpcli Verification: Compare lldpcli output with pre-reload interfaces (all interfaces, no PortChannels) lldpctl_facts Verification: Compare lldpctl_facts with pre-reload interfaces (admin up, no PortChannels) Consistency Check: Verify all lldpctl_facts interfaces exist in lldpcli Chassis Verification: Validate chassis MAC and capabilities remain correct How did you verify/test it? run it on testbed. Signed-off-by: Zhaohui Sun <zhaohuisun@microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
vrajeshe
pushed a commit
to vrajeshe/sonic-mgmt
that referenced
this pull request
Mar 23, 2026
…ic-net#22562) What is the motivation for this PR? Add a new test case to verify LLDP neighbors are fully restored after config reload. Addresses test gap issue sonic-net#22376. Related fix PR: sonic-net/sonic-buildimage#25436 How did you do it? Added test_lldp_after_config_reload to tests/lldp/test_lldp.py that: 1. Records LLDP neighbors before config reload 2. Performs config reload (safe_reload) 3. Waits for LLDP neighbors to be restored 4. Verifies all neighbors present with matching names 5. Verifies Chassis ID type is MAC 6. Verifies Chassis MAC matches management interface MAC 7. Checks lldpcli show interfaces and syslog for errors How did you verify/test it? lldp/test_lldp.py::test_lldp_after_config_reload[vlab-01-None] PASSED 1 passed, 83 warnings in 221.39s (0:03:41) Tested on KVM testbed (T0, converged peers). Signed-off-by: Ying Xie <ying.xie@microsoft.com> Signed-off-by: Venkata Gouri Rajesh Etla <vrajeshe@cisco.com>
vrajeshe
pushed a commit
to vrajeshe/sonic-mgmt
that referenced
this pull request
Mar 23, 2026
…ncomplete scenarios (sonic-net#22420) What is the motivation for this PR? To add 2 new test cases to check if all lldp neighbors exist and if all interfaces exists in lldpcli show interfaces. We don't have a test case to cover the issue we found in PR: sonic-net/sonic-buildimage#25436 sonic-net#22562 cover some scenarios, but not all of them. So I removed the test case in sonic-net#22562 and add 2 test cases with more checks in this PR. How did you do it? 1. test_lldp_interfaces Purpose: Verify LLDP functionality across all interfaces without config reload Key Features: Validates LLDP table completeness Verifies lldpcli interface discovery Checks lldpctl_facts consistency Validates chassis ID and capabilities Active syslog monitoring via loganalyzer Test Steps: Recording Phase: Capture all interfaces from show interface status LLDP Table Verification: Compare LLDP table with interface status (admin up, no PortChannels) lldpcli Verification: Compare lldpcli output with interface status (all interfaces, no PortChannels) lldpctl_facts Verification: Compare lldpctl_facts with interface status (admin up, no PortChannels) Consistency Check: Verify all lldpctl_facts interfaces exist in lldpcli Chassis Verification: Validate chassis MAC address and capabilities (Bridge: on, Router: on, Wlan: off, Station: off) 2. test_lldp_interface_config_reload Purpose: Verify LLDP functionality persists correctly after config reload Key Features: Tests LLDP recovery after config reload Validates interface persistence Ensures neighbor rediscovery Monitors for LLDP-specific errors while ignoring expected reload errors Addresses the core issue from GitHub [test gap] check lldp neighbors after config reload sonic-net#22376 Test Steps: Pre-Reload Recording: Capture all interfaces before config reload Config Reload: Perform safe config reload with interface checks Stabilization Wait: Wait for critical services and LLDP convergence LLDP Table Verification: Compare LLDP table with pre-reload interfaces (admin up, no PortChannels) lldpcli Verification: Compare lldpcli output with pre-reload interfaces (all interfaces, no PortChannels) lldpctl_facts Verification: Compare lldpctl_facts with pre-reload interfaces (admin up, no PortChannels) Consistency Check: Verify all lldpctl_facts interfaces exist in lldpcli Chassis Verification: Validate chassis MAC and capabilities remain correct How did you verify/test it? run it on testbed. Signed-off-by: Zhaohui Sun <zhaohuisun@microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Venkata Gouri Rajesh Etla <vrajeshe@cisco.com>
selldinesh
pushed a commit
to selldinesh/sonic-mgmt
that referenced
this pull request
Apr 1, 2026
…ic-net#22562) What is the motivation for this PR? Add a new test case to verify LLDP neighbors are fully restored after config reload. Addresses test gap issue sonic-net#22376. Related fix PR: sonic-net/sonic-buildimage#25436 How did you do it? Added test_lldp_after_config_reload to tests/lldp/test_lldp.py that: 1. Records LLDP neighbors before config reload 2. Performs config reload (safe_reload) 3. Waits for LLDP neighbors to be restored 4. Verifies all neighbors present with matching names 5. Verifies Chassis ID type is MAC 6. Verifies Chassis MAC matches management interface MAC 7. Checks lldpcli show interfaces and syslog for errors How did you verify/test it? lldp/test_lldp.py::test_lldp_after_config_reload[vlab-01-None] PASSED 1 passed, 83 warnings in 221.39s (0:03:41) Tested on KVM testbed (T0, converged peers). Signed-off-by: Ying Xie <ying.xie@microsoft.com> Signed-off-by: selldinesh <dinesh.sellappan@keysight.com>
selldinesh
pushed a commit
to selldinesh/sonic-mgmt
that referenced
this pull request
Apr 1, 2026
…ncomplete scenarios (sonic-net#22420) What is the motivation for this PR? To add 2 new test cases to check if all lldp neighbors exist and if all interfaces exists in lldpcli show interfaces. We don't have a test case to cover the issue we found in PR: sonic-net/sonic-buildimage#25436 sonic-net#22562 cover some scenarios, but not all of them. So I removed the test case in sonic-net#22562 and add 2 test cases with more checks in this PR. How did you do it? 1. test_lldp_interfaces Purpose: Verify LLDP functionality across all interfaces without config reload Key Features: Validates LLDP table completeness Verifies lldpcli interface discovery Checks lldpctl_facts consistency Validates chassis ID and capabilities Active syslog monitoring via loganalyzer Test Steps: Recording Phase: Capture all interfaces from show interface status LLDP Table Verification: Compare LLDP table with interface status (admin up, no PortChannels) lldpcli Verification: Compare lldpcli output with interface status (all interfaces, no PortChannels) lldpctl_facts Verification: Compare lldpctl_facts with interface status (admin up, no PortChannels) Consistency Check: Verify all lldpctl_facts interfaces exist in lldpcli Chassis Verification: Validate chassis MAC address and capabilities (Bridge: on, Router: on, Wlan: off, Station: off) 2. test_lldp_interface_config_reload Purpose: Verify LLDP functionality persists correctly after config reload Key Features: Tests LLDP recovery after config reload Validates interface persistence Ensures neighbor rediscovery Monitors for LLDP-specific errors while ignoring expected reload errors Addresses the core issue from GitHub [test gap] check lldp neighbors after config reload sonic-net#22376 Test Steps: Pre-Reload Recording: Capture all interfaces before config reload Config Reload: Perform safe config reload with interface checks Stabilization Wait: Wait for critical services and LLDP convergence LLDP Table Verification: Compare LLDP table with pre-reload interfaces (admin up, no PortChannels) lldpcli Verification: Compare lldpcli output with pre-reload interfaces (all interfaces, no PortChannels) lldpctl_facts Verification: Compare lldpctl_facts with pre-reload interfaces (admin up, no PortChannels) Consistency Check: Verify all lldpctl_facts interfaces exist in lldpcli Chassis Verification: Validate chassis MAC and capabilities remain correct How did you verify/test it? run it on testbed. Signed-off-by: Zhaohui Sun <zhaohuisun@microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: selldinesh <dinesh.sellappan@keysight.com>
albertovillarreal-keys
pushed a commit
to albertovillarreal-keys/sonic-mgmt
that referenced
this pull request
Apr 3, 2026
…ic-net#22562) What is the motivation for this PR? Add a new test case to verify LLDP neighbors are fully restored after config reload. Addresses test gap issue sonic-net#22376. Related fix PR: sonic-net/sonic-buildimage#25436 How did you do it? Added test_lldp_after_config_reload to tests/lldp/test_lldp.py that: 1. Records LLDP neighbors before config reload 2. Performs config reload (safe_reload) 3. Waits for LLDP neighbors to be restored 4. Verifies all neighbors present with matching names 5. Verifies Chassis ID type is MAC 6. Verifies Chassis MAC matches management interface MAC 7. Checks lldpcli show interfaces and syslog for errors How did you verify/test it? lldp/test_lldp.py::test_lldp_after_config_reload[vlab-01-None] PASSED 1 passed, 83 warnings in 221.39s (0:03:41) Tested on KVM testbed (T0, converged peers). Signed-off-by: Ying Xie <ying.xie@microsoft.com>
albertovillarreal-keys
pushed a commit
to albertovillarreal-keys/sonic-mgmt
that referenced
this pull request
Apr 3, 2026
…ncomplete scenarios (sonic-net#22420) What is the motivation for this PR? To add 2 new test cases to check if all lldp neighbors exist and if all interfaces exists in lldpcli show interfaces. We don't have a test case to cover the issue we found in PR: sonic-net/sonic-buildimage#25436 sonic-net#22562 cover some scenarios, but not all of them. So I removed the test case in sonic-net#22562 and add 2 test cases with more checks in this PR. How did you do it? 1. test_lldp_interfaces Purpose: Verify LLDP functionality across all interfaces without config reload Key Features: Validates LLDP table completeness Verifies lldpcli interface discovery Checks lldpctl_facts consistency Validates chassis ID and capabilities Active syslog monitoring via loganalyzer Test Steps: Recording Phase: Capture all interfaces from show interface status LLDP Table Verification: Compare LLDP table with interface status (admin up, no PortChannels) lldpcli Verification: Compare lldpcli output with interface status (all interfaces, no PortChannels) lldpctl_facts Verification: Compare lldpctl_facts with interface status (admin up, no PortChannels) Consistency Check: Verify all lldpctl_facts interfaces exist in lldpcli Chassis Verification: Validate chassis MAC address and capabilities (Bridge: on, Router: on, Wlan: off, Station: off) 2. test_lldp_interface_config_reload Purpose: Verify LLDP functionality persists correctly after config reload Key Features: Tests LLDP recovery after config reload Validates interface persistence Ensures neighbor rediscovery Monitors for LLDP-specific errors while ignoring expected reload errors Addresses the core issue from GitHub [test gap] check lldp neighbors after config reload sonic-net#22376 Test Steps: Pre-Reload Recording: Capture all interfaces before config reload Config Reload: Perform safe config reload with interface checks Stabilization Wait: Wait for critical services and LLDP convergence LLDP Table Verification: Compare LLDP table with pre-reload interfaces (admin up, no PortChannels) lldpcli Verification: Compare lldpcli output with pre-reload interfaces (all interfaces, no PortChannels) lldpctl_facts Verification: Compare lldpctl_facts with pre-reload interfaces (admin up, no PortChannels) Consistency Check: Verify all lldpctl_facts interfaces exist in lldpcli Chassis Verification: Validate chassis MAC and capabilities remain correct How did you verify/test it? run it on testbed. Signed-off-by: Zhaohui Sun <zhaohuisun@microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
rraghav-cisco
pushed a commit
to rraghav-cisco/sonic-mgmt
that referenced
this pull request
Apr 20, 2026
…ic-net#22562) What is the motivation for this PR? Add a new test case to verify LLDP neighbors are fully restored after config reload. Addresses test gap issue sonic-net#22376. Related fix PR: sonic-net/sonic-buildimage#25436 How did you do it? Added test_lldp_after_config_reload to tests/lldp/test_lldp.py that: 1. Records LLDP neighbors before config reload 2. Performs config reload (safe_reload) 3. Waits for LLDP neighbors to be restored 4. Verifies all neighbors present with matching names 5. Verifies Chassis ID type is MAC 6. Verifies Chassis MAC matches management interface MAC 7. Checks lldpcli show interfaces and syslog for errors How did you verify/test it? lldp/test_lldp.py::test_lldp_after_config_reload[vlab-01-None] PASSED 1 passed, 83 warnings in 221.39s (0:03:41) Tested on KVM testbed (T0, converged peers). Signed-off-by: Ying Xie <ying.xie@microsoft.com> Signed-off-by: Raghavendran Ramanathan <rraghav@cisco.com>
rraghav-cisco
pushed a commit
to rraghav-cisco/sonic-mgmt
that referenced
this pull request
Apr 20, 2026
…ncomplete scenarios (sonic-net#22420) What is the motivation for this PR? To add 2 new test cases to check if all lldp neighbors exist and if all interfaces exists in lldpcli show interfaces. We don't have a test case to cover the issue we found in PR: sonic-net/sonic-buildimage#25436 sonic-net#22562 cover some scenarios, but not all of them. So I removed the test case in sonic-net#22562 and add 2 test cases with more checks in this PR. How did you do it? 1. test_lldp_interfaces Purpose: Verify LLDP functionality across all interfaces without config reload Key Features: Validates LLDP table completeness Verifies lldpcli interface discovery Checks lldpctl_facts consistency Validates chassis ID and capabilities Active syslog monitoring via loganalyzer Test Steps: Recording Phase: Capture all interfaces from show interface status LLDP Table Verification: Compare LLDP table with interface status (admin up, no PortChannels) lldpcli Verification: Compare lldpcli output with interface status (all interfaces, no PortChannels) lldpctl_facts Verification: Compare lldpctl_facts with interface status (admin up, no PortChannels) Consistency Check: Verify all lldpctl_facts interfaces exist in lldpcli Chassis Verification: Validate chassis MAC address and capabilities (Bridge: on, Router: on, Wlan: off, Station: off) 2. test_lldp_interface_config_reload Purpose: Verify LLDP functionality persists correctly after config reload Key Features: Tests LLDP recovery after config reload Validates interface persistence Ensures neighbor rediscovery Monitors for LLDP-specific errors while ignoring expected reload errors Addresses the core issue from GitHub [test gap] check lldp neighbors after config reload sonic-net#22376 Test Steps: Pre-Reload Recording: Capture all interfaces before config reload Config Reload: Perform safe config reload with interface checks Stabilization Wait: Wait for critical services and LLDP convergence LLDP Table Verification: Compare LLDP table with pre-reload interfaces (admin up, no PortChannels) lldpcli Verification: Compare lldpcli output with pre-reload interfaces (all interfaces, no PortChannels) lldpctl_facts Verification: Compare lldpctl_facts with pre-reload interfaces (admin up, no PortChannels) Consistency Check: Verify all lldpctl_facts interfaces exist in lldpcli Chassis Verification: Validate chassis MAC and capabilities remain correct How did you verify/test it? run it on testbed. Signed-off-by: Zhaohui Sun <zhaohuisun@microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Raghavendran Ramanathan <rraghav@cisco.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add a new test case
test_lldp_after_config_reloadto verify LLDP neighbors are fully restored after config reload.Addresses test gap issue #22376.
Related fix PR: sonic-net/sonic-buildimage#25436
What does this test verify?
config reload(safe_reload)lldpcli show interfaceslists all expected portscannot find port/ERR lldp#lldpmgrderrors (informational warning, not hard failure)Test result on KVM testbed (T0, converged peers)
Topology
Supports: t0, t1, t2, m0, mx, m1 (same as existing LLDP tests)