golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
124.04k stars 17.67k forks source link

Unable to test go 1.6.4 with 1.6.3 on Mageia 5 (trying to package it) #18491

Closed bcornec closed 7 years ago

bcornec commented 7 years ago

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

go version go1.6.3 linux/amd64

What operating system and processor architecture are you using (go env)?

GOARCH="amd64" GOBIN="" GOEXE="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" GOPATH="" GORACE="" GOROOT="/usr/lib/golang" GOTOOLDIR="/usr/lib/golang/pkg/tool/linux_amd64" GO15VENDOREXPERIMENT="1" CC="gcc" GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0" CXX="g++" CGO_ENABLED="1"

What did you do?

I'm trying to package the latest go 1.6.4 for Mageia (uptading our current 1.6.3) I ran an rpmbuild which triggered the following in the %check section (after the build succeed):

Testing packages.

go tool dist test -run=^go_test:archive/tar$

ok archive/tar 0.029s ok archive/zip 0.144s ok bufio 0.120s [...] ok text/template 0.044s ok text/template/parse 0.009s --- FAIL: TestLoadFixed (0.00s) time_test.go:943: Now().In(loc).Zone() = "-01", -3600, want "GMT+1", -3600 FAIL FAIL time 2.735s ok unicode 0.041s

I can reproduce this by doing: $ go test time --- FAIL: TestLoadFixed (0.00s) time_test.go:943: Now().In(loc).Zone() = "-01", -3600, want "GMT+1", -3600 FAIL FAIL time 7.561s

quentinmit commented 7 years ago

Go 1.6 is no longer supported. The tests fail when run with a current timezone database. Either use a newer Go or don't run the tests.

ALTree commented 7 years ago

@bcornec if for some reason you can't package a newer version, and you want to be able to run the tests, you can cherrypick the patch for this. Ref is https://github.com/golang/go/commit/c5434f2973a87acff76bac359236e690d632ce95

bcornec commented 7 years ago

Thanks Alberto. Will see whether we should update to 1.7.4 instead. The update is necessary for a security wrt 1.6.3 that is shiped with Mageia 5 anyway so your git id is very handy !

ALTree commented 7 years ago

That test will fail in 1.7.4 too, unfortunately. You'll need go1.8 (scheduled for February 1, 2017).

The fix was pushed after the go1.7 release, and it wasn't cherry-picked for 1.7.3 or 1.7.4. People has been complaining about this (see this comment). Then #18163 was filed, proposing we allow test-only changes to be included in minor releases. It was accepted, and in the future this will hopefully make life a little easier for Go package maintainers when a test-only problem arises.

bcornec commented 7 years ago

I've been able to package 1.6.4 + your patch for mageia 5 as an update. I'll probably provide that one for mga6, while I'm working on packaging 1.7.4 (which requires modification of our patches to build). Thanks a lot for your help.