Skip to content

gopherjs test always fails with deadlock #815

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

Closed
jezell opened this issue May 15, 2018 · 2 comments
Closed

gopherjs test always fails with deadlock #815

jezell opened this issue May 15, 2018 · 2 comments

Comments

@jezell
Copy link

jezell commented May 15, 2018

Create a sample test that does nothing

package tmp

import (
	"testing"
)

func Test(t *testing.T) {
}

run gopherjs test and though the test is marked as passing, the run fails

=== RUN   Test
--- PASS: Test (0.00s)
PASS
fatal error: all goroutines are asleep - deadlock!
FAIL	tmp	0.429s
@jezell
Copy link
Author

jezell commented May 15, 2018

Solution
https://github.com/gopherjs/gopherjs/blob/master/doc/syscalls.md

cd $GOPATH/src/github.com/gopherjs/gopherjs/node-syscall/
npm install --global node-gyp
node-gyp rebuild
mkdir -p ~/.node_libraries/
cp build/Release/syscall.node ~/.node_libraries/syscall.node

Maybe gopherjs test should warn about node-syscall not being installed?

@dmitshur
Copy link
Member

Maybe gopherjs test should warn about node-syscall not being installed?

It seems gopherjs test requires the syscall module, even though it didn't require it some time ago. I think this is the same issue as #626, so I'll close this as duplicate.

There's also a chance that #710 will fix it, it needs to be finished reviewing.

Otherwise, yes, this should be documented and/or gopherjs test can print a warning/error message if the syscall module is unavoidably needed yet missing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants