go-ovh icon indicating copy to clipboard operation
go-ovh copied to clipboard

tests fail on s390x

Open carlwgeorge opened this issue 6 years ago • 1 comments

Hello! I'm packaging this library for Fedora, and I noticed that the test suite fails on s390x. I'm not using this architecture myself, but it is one of the architectures that Fedora builds for.

error
+ go test -buildmode pie -compiler gc -ldflags '-extldflags '\''-Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld '\'''
--- FAIL: TestAllAPIMethods (4.06s)
    ovh_test.go:248: Request: GET /some/resource. Authenticated=true
    ovh_test.go:250: 	HEADER: key=X-Ovh-Signature, value=[$1$8a21169b341aa23e82192e07457ca978006b1ba9]
    ovh_test.go:250: 	HEADER: key=X-Ovh-Timestamp, value=[1457018875]
    ovh_test.go:250: 	HEADER: key=Accept-Encoding, value=[gzip]
    ovh_test.go:250: 	HEADER: key=User-Agent, value=[Go-http-client/1.1]
    ovh_test.go:250: 	HEADER: key=Accept, value=[application/json]
    ovh_test.go:250: 	HEADER: key=X-Ovh-Application, value=[TDPKJdwZwAQPwKX2]
    ovh_test.go:250: 	HEADER: key=X-Ovh-Consumer, value=[5mBuy6SUQcRw2ZUxg0cG68BoDKpED4KY]
    ovh_test.go:210: context cancelFunc called
    ovh_test.go:248: Request: GET /some/resource. Authenticated=false
    ovh_test.go:250: 	HEADER: key=X-Ovh-Application, value=[TDPKJdwZwAQPwKX2]
    ovh_test.go:250: 	HEADER: key=Accept-Encoding, value=[gzip]
    ovh_test.go:250: 	HEADER: key=User-Agent, value=[Go-http-client/1.1]
    ovh_test.go:250: 	HEADER: key=Accept, value=[application/json]
    ovh_test.go:210: context cancelFunc called
    ovh_test.go:248: Request: DELETE /some/resource. Authenticated=true
    ovh_test.go:250: 	HEADER: key=X-Ovh-Timestamp, value=[1457018875]
    ovh_test.go:250: 	HEADER: key=Accept-Encoding, value=[gzip]
    ovh_test.go:250: 	HEADER: key=User-Agent, value=[Go-http-client/1.1]
    ovh_test.go:250: 	HEADER: key=Accept, value=[application/json]
    ovh_test.go:250: 	HEADER: key=X-Ovh-Application, value=[TDPKJdwZwAQPwKX2]
    ovh_test.go:250: 	HEADER: key=X-Ovh-Consumer, value=[5mBuy6SUQcRw2ZUxg0cG68BoDKpED4KY]
    ovh_test.go:250: 	HEADER: key=X-Ovh-Signature, value=[$1$f4571312a04a4c75188509e75c40581ca6bb6d7a]
    ovh_test.go:210: context cancelFunc called
    ovh_test.go:248: Request: DELETE /some/resource. Authenticated=false
    ovh_test.go:250: 	HEADER: key=User-Agent, value=[Go-http-client/1.1]
    ovh_test.go:250: 	HEADER: key=Accept, value=[application/json]
    ovh_test.go:250: 	HEADER: key=X-Ovh-Application, value=[TDPKJdwZwAQPwKX2]
    ovh_test.go:250: 	HEADER: key=Accept-Encoding, value=[gzip]
    ovh_test.go:210: context cancelFunc called
    ovh_test.go:248: Request: POST /some/resource. Authenticated=true
    ovh_test.go:250: 	HEADER: key=Content-Type, value=[application/json;charset=utf-8]
    ovh_test.go:250: 	HEADER: key=X-Ovh-Consumer, value=[5mBuy6SUQcRw2ZUxg0cG68BoDKpED4KY]
    ovh_test.go:250: 	HEADER: key=X-Ovh-Signature, value=[$1$6549d84e65be72f4ec0d7b6d7eaa19554a265990]
    ovh_test.go:250: 	HEADER: key=Accept-Encoding, value=[gzip]
    ovh_test.go:250: 	HEADER: key=Content-Length, value=[35]
    ovh_test.go:250: 	HEADER: key=Accept, value=[application/json]
    ovh_test.go:250: 	HEADER: key=X-Ovh-Application, value=[TDPKJdwZwAQPwKX2]
    ovh_test.go:250: 	HEADER: key=X-Ovh-Timestamp, value=[1457018875]
    ovh_test.go:250: 	HEADER: key=User-Agent, value=[Go-http-client/1.1]
    ovh_test.go:210: context cancelFunc called
    ovh_test.go:248: Request: POST /some/resource. Authenticated=false
    ovh_test.go:250: 	HEADER: key=Accept, value=[application/json]
    ovh_test.go:250: 	HEADER: key=Content-Type, value=[application/json;charset=utf-8]
    ovh_test.go:250: 	HEADER: key=X-Ovh-Application, value=[TDPKJdwZwAQPwKX2]
    ovh_test.go:250: 	HEADER: key=Accept-Encoding, value=[gzip]
    ovh_test.go:250: 	HEADER: key=User-Agent, value=[Go-http-client/1.1]
    ovh_test.go:250: 	HEADER: key=Content-Length, value=[35]
    ovh_test.go:210: context cancelFunc called
    ovh_test.go:248: Request: PUT /some/resource. Authenticated=true
    ovh_test.go:250: 	HEADER: key=X-Ovh-Application, value=[TDPKJdwZwAQPwKX2]
    ovh_test.go:250: 	HEADER: key=X-Ovh-Consumer, value=[5mBuy6SUQcRw2ZUxg0cG68BoDKpED4KY]
    ovh_test.go:250: 	HEADER: key=User-Agent, value=[Go-http-client/1.1]
    ovh_test.go:250: 	HEADER: key=Content-Length, value=[35]
    ovh_test.go:250: 	HEADER: key=Accept, value=[application/json]
    ovh_test.go:250: 	HEADER: key=Content-Type, value=[application/json;charset=utf-8]
    ovh_test.go:250: 	HEADER: key=X-Ovh-Signature, value=[$1$983e2a9a213c99211edd0b32715ac1ace1a6a0ea]
    ovh_test.go:250: 	HEADER: key=X-Ovh-Timestamp, value=[1457018875]
    ovh_test.go:250: 	HEADER: key=Accept-Encoding, value=[gzip]
    ovh_test.go:210: context cancelFunc called
    ovh_test.go:248: Request: PUT /some/resource. Authenticated=false
    ovh_test.go:250: 	HEADER: key=User-Agent, value=[Go-http-client/1.1]
    ovh_test.go:250: 	HEADER: key=Content-Length, value=[35]
    ovh_test.go:250: 	HEADER: key=Accept, value=[application/json]
    ovh_test.go:250: 	HEADER: key=Content-Type, value=[application/json;charset=utf-8]
    ovh_test.go:250: 	HEADER: key=X-Ovh-Application, value=[TDPKJdwZwAQPwKX2]
    ovh_test.go:250: 	HEADER: key=Accept-Encoding, value=[gzip]
    ovh_test.go:210: context cancelFunc called
    ovh_test.go:248: Request: GET /some/resource. Authenticated=true
    ovh_test.go:250: 	HEADER: key=User-Agent, value=[Go-http-client/1.1]
    ovh_test.go:250: 	HEADER: key=Accept, value=[application/json]
    ovh_test.go:250: 	HEADER: key=X-Ovh-Application, value=[TDPKJdwZwAQPwKX2]
    ovh_test.go:250: 	HEADER: key=X-Ovh-Consumer, value=[5mBuy6SUQcRw2ZUxg0cG68BoDKpED4KY]
    ovh_test.go:250: 	HEADER: key=X-Ovh-Signature, value=[$1$8a21169b341aa23e82192e07457ca978006b1ba9]
    ovh_test.go:250: 	HEADER: key=X-Ovh-Timestamp, value=[1457018875]
    ovh_test.go:250: 	HEADER: key=Accept-Encoding, value=[gzip]
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x2aa36163dc6]
goroutine 83 [running]:
testing.tRunner.func1(0xc0001a3600)
	/usr/lib/golang/src/testing/testing.go:792 +0x3be
panic(0x2aa362b1a60, 0x2aa3653ab30)
	/usr/lib/golang/src/runtime/panic.go:513 +0x1d4
github.com/ovh/go-ovh/ovh.APIMethodTester(0xc0001a3600, 0x2aa36169ade, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x100000000000002)
	/builddir/build/BUILD/go-ovh-ba5adb4cf0148a3dbdbd30586f075266256a77b1/_build/src/github.com/ovh/go-ovh/ovh/ovh_test.go:248 +0x706
github.com/ovh/go-ovh/ovh.TestAllAPIMethods(0xc0001a3600)
	/builddir/build/BUILD/go-ovh-ba5adb4cf0148a3dbdbd30586f075266256a77b1/_build/src/github.com/ovh/go-ovh/ovh/ovh_test.go:295 +0x3f4
testing.tRunner(0xc0001a3600, 0x2aa363139b0)
	/usr/lib/golang/src/testing/testing.go:827 +0xcc
created by testing.(*T).Run
	/usr/lib/golang/src/testing/testing.go:878 +0x372
exit status 2
FAIL	github.com/ovh/go-ovh/ovh	8.331s

(full build log)

I tried this outside of the go packaging macros, and it still failed, albeit with a slightly different error.

$ go env | grep -e GOOS -e GOARCH
GOARCH="s390x"
GOOS="linux"
$ go get github.com/ovh/go-ovh/ovh
$ cd go/src/github.com/ovh/go-ovh/ovh/
$ go test
fork/exec /tmp/go-build729930756/b001/ovh.test: exec format error
FAIL	github.com/ovh/go-ovh/ovh	0.000s

The same steps pass on x86_64.

$ go env | grep -e GOOS -e GOARCH
GOARCH="amd64"
GOOS="linux"
$ go get github.com/ovh/go-ovh/ovh
$ cd go/src/github.com/ovh/go-ovh/ovh/
$ go test
PASS
ok  	github.com/ovh/go-ovh/ovh	32.048s

carlwgeorge avatar Dec 07 '18 16:12 carlwgeorge

Updating to 1.1.0 on Rawhide, the issue does not present itself anymore. I think this can be close.

eclipseo avatar Jul 30 '20 18:07 eclipseo