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

Timeout tests based on CPU time, not wall clock time #1021

Merged
merged 16 commits into from Mar 22, 2021

Conversation

j-piecuch
Copy link
Collaborator

@j-piecuch j-piecuch commented Feb 24, 2021

util/cpulimit.py is a script that executes a given command and sends a SIGUSR1 signal to the specified process once the CPU time limit is reached. We use it to run QEMU with a CPU time limit.

The script needs the python-ptrace package, so the CI environment needs to be updated to include it.

@j-piecuch j-piecuch added the review please review this PR label Feb 24, 2021
expect_exact() uses a default timeout of 30 seconds.
@cahirwpz
Copy link
Owner

This solution seems to be quite convoluted. I wonder if QEmu patch wouldn't be well justified in here. I.e. add timeout to options, call setrlimit, handle SIGXCPU. If gdbserver is active then stop emulation, otherwise quit. What do you think?

@j-piecuch
Copy link
Collaborator Author

@cahirwpz I gave it a shot today, and I wasn't able to get it working.

@j-piecuch j-piecuch added proposal should we spend time on it? and removed review please review this PR labels Mar 2, 2021
@j-piecuch j-piecuch requested a review from cahirwpz March 20, 2021 10:43
@cahirwpz cahirwpz added accepted accepted by the maintainer for code review and removed proposal should we spend time on it? labels Mar 22, 2021
@cahirwpz cahirwpz merged commit aa49e76 into cahirwpz:master Mar 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted accepted by the maintainer for code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants