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

non-constant format string in call to (*testing.common).Errorf when running go test with go-1.24rc1 #1054

Closed
rathann opened this issue Feb 18, 2025 · 3 comments

Comments

@rathann
Copy link

rathann commented Feb 18, 2025

When running the tests under go-1.24rc1 (Fedora 42 pre-release branch), we get the following failure:

Testing    in: /builddir/build/BUILD/golang-github-klauspost-compress-1.17.11-build/compress-1.17.11/_build/src
         PATH: /builddir/build/BUILD/golang-github-klauspost-compress-1.17.11-build/compress-1.17.11/_build/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin
       GOPATH: /builddir/build/BUILD/golang-github-klauspost-compress-1.17.11-build/compress-1.17.11/_build:/usr/share/gocode
  GO111MODULE: off
      command: go test -buildmode pie -compiler gc -ldflags " -X github.com/klauspost/compress/version=1.17.11 -extldflags '-Wl,-z,relro -Wl,--as-needed  -Wl,-z,pack-relative-relocs -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes  '"
      testing: github.com/klauspost/compress
github.com/klauspost/compress
testing: warning: no tests to run
PASS
ok  	github.com/klauspost/compress	0.003s
github.com/klauspost/compress
testing: warning: no tests to run
PASS
ok  	github.com/klauspost/compress	0.003s
github.com/klauspost/compress/dict
?   	github.com/klauspost/compress/dict	[no test files]
github.com/klauspost/compress/flate
PASS
ok  	github.com/klauspost/compress/flate	19.933s
github.com/klauspost/compress/flate
PASS
ok  	github.com/klauspost/compress/flate	20.271s
github.com/klauspost/compress/fse
# github.com/klauspost/compress/fse
# [github.com/klauspost/compress/fse]
./fse_test.go:218:14: non-constant format string in call to (*testing.common).Errorf
./fse_test.go:243:15: non-constant format string in call to (*testing.common).Errorf
FAIL	github.com/klauspost/compress/fse [build failed]
@klauspost
Copy link
Owner

Sounds like you are running vet checks...

λ go version
go version go1.24.0 windows/amd64

λ go test .
ok      github.com/klauspost/compress/fse       0.383s

But might as well update CI and fix it.

@klauspost
Copy link
Owner

@rathann Ah. You are ignoring the go.mod version, so I guess you are deleting the go.mod.

I will fix it anyway, since it will come up in a year or two.

@klauspost
Copy link
Owner

Included in #1055

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants