-
Notifications
You must be signed in to change notification settings - Fork 20
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
Add SIGINT handling #497
Merged
Merged
Add SIGINT handling #497
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
oetr
force-pushed
the
FUZZ-525_graceful_shutdown_on_ctrl_c
branch
4 times, most recently
from
July 7, 2023 18:03
177f2b5
to
ac5183b
Compare
oetr
force-pushed
the
FUZZ-525_graceful_shutdown_on_ctrl_c
branch
from
July 7, 2023 19:41
ac5183b
to
3328b13
Compare
The FuzzTestBuilder previously used for testing bug detectors has turned out to be quite useful for other tests. Here we move it into the "tests/" directory so that it can be used by all tests who wish to run fuzz tests in dedicated processes.
In async mode, we can register a callback directly in Node. In sync mode, the event loop is blocked until the fuzzing process has finished. Hence, we register the callback for SIGINT directly in our native addon.
bertschneider
force-pushed
the
FUZZ-525_graceful_shutdown_on_ctrl_c
branch
from
July 11, 2023 09:00
3328b13
to
f75fc01
Compare
Signal handling in Node.js on Windows is only rudimentary supported. Specifically using `process.kill`, like the test does to interrupt itself, will unconditionally terminate the process. The signal processing works in manual tests, though.
bertschneider
force-pushed
the
FUZZ-525_graceful_shutdown_on_ctrl_c
branch
from
July 12, 2023 12:23
cc322de
to
35295be
Compare
bertschneider
changed the title
Add SIGINT handling on Linux and macOS
Add SIGINT handling
Jul 12, 2023
br-lewis
approved these changes
Jul 12, 2023
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.
This PR allows the fuzzer to gracefully shut down after the user has pressed CTRL-C. The coverage reports, sync/async suggestions, and registered custom hooks will be printed just like they should be after a regular shut down.