[erlang-questions] slave:start/3 time out when EUnit started with ERL_FLAGS

Ignas Vyšniauskas baliulia@REDACTED
Wed Sep 7 10:14:13 CEST 2011

Hi fellow Erlangers,

I believe there might be a bug in EUnit.

Consider this module:


works_ok() ->
    {ok, Host} = inet:gethostname(),
    {ok, _Node} = slave:start(Host, slavefoo, []).

bug_test() ->
        error_logger:info_msg("Node ~p is alive? ~p~n", [node(),
        {ok, _Node} = works_ok().

and a Makefile:
    erlc foo.erl

nobug: compile
    EUNIT="verbose" erl -sname foobar -s eunit test foo

bug: compile
    EUNIT="verbose" ERL_FLAGS="-sname foobar" erl -s eunit test foo

works: compile
    ERL_FLAGS="-sname foobar" erl -s foo works_ok

works_too: compile
    erl -sname foobar -s foo works_ok

Now if you run 'make nobug', everything is ok:

=INFO REPORT==== 7-Sep-2011::11:00:33 ===
Node foobar@REDACTED is alive? true
[0.197 s] ok

However if you 'make bug' you get the following:

=INFO REPORT==== 7-Sep-2011::11:00:19 ===
Node foobar@REDACTED is alive? true
*timed out*

As you can see from the info reports, the node is alive in both cases.
The slave:start/3 also works fine when EUnit is not involved.

Can someone confirm that this is indeed a bug or explain this behaviour

I am running Erlang R14B-2 on Linux and this has also been tested on
another machine.

Kind regards,

More information about the erlang-questions mailing list