gg
gg copied to clipboard
Test errors on aarch64, ppc64le, s390x
Golang 1.12.6 on aarch64, ppc64le, s390x:
Testing in: /builddir/build/BUILD/gg-72436a171bf31757dc87fb8fa9f7485307350307/_build/src
PATH: /builddir/build/BUILD/gg-72436a171bf31757dc87fb8fa9f7485307350307/_build/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin
GOPATH: /builddir/build/BUILD/gg-72436a171bf31757dc87fb8fa9f7485307350307/_build:/usr/share/gocode
GO111MODULE: off
command: go test -buildmode pie -compiler gc -ldflags "-X github.com/fogleman/gg/version.commit=72436a171bf31757dc87fb8fa9f7485307350307 -X github.com/fogleman/gg/version=1.3.0 -extldflags '-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld '"
testing: github.com/fogleman/gg
github.com/fogleman/gg
--- FAIL: TestQuadratic (0.01s)
context_test.go:26: expected hash: 56b842d814aee94b52495addae764a77 != actual hash: 8bc90640363d48e4ed2b9741a3a52ffa
--- FAIL: TestPushPop (0.00s)
context_test.go:26: expected hash: 31e908ee1c2ea180da98fd5681a89d05 != actual hash: 95ac5419a07df5b0916de3e8140ded54
FAIL
Testing in: /builddir/build/BUILD/gg-72436a171bf31757dc87fb8fa9f7485307350307/_build/src
PATH: /builddir/build/BUILD/gg-72436a171bf31757dc87fb8fa9f7485307350307/_build/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin
GOPATH: /builddir/build/BUILD/gg-72436a171bf31757dc87fb8fa9f7485307350307/_build:/usr/share/gocode
GO111MODULE: off
command: go test -buildmode pie -compiler gc -ldflags "-X github.com/fogleman/gg/version.commit=72436a171bf31757dc87fb8fa9f7485307350307 -X github.com/fogleman/gg/version=1.3.0 -extldflags '-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld '"
testing: github.com/fogleman/gg
github.com/fogleman/gg
--- FAIL: TestQuadratic (0.01s)
context_test.go:26: expected hash: 56b842d814aee94b52495addae764a77 != actual hash: e8ef1ffab3086fd8ddb25de537b9efa4
--- FAIL: TestPushPop (0.00s)
context_test.go:26: expected hash: 31e908ee1c2ea180da98fd5681a89d05 != actual hash: cc0af6e3a40d54f32f33a5c77b370935
FAIL
Testing in: /builddir/build/BUILD/gg-72436a171bf31757dc87fb8fa9f7485307350307/_build/src
PATH: /builddir/build/BUILD/gg-72436a171bf31757dc87fb8fa9f7485307350307/_build/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin
GOPATH: /builddir/build/BUILD/gg-72436a171bf31757dc87fb8fa9f7485307350307/_build:/usr/share/gocode
GO111MODULE: off
command: go test -buildmode pie -compiler gc -ldflags "-X github.com/fogleman/gg/version=1.3.0 -X github.com/fogleman/gg/version.commit=72436a171bf31757dc87fb8fa9f7485307350307 -extldflags '-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld '"
testing: github.com/fogleman/gg
github.com/fogleman/gg
--- FAIL: TestQuadratic (0.00s)
context_test.go:26: expected hash: 56b842d814aee94b52495addae764a77 != actual hash: e8ef1ffab3086fd8ddb25de537b9efa4
--- FAIL: TestPushPop (0.00s)
context_test.go:26: expected hash: 31e908ee1c2ea180da98fd5681a89d05 != actual hash: a236b3911661c4b9c35154f97a8761fd
FAIL
I have talked to a colleague about this issue. His analysis is:
"it is caused by the precision error generated by floating point operations(matrix transform). See: https://golang.org/ref/spec An implementation may combine multiple floating-point operations into a single fused operation, possibly across statements, and produce a result that differs from the value obtained by executing and rounding the instructions individually. An explicit floating-point type conversion rounds to the precision of the target type, preventing fusion that would discard that rounding."
He has experience with graphics libraries and advised me that small differences in rendering are usually acceptable provided they cannot be observed by the human eye. This seems to be the case in this instance.