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

Remove hardcode sleeps in dpdksuite.py #1635

Open
squirrelsc opened this issue Nov 19, 2021 · 4 comments
Open

Remove hardcode sleeps in dpdksuite.py #1635

squirrelsc opened this issue Nov 19, 2021 · 4 comments
Assignees

Comments

@squirrelsc
Copy link
Member

There are three hardcode sleep 10 or 15 seconds. Please use a timout loop to detect the behavior. Not use the hard code big sleep number.

@mcgov
Copy link
Collaborator

mcgov commented Feb 15, 2022

I think we removed these, there's a rewritten timeout function that runs dpdk for 10 seconds, this is required since testpmd will just continue to run until you kill it with SIGINT. Can you check

def run_for_n_seconds(self, cmd: str, timeout: int) -> str:
and take a look?

@mcgov
Copy link
Collaborator

mcgov commented Feb 15, 2022

There's another use of the function at

return (testkit, testkit.testpmd.run_for_n_seconds(cmd, seconds))

in the wrapper we use to run testpmd concurrently on nodes.

@squirrelsc
Copy link
Member Author

It's ok to have them in a command like "timeout 10; ...". But below pattern is not encouraged, which is easy to misuse.

time.sleep(10) # run testpmd for a bit before disabling sriov

@LiliDeng
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants