Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid synchronisation in termdash_test #60

Closed
mum4k opened this issue Jul 3, 2018 · 0 comments
Closed

Invalid synchronisation in termdash_test #60

mum4k opened this issue Jul 3, 2018 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@mum4k
Copy link
Owner

mum4k commented Jul 3, 2018

The tests (specifically the after function) is currently synchronised by waiting for the event queue to empty. This isn't a good synchronisation, since the event processing code in termdash still races with the test code that evaluates the result.

Example traceback:
The command "go test ./..." exited with 0.
12.77s$ go test -race ./...
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=0x18 pc=0x5f1cc8]
goroutine 38 [running]:
testing.tRunner.func1(0xc4200c05a0)
/home/travis/.gimme/versions/go1.10.3.linux.amd64/src/testing/testing.go:742 +0x567
panic(0x62cf60, 0x7881a0)
/home/travis/.gimme/versions/go1.10.3.linux.amd64/src/runtime/panic.go:502 +0x24a
github.com/mum4k/termdash.TestRun.func5(0xc42009c750, 0xc42006f100)
/home/travis/gopath/src/github.com/mum4k/termdash/termdash_test.go:239 +0x68
github.com/mum4k/termdash.TestRun.func11(0xc4200c05a0)
/home/travis/gopath/src/github.com/mum4k/termdash/termdash_test.go:358 +0xa00
testing.tRunner(0xc4200c05a0, 0xc4200833e0)
/home/travis/.gimme/versions/go1.10.3.linux.amd64/src/testing/testing.go:777 +0x16e
created by testing.(*T).Run
/home/travis/.gimme/versions/go1.10.3.linux.amd64/src/testing/testing.go:824 +0x565
FAIL github.com/mum4k/termdash 1.068s

@mum4k mum4k added the bug Something isn't working label Jul 3, 2018
@mum4k mum4k self-assigned this Jul 3, 2018
@mum4k mum4k closed this as completed in 4f86e6d Jul 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant