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

sanitycheck: fix FileNotFoundError #30277

Conversation

wangnuannuan
Copy link
Collaborator

When platform is nsim_hs_smp, if testcase timeout, the sanitycheck may not be able to find mdb.pid

#30276

Signed-off-by: Jingru Wang [email protected]

@wangnuannuan wangnuannuan requested a review from nashif as a code owner November 27, 2020 08:36
@github-actions github-actions bot added the area: Sanitycheck Sanitycheck has been renamed to Twister label Nov 27, 2020
@wangnuannuan wangnuannuan force-pushed the jingru-fix-FileNotFoundError branch from 142b159 to 5ce47ff Compare November 27, 2020 08:41
os.kill(pid, signal.SIGTERM)
except ProcessLookupError:
pass
if os.path.exists(self.pid_fn):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

put both in one single if statement.

When platform is nsim_hs_smp, if testcase timeout, the sanitycheck
may not be able to find mdb.pid

Signed-off-by: Jingru Wang <[email protected]>
@wangnuannuan wangnuannuan force-pushed the jingru-fix-FileNotFoundError branch from 5ce47ff to 16e8df8 Compare November 27, 2020 13:53
Copy link
Collaborator

@abrodkin abrodkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First of all it looks like it might be at attempt to fix the same problem as here #30301. And from @evgeniy-paltsev explanation I'd say it's quite a reverse situation: not test time-outs and then we cannot find a PID of some process, but we execute a test that fast that child process' PID is no longer available.

Anyways that kind of justification makes IMHO no sense:

if testcase timeout, the sanitycheck may not be able to find mdb.pid

What we want to see is analysis of what was wrong in the first place and only then suggest a fix for the real root cause. Otherwise we're trying to cure a symptom which most probably will hide the real problem deeper and it will inevitably hit us later but at a larger scale.

@nashif nashif added area: Twister Twister and removed area: Sanitycheck Sanitycheck has been renamed to Twister labels Jan 11, 2021
@nashif
Copy link
Member

nashif commented Feb 2, 2021

stale

@nashif nashif closed this Feb 2, 2021
@wangnuannuan wangnuannuan deleted the jingru-fix-FileNotFoundError branch May 31, 2021 09:24
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.

3 participants