anchor.diff:  	    
   setup_closed_ao() ->
       Dir = filename:dirname(code:which(?MODULE)),
  -    {ok,R} = test_server:start_node(?UNIQ_NODE_NAME, slave,
  -                                    [{args,"-pa " ++ Dir}]),
  +    p("[setup] start slave node"),
  +    R = case test_server:start_node(?UNIQ_NODE_NAME, slave,
  +                                    [{args,"-pa " ++ Dir}]) of
  +            {ok, Slave} ->
  +                Slave;
  +            {error, Reason} ->
  +                skip(f("failed starting slave node: ~p", [Reason]))
  +        end,
       Host = get_hostname(node()),
  -    {ok, L} = gen_tcp:listen(0, [{active,false},{packet,2}]),
  +    p("[setup] create listen socket"),
  +    L = case gen_tcp:listen(0, [{active,false},{packet,2}]) of
  +            {ok, LSock} ->
  +                LSock;
  +            {error, eaddrnotavail = LReason} ->
  +                (catch test_server:stop_node(R)),
  +                skip(listen_failed_str(LReason))
  +        end,
       Fun = fun(F) ->
                     receive
                         {From,X} when is_function(X) ->
  
positive.code: 	     {error,einval} = inet:setopts(A,[{active,true}]),
  	     ok = receive {tcp_closed, A} -> error after 1000 -> ok end
       end)(),
      (fun() ->
  	     {Loop,A} = setup_closed_ao(),
  	     Loop({{error,closed},{error,econnaborted}},
  
negative.code: 
  %% Check that active once and tcp_close messages behave as expected.
  active_once_closed(Config) when is_list(Config) ->
      try do_active_once_closed(Config)
      catch
          throw:{skip, _} = SKIP ->
              SKIP
      end.
  
  do_active_once_closed(_Config) ->
      p("stage 1"),
      (fun() ->
  	     {Loop,A} = setup_closed_ao(),
  	     Loop({{error,closed},{error,econnaborted}},
                    fun() -> gen_tcp:send(A,"Hello") end),
  	     ok = inet:setopts(A,[{active,once}]),
  	     ok = receive {tcp_closed, A} -> ok after 1000 -> error end,
  	     {error,einval} = inet:setopts(A,[{active,once}]),
  	     ok = receive {tcp_closed, A} -> error after 1000 -> ok end
       end)(),
      p("stage 2"),
      (fun() ->
  	     {Loop,A} = setup_closed_ao(),
  	     Loop({{error,closed},{error,econnaborted}},
                    fun() -> gen_tcp:send(A,"Hello") end),
  	     ok = inet:setopts(A,[{active,true}]),
  	     ok = receive {tcp_closed, A} -> ok after 1000 -> error end,
  	     {error,einval} = inet:setopts(A,[{active,true}]),
  	     ok = receive {tcp_closed, A} -> error after 1000 -> ok end
       end)(),
      p("stage 3"),
      (fun() ->
  	     {Loop,A} = setup_closed_ao(),
  	     Loop({{error,closed},{error,econnaborted}},
                    fun() -> gen_tcp:send(A,"Hello") end),
  	     ok = inet:setopts(A,[{active,true}]),
  	     ok = receive {tcp_closed, A} -> ok after 1000 -> error end,
  	     {error,einval} = inet:setopts(A,[{active,once}]),
  	     ok = receive {tcp_closed, A} -> error after 1000 -> ok end
       end)(),
      p("stage 4"),
      (fun() ->
  	     {Loop,A} = setup_closed_ao(),
  	     Loop({{error,closed},{error,econnaborted}},
  