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

x/build: run a non-root Linux builder #10719

Open
bradfitz opened this issue May 6, 2015 · 6 comments
Open

x/build: run a non-root Linux builder #10719

bradfitz opened this issue May 6, 2015 · 6 comments
Labels
Builders x/build issues (builders, bots, dashboards) FeatureRequest new-builder
Milestone

Comments

@bradfitz
Copy link
Contributor

bradfitz commented May 6, 2015

We should run at least non-root Linux builder to catch tests which accidentally require root.

(but we shouldn't run all builders as non-root, else we'll miss things assuming non-root)

Perhaps we make some existing weird builder also have this role, like linux-386-387, to not add resources or columns. We could rename it to 386-387noroot if we wanted?

/cc @minux @adg @crawshaw

@bradfitz
Copy link
Contributor Author

bradfitz commented May 6, 2015

And @davecheney

@ianlancetaylor ianlancetaylor added this to the Unreleased milestone Jun 3, 2015
@rsc rsc added the Builders x/build issues (builders, bots, dashboards) label Jun 11, 2015
@bcmills
Copy link
Contributor

bcmills commented Nov 12, 2019

We should run at least [one] non-root Linux builder to catch tests which accidentally require root.

We should specifically run at least one non-root Linux TryBot, and at least one non-root longtest builder (but probably also at least one root longtest builder, since long tests may also be sensitive to whether the user is root).

CC @dmitshur @toothrot @cagedmantis

@bcmills
Copy link
Contributor

bcmills commented Nov 12, 2019

Specifically, having ~all of the linux builders running as root causes us to skip (or fail to get adequate coverage for) any test that depends on making files or directories unwritable (as in #30316).

@gopherbot
Copy link

Change https://golang.org/cl/328771 mentions this issue: cmd/internal/moddeps: use a temporary directory for GOMODCACHE if needed

gopherbot pushed a commit that referenced this issue Jun 21, 2021
CL 328770 should be sufficient to fix the specific failure in the
report, but when attempting to reproduce it I noticed a related
failure mode, triggered by the environment variables set in
src/run.bash.

The failure mode is currently masked on the Go project builders due to
the lack of any 'longtest' builder running as a non-root user
(#10719).

It is also masked from Go contributors running 'run.bash' locally
because 'run.bash' does not actually run all of the tests unless
GO_TEST_SHORT=0 is set in the environment (#29266, #46054).

Fixes #46695

Change-Id: I272c09dae462734590dce59b3d3c5b6d3f733c92
Reviewed-on: https://go-review.googlesource.com/c/go/+/328771
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
@gopherbot
Copy link

Change https://go.dev/cl/496155 mentions this issue: cmd/gofmt: fix a data race in TestPermissions

gopherbot pushed a commit that referenced this issue May 18, 2023
The asynchronous call to processFile is synchronized by the call to
GetExitCode. We can't safely access errBuf until then, because
processFile may still be writing to it.

This is diagnosed by 'go test -race cmd/gofmt', but only the
darwin-amd64-race builder caught it because the other "-race" builders
apparently all run as root (see #10719).

Updates #60225.

Change-Id: Ie66bb4e47429ece81043d6425f26953b7bb26002
Reviewed-on: https://go-review.googlesource.com/c/go/+/496155
Auto-Submit: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
@gopherbot
Copy link

Change https://go.dev/cl/513779 mentions this issue: syscall, cmd/cgo: skip tests that shouldn't run under 'unshare -n -r'

gopherbot pushed a commit that referenced this issue Jul 28, 2023
A small number of tests in the main tree are currently skipped in LUCI
because our builders there run tests without root. Unfortunately, these
tests begin to run when run under 'unshare -n -r' as implemented in
the current iteration of a no-network check. Add targeted builder-only
skips so that they don't begin to run and fail with a false positive.

Updates #10719.
For #30612.

Change-Id: I6dd320714a279c395882c1b2ebfbb2fce58f913b
Reviewed-on: https://go-review.googlesource.com/c/go/+/513779
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Builders x/build issues (builders, bots, dashboards) FeatureRequest new-builder
Projects
Status: Planned
Development

No branches or pull requests

7 participants