frankbraun / codechain

Codechain — code trust through hash chains
The Unlicense
45 stars 11 forks source link

gocheck timeout after 10 minutes #16

Closed jaeh closed 4 years ago

jaeh commented 4 years ago

tldr: hashchain fuzzing takes longer then 10 minutes on my machine, leading to a timeout

steps:

git clone https://github.com/frankbraun/codechain
cd codechain
make install
make test-install
make test

(i added make test-install in #15, runs go get check, imports and lint)

i assume this would not happen if i correctly initialized codechain prior to running the tests.

... hashchain fuzzing part 1515/1928 hashchain fuzzing part 1516/1928 hashchain fuzzing part 1517/1928 coverage: 42.3% of statements panic: test timed out after 10m0s

goroutine 36 [running]: testing.(*M).startAlarm.func1() /usr/lib/go-1.13/src/testing/testing.go:1377 +0xdf created by time.goFunc /usr/lib/go-1.13/src/time/sleep.go:168 +0x44

goroutine 1 [chan receive, 9 minutes]: testing.(T).Run(0xc0000f4200, 0x75edfc, 0xa, 0x776850, 0x47f701) /usr/lib/go-1.13/src/testing/testing.go:961 +0x377 testing.runTests.func1(0xc0000f4000) /usr/lib/go-1.13/src/testing/testing.go:1202 +0x78 testing.tRunner(0xc0000f4000, 0xc0000dfd88) /usr/lib/go-1.13/src/testing/testing.go:909 +0xc9 testing.runTests(0xc00000e340, 0x9c4760, 0xa, 0xa, 0x0) /usr/lib/go-1.13/src/testing/testing.go:1200 +0x2a7 testing.(M).Run(0xc0000f0000, 0x0) /usr/lib/go-1.13/src/testing/testing.go:1117 +0x176 main.main() _testmain.go:138 +0x1c1

goroutine 13 [runnable]: crypto/ed25519/internal/edwards25519.(CompletedGroupElement).ToProjective(0xc0000dae80, 0xc0000db788) /usr/lib/go-1.13/src/crypto/ed25519/internal/edwards25519/edwards25519.go:764 +0xae crypto/ed25519/internal/edwards25519.GeDoubleScalarMultVartime(0xc0000db788, 0xc0000db748, 0xc0000db800, 0xc0000db708) /usr/lib/go-1.13/src/crypto/ed25519/internal/edwards25519/edwards25519.go:926 +0x2e9 crypto/ed25519.Verify(0xc0001c8300, 0x20, 0x20, 0xc0008ea5c0, 0x20, 0x40, 0xc0008ea600, 0x40, 0x40, 0x0) /usr/lib/go-1.13/src/crypto/ed25519/ed25519.go:211 +0x31d github.com/frankbraun/codechain/hashchain.(HashChain).verifySignatureType(0xc0001753c0, 0x4, 0xc000175640, 0x3, 0x4, 0xdad79172a88a1170, 0x8a4e32e44e326772) /media/j/data/dev/webboot/codechain/hashchain/verify.go:142 +0x261 github.com/frankbraun/codechain/hashchain.(HashChain).verify(0xc0001753c0, 0xc00005c040, 0xc00005c040) /media/j/data/dev/webboot/codechain/hashchain/verify.go:288 +0x576 github.com/frankbraun/codechain/hashchain.(HashChain).read(0xc0001753c0, 0x7c8100, 0xc000091320, 0x0, 0x0) /media/j/data/dev/webboot/codechain/hashchain/read.go:54 +0x7cc github.com/frankbraun/codechain/hashchain.Read(0x7c8100, 0xc000091320, 0x0, 0x7fa0a80a3440, 0xc0000dbd40) /media/j/data/dev/webboot/codechain/hashchain/read.go:61 +0x8c github.com/frankbraun/codechain/hashchain.TestFuzzer.func1(0xc0001ac000, 0x5e2d, 0x5e2d, 0x0, 0x0) /media/j/data/dev/webboot/codechain/hashchain/fuzzer_test.go:71 +0x17a github.com/mutecomm/mute/util/fuzzer.(SequentialFuzzer).Fuzz(0xc0000dbf08, 0x5e2d) /home/j/go/pkg/mod/github.com/mutecomm/mute@v0.0.0-20180427225835-8124193e6371/util/fuzzer/fuzzer.go:35 +0x1b9 github.com/frankbraun/codechain/hashchain.TestFuzzer(0xc0000f4200) /media/j/data/dev/webboot/codechain/hashchain/fuzzer_test.go:78 +0x3bd testing.tRunner(0xc0000f4200, 0x776850) /usr/lib/go-1.13/src/testing/testing.go:909 +0xc9 created by testing.(T).Run /usr/lib/go-1.13/src/testing/testing.go:960 +0x350 FAIL github.com/frankbraun/codechain/hashchain 600.008s FAIL gocheck: error: exit status 1: go test:

make: *** [Makefile:19: test] Error 1

frankbraun commented 4 years ago

I raised the timeout, on slower machine it can take longer than 10 minutes. Thanks for the report!

jaeh commented 4 years ago

confirm: works on my machine, tests just passed :)

frankbraun commented 4 years ago

Great!