anchor.diff:      {ok, Server} = gen_tcp:accept(Listen),
       ?P("close listen socket"),
       ok = gen_tcp:close(Listen),
  -    PayloadSize = 1024 * 1024,
  -    Payload = binary:copy(<<"0123456789ABCDEF">>, 256 * 1024), % 1 MB
  +    {OS, Client, Server}.
  +
  +lzs_populate(Client, OS, PayloadSize) when is_port(Client) ->
  +    ?P("[inet] create payload"),
  +    Payload = lzs_make_payload(PayloadSize),
  +    ?P("[inet] ensure non-empty queue"),
       lz_ensure_non_empty_queue(Client, Payload, OS),
  -    ?P("verify linger: {true, 0}"),
  -    {ok, [{linger, {true, 0}}]} = inet:getopts(Server, [linger]),
  -    ?P("close client socket"),
  -    ok = gen_tcp:close(Server),
  -    ok = ct:sleep(1),
  -    ?P("verify client socket (port) not connected"),
  +    {ok, undefined};
  +lzs_populate(Client, _OS, PayloadSize) ->
  +    ?P("[socket] send payload ( = start payload sender)"),
  +    Sender = spawn(fun() -> lzs_populate_sender(Client, PayloadSize) end),
  +    receive
  +        {'EXIT', Sender, Reason} ->
  +            {error, {unexpected_exit, Sender, Reason}}
  +    after 2000 ->
  +            {ok, Sender}
  +    end.
  +
  +lzs_populate_sender(Client, PayloadSize) ->
  +    ?P("[socket] create payload"),
  +    Payload = lzs_make_payload(PayloadSize),
  +    ?P("[socket] send payload (expect failure)"), 
  +    {error, closed} = gen_tcp:send(Client, Payload),
  +    ?P("[socket] payload send failed (as expected)"), 
  +    exit(normal).
  +    
  +lzs_make_payload(PayloadSize) ->
  +    Payload = binary:copy(<<"0123456789ABCDEF">>, 64 * 1024), % 1 MB
  +    if (PayloadSize =:= byte_size(Payload)) ->
  +            Payload;
  +       true ->
  +            exit({payload_size, PayloadSize, byte_size(Payload)})
  +    end.
  +
  +lzs_verify(Client, Server, PayloadSize)
  +  when is_port(Client) andalso is_port(Server) ->
  +    ?P("[inet] verify client socket (port) not connected"),
       undefined = erlang:port_info(Server, connected),
  -    ?P("try (and fail) recv (on client socket)"),
  +    ?P("[inet] try (and fail) recv (on accepted socket)"),
       {error, closed} = gen_tcp:recv(Client, PayloadSize),
  -    ?P("done"),
  +    ok;
  +lzs_verify(Client, _Server, PayloadSize) ->
  +    ?P("[socket] try (and fail) recv (on accepted socket)"),
  +    {error, closed} = gen_tcp:recv(Client, PayloadSize),
       ok.
  -
  -
  +    
   %% Thanks to Luke Gorrie. Tests for a very specific problem with 
   %% corrupt data. The testcase will be killed by the timetrap timeout
   %% if the bug is present.
  
positive.code:        "~n   Socket info: ~p", [Sock, erlang:port_info(Sock)]),
      ct:fail("Queue size verification failed");
  lz_ensure_non_empty_queue(Sock, Payload, OS, N) ->
      ?P("try send payload ~w (on client socket) when port info:"
         "~n   ~p", [N, erlang:port_info(Sock)]),
      ok = gen_tcp:send(Sock, Payload),
      ?P("try verify client socket queue size"),
      case erlang:port_info(Sock, queue_size) of
  
negative.code: 
  lz_populate(Client, OS, PayloadSize) when is_port(Client) ->
      ?P("[inet] create payload"),
      Payload = lz_make_payload(PayloadSize),
      ?P("[inet] ensure non-empty queue"),
      lz_ensure_non_empty_queue(Client, Payload, OS),
      {ok, undefined};
  