Bump golang runtime tests to Go 1.22.

- `go tool dist` was removed in favour of using `go run cmd/dist`.
- The tests in `test/` directory should be run normally using `go test`. See
  https://github.com/golang/go/commit/7a0799b2c0bdfaf745dbd8c74a3db2f3d238fd1b.

PiperOrigin-RevId: 631793797
This commit is contained in:
Ayush Ranjan
2024-05-08 07:34:23 -07:00
committed by gVisor bot
parent fd194f23cc
commit b9b626d061
8 changed files with 22 additions and 23 deletions
+2 -2
View File
@@ -518,7 +518,7 @@ steps:
- <<: *common
<<: *docker
label: ":golang: Go runtime tests"
command: make go1.20-runtime-tests RUNTIME_ARGS=--directfs
command: make go1.22-runtime-tests RUNTIME_ARGS=--directfs
parallelism: 10
agents:
<<: *platform_specific_agents
@@ -562,7 +562,7 @@ steps:
- <<: *common
<<: *docker
label: ":golang: Go runtime tests (goferfs)"
command: make go1.20-runtime-tests RUNTIME_ARGS=--directfs=false
command: make go1.22-runtime-tests RUNTIME_ARGS=--directfs=false
parallelism: 10
if: build.branch == "master"
agents:
-4
View File
@@ -1,4 +0,0 @@
FROM golang:1.20
# Compile the tests during build to save time during testing.
RUN ["go", "tool", "dist", "test", "-compile-only"]
+5
View File
@@ -0,0 +1,5 @@
FROM golang:1.22
# Compile the tests during build to save time during testing.
ENV GOROOT=/usr/local/go
RUN ["go", "run", "cmd/dist", "test", "-compile-only"]
+2 -2
View File
@@ -7,8 +7,8 @@ package(
)
runtime_test(
name = "go1.20",
exclude_file = "exclude/go1.20.csv",
name = "go1.22",
exclude_file = "exclude/go1.22.csv",
lang = "go",
shard_count = more_shards,
)
+1 -1
View File
@@ -28,7 +28,7 @@ Note: java runtime test take 1+ hours with 16 cores.
Language | Version | Running the test suite
-------- | ------- | ----------------------------------
Go | 1.20 | `make go1.20-runtime-tests`
Go | 1.22 | `make go1.22-runtime-tests`
Java | 17 | `make java17-runtime-tests`
NodeJS | 16.13.2 | `make nodejs16.13.2-runtime-tests`
Php | 8.1.1 | `make php8.1.1-runtime-tests`
-10
View File
@@ -1,10 +0,0 @@
test name,bug id,comment
cgo_errors,,FLAKY
cgo_test,,
go_test:cmd/go,,FLAKY
go_test:net,b/162473575,setsockopt: protocol not available.
go_test:os/signal,b/118780860,/dev/pts not properly supported. Also being tracked in b/29356795.
go_test:syscall,b/118781998,bad bytes -- bad mem addr; FcntlFlock(F_GETLK) not supported.
test:0_1,,FLAKY
testcarchive,b/118782924,FLAKY
testshared,,FLAKY
1 test name bug id comment
2 cgo_errors FLAKY
3 cgo_test
4 go_test:cmd/go FLAKY
5 go_test:net b/162473575 setsockopt: protocol not available.
6 go_test:os/signal b/118780860 /dev/pts not properly supported. Also being tracked in b/29356795.
7 go_test:syscall b/118781998 bad bytes -- bad mem addr; FcntlFlock(F_GETLK) not supported.
8 test:0_1 FLAKY
9 testcarchive b/118782924 FLAKY
10 testshared FLAKY
+9
View File
@@ -0,0 +1,9 @@
test name,bug id,comment
cmd/cgo/internal/testerrors,b/339191886,Too slow
cmd/cgo/internal/testsanitizers,b/339101787,
cmd/go,b/339179763,
cmd/internal/testdir:0_1,,tries to run ALL tests in 'test/' directory and times out
cmd/link,b/339311479,
cmd/link/internal/ld,b/339311479,
os/signal,b/339311315,
syscall,b/118781998,
1 test name bug id comment
2 cmd/cgo/internal/testerrors b/339191886 Too slow
3 cmd/cgo/internal/testsanitizers b/339101787
4 cmd/go b/339179763
5 cmd/internal/testdir:0_1 tries to run ALL tests in 'test/' directory and times out
6 cmd/link b/339311479
7 cmd/link/internal/ld b/339311479
8 os/signal b/339311315
9 syscall b/118781998
+3 -4
View File
@@ -46,7 +46,7 @@ var _ TestRunner = goRunner{}
// ListTests implements TestRunner.ListTests.
func (goRunner) ListTests() ([]string, error) {
// Go tool dist test tests.
args := []string{"tool", "dist", "test", "-list"}
args := []string{"run", "cmd/dist", "test", "-list"}
cmd := exec.Command("go", args...)
cmd.Stderr = os.Stderr
out, err := cmd.Output()
@@ -87,7 +87,7 @@ func (goRunner) TestCmds(tests []string) []*exec.Cmd {
var cmds []*exec.Cmd
if len(toolTests) > 0 {
cmd := exec.Command("go", "tool", "dist", "test", "-v", "-no-rebuild", "-run", strings.Join(toolTests, "|"))
cmd := exec.Command("go", "run", "cmd/dist", "test", "-v", "-no-rebuild", "-run", strings.Join(toolTests, "|"))
// Bump up timeout. Some go tool tests take more than 3 minutes to run.
// golang/go/src/cmd/dist/test.go:registerStdTest() sets default timeout to
// 3 minutes which can only be increased via GO_TEST_TIMEOUT_SCALE.
@@ -95,8 +95,7 @@ func (goRunner) TestCmds(tests []string) []*exec.Cmd {
cmds = append(cmds, cmd)
}
if len(onDiskTests) > 0 {
cmd := exec.Command("go", append([]string{"run", "run.go", "-v", "--"}, onDiskTests...)...)
cmd.Dir = goTestDir
cmd := exec.Command("go", []string{"test", "cmd/internal/testdir", fmt.Sprintf("-run='Test/(%s)'", strings.Join(onDiskTests, "|"))}...)
cmds = append(cmds, cmd)
}