rotisserie/eris

all tests are failing, if using gollvm

advancedwebdeveloper opened this issue · 1 comments

Describe the bug
All tests are failing, if using gollvm .

To Reproduce
Steps to reproduce the behavior:

  1. Go to my Google Drive download link, for the "release" build and download it
  2. Extract in any custom folder, enter that folder and run

$sudo cp -R * /usr/

  1. Check that you are using a proper Golang compiler

$go version

  1. Get the same error:

$ go test ./...
--- FAIL: TestGlobalStack (0.00s)
stack_test.go:165: eris_test.TestLocalStack: expected number of root error frames { 5 } got { 1 }
--- FAIL: TestGoRoutines (0.25s)
stack_test.go:151: eris_test.TestLocalStack: expected wrap func name { eris_test.TestGoRoutines.func1 } got { eris_test.TestGoRoutines..func1 }
FAIL
FAIL github.com/rotisserie/eris 0.732s
FAIL

Expected behavior
Probably I expected that (at least some) tests would succeed.

Screenshots
If applicable, add screenshots to help explain your problem.
VirtualBox_ubuntu_01_10_2020_16_34_46

Desktop (please complete the following information):

  • OS: Ubuntu x86_64
  • Version 20

Additional context
I was able to run your benchmarks:

$ make bench
Running benchmark tests
goos: linux
goarch: amd64
pkg: github.com/rotisserie/eris/benchmark
BenchmarkWrap/std_errors_1_layers-2 1383235 826 ns/op 88 B/op 4 allocs/op
BenchmarkWrap/pkg_errors_1_layers-2 41601 26564 ns/op 3760 B/op 11 allocs/op
BenchmarkWrap/eris_1_layers-2 26457 43931 ns/op 7960 B/op 25 allocs/op
BenchmarkWrap/std_errors_10_layers-2 155646 7690 ns/op 1056 B/op 31 allocs/op
BenchmarkWrap/pkg_errors_10_layers-2 8312 151270 ns/op 20897 B/op 74 allocs/op
BenchmarkWrap/eris_10_layers-2 4574 240630 ns/op 41155 B/op 88 allocs/op
BenchmarkWrap/std_errors_100_layers-2 7444 134451 ns/op 52054 B/op 301 allocs/op
BenchmarkWrap/pkg_errors_100_layers-2 888 1366197 ns/op 192272 B/op 704 allocs/op
BenchmarkWrap/eris_100_layers-2 433 2489635 ns/op 373100 B/op 718 allocs/op
BenchmarkWrap/std_errors_1000_layers-2 213 5172471 ns/op 5263831 B/op 3002 allocs/op
BenchmarkWrap/pkg_errors_1000_layers-2 94 14191480 ns/op 1906061 B/op 7005 allocs/op
BenchmarkWrap/eris_1000_layers-2 21 52687659 ns/op 3692592 B/op 7020 allocs/op
BenchmarkFormat/std_errors_1_layers-2 3405969 364 ns/op 32 B/op 1 allocs/op
BenchmarkFormat/pkg_errors_1_layers-2 1527482 770 ns/op 96 B/op 3 allocs/op
BenchmarkFormat/eris_1_layers-2 159298 7606 ns/op 920 B/op 23 allocs/op
BenchmarkFormat/std_errors_10_layers-2 2634273 438 ns/op 96 B/op 1 allocs/op
BenchmarkFormat/pkg_errors_10_layers-2 299623 4335 ns/op 1056 B/op 21 allocs/op
BenchmarkFormat/eris_10_layers-2 35584 28518 ns/op 6336 B/op 95 allocs/op
BenchmarkFormat/std_errors_100_layers-2 778509 1550 ns/op 1024 B/op 1 allocs/op
BenchmarkFormat/pkg_errors_100_layers-2 14496 79682 ns/op 52259 B/op 201 allocs/op
BenchmarkFormat/eris_100_layers-2 1969 650065 ns/op 371932 B/op 815 allocs/op
BenchmarkFormat/std_errors_1000_layers-2 116500 10131 ns/op 10240 B/op 1 allocs/op
BenchmarkFormat/pkg_errors_1000_layers-2 183 6927381 ns/op 5265777 B/op 2003 allocs/op
BenchmarkFormat/eris_1000_layers-2 20 50511730 ns/op 35846958 B/op 8018 allocs/op
BenchmarkStack/pkg_errors_1_layers-2 33230 34056 ns/op 2256 B/op 49 allocs/op
BenchmarkStack/eris_1_layers-2 56469 20795 ns/op 4760 B/op 67 allocs/op
BenchmarkStack/pkg_errors_10_layers-2 5378 207628 ns/op 12223 B/op 265 allocs/op
BenchmarkStack/eris_10_layers-2 19087 62277 ns/op 18516 B/op 202 allocs/op
BenchmarkStack/pkg_errors_100_layers-2 256 4283942 ns/op 122995 B/op 2425 allocs/op
BenchmarkStack/eris_100_layers-2 978 1490096 ns/op 855978 B/op 1553 allocs/op
BenchmarkStack/pkg_errors_1000_layers-2 2 936693294 ns/op 577890956 B/op 28246 allocs/op
BenchmarkStack/eris_1000_layers-2 14 97293242 ns/op 79552572 B/op 15096 allocs/op
BenchmarkJSON/eris_1_layers-2 15138 73616 ns/op 6885 B/op 111 allocs/op
BenchmarkJSON/eris_10_layers-2 4846 215716 ns/op 26201 B/op 403 allocs/op
BenchmarkJSON/eris_100_layers-2 523 2267172 ns/op 507676 B/op 3289 allocs/op
BenchmarkJSON/eris_1000_layers-2 18 94480986 ns/op 34654235 B/op 32142 allocs/op
PASS
ok github.com/rotisserie/eris/benchmark 65.102s

CC @thanm @cherrymui for any gollvm related issues

@advancedwebdeveloper apologies for the long delay. I've finally had the time and energy to research this a bit. It seems that gollvm doesn't support key parts of Go's runtime package (see here for more info). So it makes total sense that the tests verifying our stack tracing features would fail. Considering it's a limitation of the compiler, I don't think it makes sense for us to modify our code just to make the tests pass when using gollvm. But I'm open to revisiting that decision if we get more requests for support. Closing for now.