-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Keep expected crash in misc test from producing a core dump #42990
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
Currently the test in `test/misc.jl` that tests that a particular kind of read fault crashes has two issues: 1. It works for the wrong reason. It's testing for `!success` when evaluating code interpolated directly into the `Cmd`, but it isn't quoting the code, so the subprocess fails with a syntax error instead of the type of crash the test is expecting. 2. On some platforms (such as our good ol' pal FreeBSD), this kind of read fault produces a core dump. This a bit annoying because it means that the repo state becomes dirty after running the tests and it may overwrite an existing core dump that was left behind by an earlier issue we'd like to diagnose. To fix these, we can wrap the code passed to the subprocess in single quotes and on Unix-like systems wrap the subprocess in `ulimit -c 0` to avoid producing a core dump.
ararslan
added
test
This change adds or pertains to unit tests
bugfix
This change fixes an existing bug
cmd
Relates to calling of external programs
labels
Nov 7, 2021
Can we backport this to 1.6 and 1.7? |
DilumAluthge
added
backport 1.6
Change should be backported to release-1.6
backport 1.7
ci
Continuous integration
labels
Nov 7, 2021
95 tasks
Sure. Should be a mostly non-functional change. |
Keno
approved these changes
Nov 8, 2021
KristofferC
pushed a commit
that referenced
this pull request
Nov 8, 2021
Currently the test in `test/misc.jl` that tests that a particular kind of read fault crashes has two issues: 1. It works for the wrong reason. It's testing for `!success` when evaluating code interpolated directly into the `Cmd`, but it isn't quoting the code, so the subprocess fails with a syntax error instead of the type of crash the test is expecting. 2. On some platforms (such as our good ol' pal FreeBSD), this kind of read fault produces a core dump. This a bit annoying because it means that the repo state becomes dirty after running the tests and it may overwrite an existing core dump that was left behind by an earlier issue we'd like to diagnose. To fix these, we can wrap the code passed to the subprocess in single quotes and on Unix-like systems wrap the subprocess in `ulimit -c 0` to avoid producing a core dump. (cherry picked from commit fa6dcb0)
66 tasks
Test does not exist on 1.6. |
LilithHafner
pushed a commit
to LilithHafner/julia
that referenced
this pull request
Feb 22, 2022
…g#42990) Currently the test in `test/misc.jl` that tests that a particular kind of read fault crashes has two issues: 1. It works for the wrong reason. It's testing for `!success` when evaluating code interpolated directly into the `Cmd`, but it isn't quoting the code, so the subprocess fails with a syntax error instead of the type of crash the test is expecting. 2. On some platforms (such as our good ol' pal FreeBSD), this kind of read fault produces a core dump. This a bit annoying because it means that the repo state becomes dirty after running the tests and it may overwrite an existing core dump that was left behind by an earlier issue we'd like to diagnose. To fix these, we can wrap the code passed to the subprocess in single quotes and on Unix-like systems wrap the subprocess in `ulimit -c 0` to avoid producing a core dump.
LilithHafner
pushed a commit
to LilithHafner/julia
that referenced
this pull request
Mar 8, 2022
…g#42990) Currently the test in `test/misc.jl` that tests that a particular kind of read fault crashes has two issues: 1. It works for the wrong reason. It's testing for `!success` when evaluating code interpolated directly into the `Cmd`, but it isn't quoting the code, so the subprocess fails with a syntax error instead of the type of crash the test is expecting. 2. On some platforms (such as our good ol' pal FreeBSD), this kind of read fault produces a core dump. This a bit annoying because it means that the repo state becomes dirty after running the tests and it may overwrite an existing core dump that was left behind by an earlier issue we'd like to diagnose. To fix these, we can wrap the code passed to the subprocess in single quotes and on Unix-like systems wrap the subprocess in `ulimit -c 0` to avoid producing a core dump.
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.
Currently the test in
test/misc.jl
that tests that a particular kind of read fault crashes has two issues:It works for the wrong reason. It's testing for
!success
when evaluating code interpolated directly into theCmd
, but it isn't quoting the code, so the subprocess fails with a syntax error instead of the type of crash the test is expecting.On some platforms (such as our good ol' pal FreeBSD), this kind of read fault produces a core dump. This a bit annoying because it means that the repo state becomes dirty after running the tests and it may overwrite an existing core dump that was left behind by an earlier issue we'd like to diagnose.
To fix these, we can wrap the code passed to the subprocess in single quotes and on Unix-like systems wrap the subprocess in
ulimit -c 0
to avoid producing a core dump.