Skip to content

[advanced-reboot] Set timeout for reboot test to prevent hung tests #5365

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

Merged
merged 1 commit into from
Mar 22, 2022

Conversation

vaibhavhd
Copy link
Contributor

Description of PR

Summary: Run advanced-reboot PTF test using a thread which can be timedout and killed if the test gets hung.

Fixes # (issue)

Type of change

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

Back port request

  • 201911
  • 202012

Approach

What is the motivation for this PR?

Advanced-reboot testcases sometimes gets hung inside ptf.

This was earlier handled as part of #4532
Although PR 4532 sets a timeout for PTF test, the inbuilt --test-case-timeout interrupts the advanced-reboot test as expected, but sometimes that is not enough.
After the timeout interrupt, the test still proceeds to collect logs and analyze the pcap files.

In a unlikely event when the analysis logic is hung, the whole testcase stays hung indefinitely.

This PR fixes this testcase hung issue.

How did you do it?

Start a PTF test inside a thread, and timeout the thread and kill the test inside ptf container.

How did you verify/test it?

Executed on a physical testbed.

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

@vaibhavhd vaibhavhd merged commit e0bc49b into sonic-net:master Mar 22, 2022
@vaibhavhd vaibhavhd deleted the timeout-advanced-reboot branch March 22, 2022 15:47
wangxin pushed a commit that referenced this pull request Mar 25, 2022
…5365)

Advanced-reboot testcases sometimes gets hung inside ptf.

This was earlier handled as part of #4532
Although PR 4532 sets a timeout for PTF test, the inbuilt --test-case-timeout interrupts the advanced-reboot test as expected, but sometimes that is not enough.
After the timeout interrupt, the test still proceeds to collect logs and analyze the pcap files.
In an unlikely event when the analysis logic is hung, the whole testcase stays hung indefinitely.
This commit fixes this testcase hung issue.
xwjiang-ms pushed a commit to xwjiang-ms/sonic-mgmt that referenced this pull request Apr 13, 2022
…onic-net#5365)

Advanced-reboot testcases sometimes gets hung inside ptf.

This was earlier handled as part of sonic-net#4532
Although PR 4532 sets a timeout for PTF test, the inbuilt --test-case-timeout interrupts the advanced-reboot test as expected, but sometimes that is not enough.
After the timeout interrupt, the test still proceeds to collect logs and analyze the pcap files.
In an unlikely event when the analysis logic is hung, the whole testcase stays hung indefinitely.
This commit fixes this testcase hung issue.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants