[action] [PR:27442] [bmc][bmp]: Skip test_restart_bmp_docker on bmc topology - #1396
Merged
Merged
Conversation
### Description of PR
Summary:
Fixes #27441
`bmp/test_docker_restart.py::test_restart_bmp_docker` calls `asichost.restart_service("bmp")`, which runs `sudo systemctl start bmp`. On `bmc` topology the BMP service is not present, so this fails with `Failed to start bmp.service: Unit bmp.service not found.` (rc=5) instead of being skipped.
This PR skips the test on `bmc` topology using the `conditional_mark` plugin (no in-code changes to the test).
### Type of change
- [x] Bug fix
- [ ] Testbed and Framework(new/improvement)
- [ ] New Test case
- [ ] Skipped for non-supported platforms
- [ ] Test case improvement
### Back port request
- [ ] 202205
- [ ] 202305
- [ ] 202311
- [ ] 202405
- [ ] 202411
- [ ] 202505
- [ ] 202511
- [x] 202608
### Approach
#### What is the motivation for this PR?
The test hard-fails on `bmc` topology testbeds (e.g. `str4-Nokia-7220-Th6p-1-bmc` on `vms77-bmc-7220-1`), producing false negatives because the BMP service is not present there.
#### How did you do it?
Added a `conditional_mark` entry in `tests/common/plugins/conditional_mark/tests_mark_conditions.yaml` that skips `bmp/test_docker_restart.py::test_restart_bmp_docker` when `topo_type in ['bmc']`. This keeps the skip policy in the central conditions file and leaves the test body unchanged.
#### How did you verify/test it?
- Verified the YAML parses and the new key resolves to the expected skip condition.
- On a `bmc` topology, the test is marked skipped; on other topologies it runs as before.
#### Any platform specific information?
Skips on `bmc` topology.
#### Supported testbed topology if it's a new test case?
N/A — existing test.
### Documentation
N/A
Signed-off-by: Sonic Build Admin <sonicbld@microsoft.com>
Collaborator
Author
|
Original PR: sonic-net/sonic-mgmt#27442 |
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Collaborator
Author
|
/azp run |
1 similar comment
Collaborator
Author
|
/azp run |
|
Azure Pipelines: 1 pipeline(s) were filtered out due to trigger conditions. |
13 tasks
|
Azure Pipelines: 1 pipeline(s) were filtered out due to trigger conditions. |
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 of PR
Summary:
Fixes #27441
bmp/test_docker_restart.py::test_restart_bmp_dockercallsasichost.restart_service("bmp"), which runssudo systemctl start bmp. Onbmctopology the BMP service is not present, so this fails withFailed to start bmp.service: Unit bmp.service not found.(rc=5) instead of being skipped.This PR skips the test on
bmctopology using theconditional_markplugin (no in-code changes to the test).Type of change
Back port request
Approach
What is the motivation for this PR?
The test hard-fails on
bmctopology testbeds (e.g.str4-Nokia-7220-Th6p-1-bmconvms77-bmc-7220-1), producing false negatives because the BMP service is not present there.How did you do it?
Added a
conditional_markentry intests/common/plugins/conditional_mark/tests_mark_conditions.yamlthat skipsbmp/test_docker_restart.py::test_restart_bmp_dockerwhentopo_type in ['bmc']. This keeps the skip policy in the central conditions file and leaves the test body unchanged.How did you verify/test it?
bmctopology, the test is marked skipped; on other topologies it runs as before.Any platform specific information?
Skips on
bmctopology.Supported testbed topology if it's a new test case?
N/A — existing test.
Documentation
N/A
Signed-off-by: Sonic Build Admin sonicbld@microsoft.com