cmd/go/internal/verylongtest: check MustHaveGoBuild in TestGoBuildUmask

Change-Id: Ic67663e10d47b2bf788ecfb60587bf476a6a6964
Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-noopt
Reviewed-on: https://go-review.googlesource.com/c/go/+/755700
Auto-Submit: Michael Matloob <matloob@google.com>
TryBot-Bypass: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Michael Matloob <matloob@google.com>
This commit is contained in:
Michael Matloob
2026-03-16 16:11:04 -04:00
committed by Gopher Robot
parent c697e0fc48
commit 0888303b2f

View File

@@ -20,6 +20,8 @@ import (
)
func TestGoBuildUmask(t *testing.T) {
testenv.MustHaveGoBuild(t)
// Do not use tg.parallel; avoid other tests seeing umask manipulation.
mask := syscall.Umask(0077) // prohibit low bits
defer syscall.Umask(mask)
@@ -83,6 +85,7 @@ func TestTestInterrupt(t *testing.T) {
if testing.Short() {
t.Skipf("skipping in short mode: test executes many subprocesses")
}
testenv.MustHaveGoBuild(t)
// Don't run this test in parallel, for the same reason.
gotool, err := testenv.GoTool()