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

Cannot run tests without network #6722

Closed
nalimilan opened this issue May 2, 2014 · 5 comments · Fixed by #6730
Closed

Cannot run tests without network #6722

nalimilan opened this issue May 2, 2014 · 5 comments · Fixed by #6730

Comments

@nalimilan
Copy link
Member

This is a problem for distribution package build systems, which use chroot environments without networking set up:

$ linux-user-chroot --unshare-net --chdir $(pwd) / make test-all
    JULIA test/all
ERROR: connect: network is unreachable (ENETUNREACH)
 in connect! at socket.jl:577
 in connect! at socket.jl:607
 in Worker at multi.jl:113
 in create_worker at multi.jl:1051
 in start_cluster_workers at multi.jl:1015
 in addprocs at multi.jl:1221
 in include at boot.jl:244
 in include_from_node1 at loading.jl:128
while loading /home/milan/Dev/julia/test/runtests.jl, in expression starting on line 29

make[1]: *** [all] Erreur 1
make: *** [test-all] Erreur 2

Could parallel computations be disabled if no loopback interface is found? I've tried using JULIA_CPU_CORES=1, but it fails a little later. Or a simpler solution would be to create new target which would skip tests requiring network (I can of course do that manually, but then I'm likely to forget to update the list when new tests are added).

     * socket
exception on 1: ERROR: test error during readall(connect(2134)) == "Hello World\n"
connect: network is unreachable (ENETUNREACH)
 in connect! at socket.jl:577
 in connect at socket.jl:594
 in anonymous at test.jl:62
 in do_test at test.jl:37
 in runtests at /home/milan/Dev/julia/test/testdefs.jl:5
 in anonymous at multi.jl:652
 in run_work_thunk at multi.jl:613
 in remotecall_fetch at multi.jl:686
 in remotecall_fetch at multi.jl:701
 in anonymous at task.jl:1350
while loading socket.jl, in expression starting on line 38
ERROR: test error during readall(connect(2134)) == "Hello World\n"
connect: network is unreachable (ENETUNREACH)
 in connect! at socket.jl:577
 in connect at socket.jl:594
 in anonymous at test.jl:62
 in do_test at test.jl:37
 in runtests at /home/milan/Dev/julia/test/testdefs.jl:5
 in anonymous at multi.jl:652
 in run_work_thunk at multi.jl:613
 in remotecall_fetch at multi.jl:686
 in remotecall_fetch at multi.jl:701
 in anonymous at task.jl:1350
while loading socket.jl, in expression starting on line 38
while loading /home/milan/Dev/julia/test/runtests.jl, in expression starting on line 35

julia: src/unix/core.c :764 : uv__io_stop:  l'assertion « loop->watchers[w->fd] == w » a échoué.
/bin/sh : ligne 1 : 28596 Abandon                 (core dumped)/home/milan/Dev/julia/julia -f ./runtests.jl all
make[1]: *** [all] Erreur 134
make: *** [test-all] Erreur 2
@opoplawski
Copy link

Actually, I believe the loopback interface is available, but not the local hostname.

@nalimilan
Copy link
Member Author

What the manpage says is:

       --unshare-net
              Create a new, empty networking stack.  This prevents the command
              from using any networking, including loopback.

@opoplawski
Copy link

FYI - this is the tool that I use locally to simulate the koji builders, but it is not what the koji builders have. So for Fedora tests, we should be able to use the loopback device.

@staticfloat
Copy link
Member

This is a pretty bad situation; we have no way to test our socket code without a loopback interface.

I think the best thing to do here is to make a patch to test/runtests.jl and manually remove "socket" from the list of testnames. That way, when we change something in that file, the patch will fail and you will be notified the next time you try to build.

@ihnorton
Copy link
Member

ihnorton commented May 2, 2014

Cross-linking #6171 #6030 #5945 #1879

cc: @amitmurthy

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

Successfully merging a pull request may close this issue.

4 participants