[advance-reboot] Restore fast-reboot script inside DUT after negative test#4198
Merged
vaibhavhd merged 1 commit intosonic-net:masterfrom Sep 9, 2021
Merged
[advance-reboot] Restore fast-reboot script inside DUT after negative test#4198vaibhavhd merged 1 commit intosonic-net:masterfrom
vaibhavhd merged 1 commit intosonic-net:masterfrom
Conversation
|
This pull request fixes 1 alert when merging ad992c2 into 768b672 - view on LGTM.com fixed alerts:
|
yxieca
reviewed
Sep 8, 2021
yxieca
approved these changes
Sep 8, 2021
Contributor
Author
|
/Azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
vmittal-msft
pushed a commit
to vmittal-msft/sonic-mgmt
that referenced
this pull request
Sep 28, 2021
…negative test (sonic-net#4198) Fix the restoration logic for fastboot and warmboot scripts after the negative cases modify them. Warmboot SAD cases are failing in the nightly regression testing but not locally. This is caused by tests that precede the sad cases - test_cancelled_warm_reboot has incorrect restoration of reboot scripts inside DUT after negative cases modify the scripts. Since the variable inside the inner function is not visible to the outer function, use function attribute for the shared variables. With this approach, the outer function can access the variable using inner function's name.
kazinator-arista
pushed a commit
to kazinator-arista/sonic-mgmt
that referenced
this pull request
Mar 4, 2026
…lly (#25384) #### Why I did it src/sonic-swss ``` * 1339028c - (HEAD -> 202511, origin/202511) [vnet/vxlan]: Handle SAI failures without crashing swss (sonic-net#4188) (28 hours ago) [mssonicbld] * 8799eac7 - [DASH] Validate ca to pa SAI attributes (sonic-net#4202) (32 hours ago) [mssonicbld] * 5db5395e - [tests]: Update SRv6 test cases to use static SID configuration CLI (sonic-net#4198) (34 hours ago) [Carmine Scarpitta] ``` #### How I did it #### How to verify it #### Description for the changelog
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: Fix the restoration logic for fastboot and warmboot scripts after the negative cases modify them. Negative testcases are
test_cancelled_fast_rebootandtest_cancelled_warm_reboot.Fixes # (issue)
Type of change
Back port request
Approach
What is the motivation for this PR?
Warmboot SAD cases are failing in the nightly regression testing but not locally. This is caused by tests that precede the sad cases -
test_cancelled_warm_reboothas incorrect restoration of reboot scripts inside DUT after negative cases modify the scripts.The error in SAD cases:
How did you do it?
Since the variable inside the inner function is not visible to the outer function, use function attribute for the shared variables. With this approach, the outer function can access the variable using inner function's name.
How did you verify/test it?
Executed a negative test (
test_cancelled_warm_reboot), and script was modified during the test, and restored successfully after the test.Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation