Skip to content

Exit tests shouldn't emit crash logs. #670

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

Merged
merged 3 commits into from
Sep 6, 2024

Conversation

grynspan
Copy link
Contributor

@grynspan grynspan commented Sep 6, 2024

When a process crashes, the platforms we support all write a crash log (or core, or error report) to disk. This is not necessary for exit test child processes (since we intentionally crash them.)

This PR suppresses generation of those logs from within an exit test:

  • On Darwin, we disable the exception port for crash report files;
  • On Linux, we set the maximum core dump size to zero bytes; and
  • On Windows, we disable Windows Error Reporting.

The above effects are only applied to the exit test's child process, not to the parent test process nor the system as a whole.

Checklist:

  • Code and documentation should follow the style of the Style Guide.
  • If public symbols are renamed or modified, DocC references should be updated.

When a process crashes, the platforms we support all write a crash log (or core,
or error report) to disk. This is not necessary for exit test child processes
(since we intentionally crash them.)

This PR suppresses generation of those logs from within an exit test:

- On Darwin, we disable the exception port for crash report files;
- On Linux, we set the maximum core dump size to zero bytes; and
- On Windows, we disable Windows Error Reporting.

The above effects are only applied to the exit test's child process, not to the
parent test process nor the system as a whole.
@grynspan grynspan added enhancement New feature or request windows 🪟 Windows support linux 🐧 Linux support (all distros) darwin 🍎 macOS, iOS, watchOS, tvOS, and visionOS support performance 🏎️ Performance issues swift-6.1 exit-tests ☠️ Work related to exit tests labels Sep 6, 2024
@grynspan grynspan self-assigned this Sep 6, 2024
@grynspan
Copy link
Contributor Author

grynspan commented Sep 6, 2024

@swift-ci test

@grynspan
Copy link
Contributor Author

grynspan commented Sep 6, 2024

@swift-ci test

@grynspan grynspan requested a review from briancroom September 6, 2024 21:07
@grynspan
Copy link
Contributor Author

grynspan commented Sep 6, 2024

@swift-ci test

@grynspan grynspan merged commit c120149 into main Sep 6, 2024
3 checks passed
@grynspan grynspan deleted the jgrynspan/call-posix_spawnattr_setexceptionports_np branch September 6, 2024 22:48
@grynspan grynspan added this to the Swift 6.1 milestone Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
darwin 🍎 macOS, iOS, watchOS, tvOS, and visionOS support enhancement New feature or request exit-tests ☠️ Work related to exit tests linux 🐧 Linux support (all distros) performance 🏎️ Performance issues windows 🪟 Windows support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants