Skip to content

Commit d8c7527

Browse files
dmitshurgopherbot
authored andcommitted
cmd/dist: update isUnsupportedVMASize test skip
The dist test name changed from "race" to "flag:race", "net:race", "os:race" and so on in CL 496181, we missed that this skip was checking the exact dist test name, and no builder reported a problem despite the skip becoming inactive. I considered deleting it as obsolete, but it may still be helpful if someone runs race.bash on a linux/arm64 machine configured with something other than the supported 48-bit VMA. So for now apply a simple change to restore the existing skip. Hopefully one day there will be a good way to check for unsupported VMA size and disable the race detector conditionally instead of relying on tests running, failing, and getting marked as skipped in cmd/dist. For #29948. For #37486. Change-Id: I8af6862c92fb0ee538ab27327d43c50921bd1873 Reviewed-on: https://go-review.googlesource.com/c/go/+/512116 Reviewed-by: Dmitri Shuralyov <[email protected]> Reviewed-by: Cherry Mui <[email protected]> Auto-Submit: Dmitri Shuralyov <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Run-TryBot: Dmitri Shuralyov <[email protected]> Reviewed-by: Austin Clements <[email protected]>
1 parent ad90eef commit d8c7527

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/cmd/dist/test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -1528,7 +1528,7 @@ func (t *tester) makeGOROOTUnwritable() (undo func()) {
15281528
// internal/platform.RaceDetectorSupported, which can't be used here
15291529
// because cmd/dist can not import internal packages during bootstrap.
15301530
// The race detector only supports 48-bit VMA on arm64. But we don't have
1531-
// a good solution to check VMA size(See https://golang.org/issue/29948)
1531+
// a good solution to check VMA size (see https://go.dev/issue/29948).
15321532
// raceDetectorSupported will always return true for arm64. But race
15331533
// detector tests may abort on non 48-bit VMA configuration, the tests
15341534
// will be marked as "skipped" in this case.
@@ -1637,10 +1637,10 @@ func buildModeSupported(compiler, buildmode, goos, goarch string) bool {
16371637

16381638
// isUnsupportedVMASize reports whether the failure is caused by an unsupported
16391639
// VMA for the race detector (for example, running the race detector on an
1640-
// arm64 machine configured with 39-bit VMA)
1640+
// arm64 machine configured with 39-bit VMA).
16411641
func isUnsupportedVMASize(w *work) bool {
16421642
unsupportedVMA := []byte("unsupported VMA range")
1643-
return w.dt.name == "race" && bytes.Contains(w.out.Bytes(), unsupportedVMA)
1643+
return strings.Contains(w.dt.name, ":race") && bytes.Contains(w.out.Bytes(), unsupportedVMA)
16441644
}
16451645

16461646
// isEnvSet reports whether the environment variable evar is

0 commit comments

Comments
 (0)