anchor.diff:      %% Now test with option switched on.
       %% Note: We are also testing that the show_econnreset option is
       %% inherited from the listening socket by the accepting socket.
  +    p("test with option explicitly switched on"),
       {ok, L1} = gen_tcp:listen(0, [{show_econnreset, true}]),
       {ok, Port1} = inet:port(L1),
  -    {ok, Client1} = gen_tcp:connect(localhost, Port1, [{active, false}]),
  +    Client1 = case gen_tcp:connect(localhost, Port1, [{active, false}]) of
  +                  {ok, CSock1} ->
  +                      CSock1;
  +                  {error, eaddrnotavail = Reason1} ->
  +                      skip(connect_failed_str(Reason1))
  +              end,
       {ok, S1} = gen_tcp:accept(L1),
       ok = gen_tcp:close(L1),
       ok = inet:setopts(Client1, [{linger, {true, 0}}]),
  
positive.code: 	{tcp_error, S1, econnreset} ->
  	    receive
  		{tcp_closed, S1} ->
  		    ok;
  		Other1 ->
  		    ct:fail({unexpected2, Other1})
  	    after 1 ->
  		ct:fail({timeout, {server, no_tcp_closed}})
  	    end;
  	Other2 ->
  	    ct:fail({unexpected3, Other2})
      after 1000 ->
  	ct:fail({timeout, {server, no_tcp_error}})
      end.
  
  show_econnreset_active_once(Config) when is_list(Config) ->
  
negative.code: %%
  
  show_econnreset_active(Config) when is_list(Config) ->
      try do_show_econnreset_active(Config)
      catch
          throw:{skip, _} = SKIP ->
              SKIP
      end.
  
  do_show_econnreset_active(_Config) ->
      %% First confirm everything works with option turned off.
      p("test with option switched off (default)"),
      {ok, L0} = gen_tcp:listen(0, []),
      {ok, Port0} = inet:port(L0),
      Client0 = case gen_tcp:connect(localhost, Port0, [{active, false}]) of
                   {ok, CSock0} ->
                       CSock0;
                    {error, eaddrnotavail = Reason0} ->
                        skip(connect_failed_str(Reason0))
                end,
      {ok, S0} = gen_tcp:accept(L0),
      ok = gen_tcp:close(L0),
      ok = inet:setopts(Client0, [{linger, {true, 0}}]),
      ok = gen_tcp:close(Client0),
      receive
         {tcp_closed, S0} ->
  	   ok;
         Other0 ->
  	   ct:fail({unexpected, off, closed, Other0})
      after 1000 ->
  	ct:fail({timeout, {server, no_tcp_closed}})
      end,
  