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
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If we change the window size after it has launched, gdb will receive a SIGWINCH signal, which can interrupt its attempt to connect to QEMU.
expect_exact() uses a default timeout of 30 seconds.
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? |
@cahirwpz I gave it a shot today, and I wasn't able to get it working. |
j-piecuch
added
proposal
should we spend time on it?
and removed
review
please review this PR
labels
Mar 2, 2021
- Catch SIGXCPU within qemu by patching it - Set CPU limit by using pexpect's preexec_fn, so we don't need a wrapper
cahirwpz
approved these changes
Mar 22, 2021
cahirwpz
added
accepted
accepted by the maintainer for code review
and removed
proposal
should we spend time on it?
labels
Mar 22, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.