commit | dfd7e92aa331f2d584bfefaab2d0432a1bb8c91d | [log] [tgz] |
---|---|---|
author | Nicolas Hillegeer <aktau@google.com> | Thu Oct 10 14:29:44 2024 -0700 |
committer | Gopher Robot <gobot@golang.org> | Fri Oct 11 14:49:41 2024 +0000 |
tree | bf43890a4c6c181608fcff8a03eb8fb977409b18 | |
parent | 5a189bc297f7bfd286854af560f3b82c4e81bd20 [diff] |
internal/gocore/test: increase rlimit to max in parent In our CI system, RLIMIT_CORE's maximum value is not `unlimited`. So `setrlimit(RLIMIT_CORE, {...RLIM_INFINITY})` fails. Instead set it to the maximum and ensure that it's not 0. A core file, even if truncated, should get created. Additionally, move the rlimit increase to the parent instead of the child. This makes it easier to add more test binaries without duplicating code. To make this stick, wrap the spawn with `(Un)LockOSThread`. The new `run()` function returns a PID, which isn't necessary here, but is useful in case `/proc/sys/kernel/core_pattern` contains format modifiers like %p, as happens in our CI. Change-Id: Ied3533e0910dde2df888e50ca88c607ef33afacc Reviewed-on: https://go-review.googlesource.com/c/debug/+/619555 Auto-Submit: Nicolas Hillegeer <aktau@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Knyszek <mknyszek@google.com>
This repository holds utilities and libraries for debugging Go programs.
WARNING! Please expect breaking changes and unstable APIs. Most of them are currently are at an early, experimental stage.
This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://golang.org/doc/contribute.html.
The main issue tracker for the debug repository is located at https://github.com/golang/go/issues. Prefix your issue with “x/debug:” in the subject line, so it is easy to find.