Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed bug with reboot history queue that was causing false failures #5056

Merged
merged 2 commits into from
Feb 1, 2022
Merged

Fixed bug with reboot history queue that was causing false failures #5056

merged 2 commits into from
Feb 1, 2022

Conversation

assrinivasan
Copy link
Contributor

Description of PR

Fixed bug with reboot history queue that was causing false failures

Components touched:

  • common/reboot.py
  • platform_tests/test_reboot.py

List of changes:

  • Added DUT/Internal queue sync function to common/reboot.py
  • Increased wait_until timeout 30s to account for the possibility of show_and_parse failures

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

  • [X ] Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Back port request

  • 201911

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

    Components touched:

            * common/reboot.py
            * platform_tests/test_reboot.py

    List of changes:

            * Added DUT/Internal queue sync function to common/reboot.py
            * Increased wait_until timeout 30s to account for the
	      possibility of show_and_parse failures

    Signed-off-by: Ashwin Srinivasan ashwin.srinivasan@microsoft.com
@assrinivasan assrinivasan self-assigned this Jan 31, 2022
@assrinivasan assrinivasan requested a review from a team as a code owner January 31, 2022 21:37
@assrinivasan assrinivasan removed the request for review from a team January 31, 2022 21:37
sujinmkang
sujinmkang previously approved these changes Jan 31, 2022
@lgtm-com
Copy link

lgtm-com bot commented Jan 31, 2022

This pull request introduces 1 alert when merging d0adb08 into b36f7db - view on LGTM.com

new alerts:

  • 1 for Unused local variable

@sujinmkang sujinmkang merged commit e4fe46f into sonic-net:master Feb 1, 2022
@assrinivasan assrinivasan deleted the test_reboot_history_bug branch February 2, 2022 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants