Go version
1.26.1 linux-amd64
Output of go env in your module/workspace:
AR='ar'
CC='gcc'
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_ENABLED='1'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
CXX='g++'
GCCGO='gccgo'
GO111MODULE=''
GOAMD64='v1'
GOARCH='amd64'
GOAUTH='netrc'
GOBIN=''
GOCACHE='/home/jakub/.cache/go-build'
GOCACHEPROG=''
GODEBUG=''
GOENV='/home/jakub/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFIPS140='off'
GOFLAGS=''
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build227149699=/tmp/go-build -gno-record-gcc-switches'
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMOD='/home/jakub/Repos/hello/go.mod'
GOMODCACHE='/home/jakub/go/pkg/mod'
GONOPROXY='internal.company'
GONOSUMDB='internal.company'
GOOS='linux'
GOPATH='/home/jakub/go'
GOPRIVATE='internal.company'
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/local/go'
GOSUMDB='sum.golang.org'
GOTELEMETRY='local'
GOTELEMETRYDIR='/home/jakub/.config/go/telemetry'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/local/go/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.26.1'
GOWORK=''
PKG_CONFIG='pkg-config'
What did you do?
- Install go1.26.1
- Update go version in go.mod
- Run
go mod tidy
- Run
go test ./... -count=1
There should be at least a few packages to run tests for all of them at once. But packages can be very simple. It happens only for some people. In my organization some people have this problem and some don't.
Example of packages that failed:
package utils
func IsEven(n int) bool {
return n%2 == 0
}
func IsOdd(n int) bool {
return n%2 != 0
}
func Max(a, b int) int {
if a > b {
return a
}
return b
}
const Version = "1.0.0"
package utils
import (
"testing"
"github.com/stretchr/testify/assert"
)
func Test_IsEven(t *testing.T) {
assert.True(t, IsEven(4), "4 should be even")
assert.False(t, IsEven(3), "3 should not be even")
}
func Test_IsOdd(t *testing.T) {
assert.True(t, IsOdd(3), "3 should be odd")
assert.False(t, IsOdd(4), "4 should not be odd")
}
func Test_Max(t *testing.T) {
assert.Equal(t, 5, Max(3, 5), "Max should return 5")
}
or
package calc
func Square(n int) int {
return n * n
}
func Cube(n int) int {
return n * n * n
}
func Abs(n int) int {
if n < 0 {
return -n
}
return n
}
const DefaultBase = 10
package calc
import (
"testing"
"github.com/stretchr/testify/assert"
)
func Test_Square(t *testing.T) {
assert.Equal(t, 9, Square(3), "Square of 3 should be 9")
}
func Test_Cube(t *testing.T) {
assert.Equal(t, 27, Cube(3), "Cube of 3 should be 27")
}
func Test_Abs(t *testing.T) {
assert.Equal(t, 5, Abs(-5), "Abs of -5 should be 5")
}
What did you see happen?
Most test packages fail with "signal: killed":
- example/hello passes
- example/hello/calc: FAIL (signal: killed)
- example/hello/converters: FAIL (signal: killed)
- example/hello/formatters: FAIL (signal: killed)
- example/hello/helpers: FAIL (signal: killed)
- example/hello/math: FAIL (signal: killed)
- example/hello/parsers: FAIL (signal: killed)
- example/hello/processors: FAIL (signal: killed)
- example/hello/strings: FAIL (signal: killed)
- example/hello/utils: FAIL (signal: killed)
- example/hello/validators passes
Differences between versions:
jakub@JS-DTP0661:~/Repos/hello$ go version
go version go1.25.7 linux/amd64
jakub@JS-DTP0661:~/Repos/hello$ go test ./... -count=1
ok example/hello 0.306s
ok example/hello/calc 0.486s
ok example/hello/converters 0.719s
ok example/hello/formatters 0.483s
ok example/hello/helpers 0.306s
ok example/hello/math 0.478s
ok example/hello/parsers 0.719s
ok example/hello/processors 0.719s
ok example/hello/strings 0.720s
ok example/hello/utils 0.719s
ok example/hello/validators 0.481s
jakub@JS-DTP0661:~/Repos/hello$ go version
go version go1.26.1 linux/amd64
jakub@JS-DTP0661:~/Repos/hello$ go mod tidy
jakub@JS-DTP0661:~/Repos/hello$ go test ./... -count=1
ok example/hello 0.030s
signal: killed
FAIL example/hello/calc 0.262s
signal: killed
FAIL example/hello/converters 0.309s
signal: killed
FAIL example/hello/formatters 0.309s
signal: killed
FAIL example/hello/helpers 0.699s
signal: killed
FAIL example/hello/math 1.247s
signal: killed
FAIL example/hello/parsers 0.968s
signal: killed
FAIL example/hello/processors 0.670s
signal: killed
FAIL example/hello/strings 0.672s
signal: killed
FAIL example/hello/utils 1.294s
ok example/hello/validators 0.681s
FAIL
What did you expect to see?
- go1.25.7: All tests pass
- go1.26.1: All tests pass
Go version
1.26.1 linux-amd64
Output of
go envin your module/workspace:What did you do?
go mod tidygo test ./... -count=1There should be at least a few packages to run tests for all of them at once. But packages can be very simple. It happens only for some people. In my organization some people have this problem and some don't.
Example of packages that failed:
or
What did you see happen?
Most test packages fail with "signal: killed":
Differences between versions:
What did you expect to see?