Fixed bug with reboot history queue that was causing false failures #5056
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
Fixed bug with reboot history queue that was causing false failures
Components touched:
List of changes:
Summary:
This change fixes a bug with the way the reboot_history_queue is maintained by the test framework. When a test fails, prior to this bug fix the latest reboot cause would not be added to the test framework's history queue, whereas it would be added to the reboot queue of the DUT. This would cause a mismatch in comparison of these two queues for subsequent tests, which would be marked as having failed even if the test in question actually passed.
Type of change
Back port request
Approach
This bug is fixed by syncing these two queues prior to calling the reboot function, which ensures that the queues are identical prior to comparison. The sync function also has retry logic to account for delays in the StateDB coming back up, which mitigate show_and_parse errors.
How did you verify/test it?
The change is verified by running the reboot test on a DUT that has a different issue that would cause a specific type of reboot test to fail, and then ensuring that subsequent tests run successfully and pass.
Signed-off-by: Ashwin Srinivasan ashwin.srinivasan@microsoft.com