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

bpo-30107: don't dump core on expected test_io crash #1235

Merged
merged 1 commit into from
Apr 21, 2017
Merged

bpo-30107: don't dump core on expected test_io crash #1235

merged 1 commit into from
Apr 21, 2017

Conversation

vstinner
Copy link
Member

test_io has two unit tests which trigger a deadlock:

  • test_daemon_threads_shutdown_stdout_deadlock()
  • test_daemon_threads_shutdown_stderr_deadlock()

These tests call Py_FatalError() if the expected bug is triggered
which calls abort(). Use test.support.SuppressCrashReport to prevent
the creation on a core dump, to fix the warning:

Warning -- files was modified by test_io
Before: []
After: ['python.core']

@vstinner vstinner added the tests Tests in the Lib/test dir label Apr 21, 2017
@mention-bot
Copy link

@Haypo, thanks for your PR! By analyzing the history of the files in this pull request, we identified @benjaminp, @ezio-melotti and @serhiy-storchaka to be potential reviewers.

test_io has two unit tests which trigger a deadlock:

* test_daemon_threads_shutdown_stdout_deadlock()
* test_daemon_threads_shutdown_stderr_deadlock()

These tests call Py_FatalError() if the expected bug is triggered
which calls abort(). Use test.support.SuppressCrashReport to prevent
the creation on a core dump, to fix the warning:

Warning -- files was modified by test_io
  Before: []
  After:  ['python.core']
@vstinner
Copy link
Member Author

(oops, i pushed a minor change to remove an empty line :-))

@vstinner vstinner merged commit 2a1aed0 into python:master Apr 21, 2017
@vstinner vstinner deleted the test_io_crash branch April 21, 2017 15:59
@vstinner
Copy link
Member Author

Backport 3.6: #1241

vstinner added a commit that referenced this pull request Apr 21, 2017
test_io has two unit tests which trigger a deadlock:

* test_daemon_threads_shutdown_stdout_deadlock()
* test_daemon_threads_shutdown_stderr_deadlock()

These tests call Py_FatalError() if the expected bug is triggered
which calls abort(). Use test.support.SuppressCrashReport to prevent
the creation on a core dump, to fix the warning:

Warning -- files was modified by test_io
  Before: []
  After:  ['python.core']
(cherry picked from commit 2a1aed0)
vstinner added a commit that referenced this pull request Apr 28, 2017
…1344)

* bpo-30107: Make SuppressCrashReport quiet on macOS (#1279) (#1335)

On macOS, SuppressCrashReport now redirects /usr/bin/defaults command
stderr into a pipe to not pollute stderr. It fixes a
test_io.test_daemon_threads_shutdown_stderr_deadlock() failure when
the CrashReporter domain doesn't exists. Message logged into stderr:

2017-04-24 16:57:21.432 defaults[41046:2462851]
The domain/default pair of (com.apple.CrashReporter, DialogType) does not exist
(cherry picked from commit d819ad9)

* bpo-30107: don't dump core on expected test_io crash (#1235)

test_io has two unit tests which trigger a deadlock:

* test_daemon_threads_shutdown_stdout_deadlock()
* test_daemon_threads_shutdown_stderr_deadlock()

These tests call Py_FatalError() if the expected bug is triggered
which calls abort(). Use test.support.SuppressCrashReport to prevent
the creation on a core dump, to fix the warning:

Warning -- files was modified by test_io
  Before: []
  After:  ['python.core']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants