anchor.diff:  	]}, {misc, [
   		misc_bad_transport
   	]}, {supervisor, [
  +		supervisor_clean_child_restart,
  +		supervisor_clean_conns_sup_restart,
   		supervisor_clean_restart,
  -		supervisor_clean_child_restart,
   		supervisor_conns_alive,
  -		supervisor_server_recover_state,
  -		supervisor_clean_conns_sup_restart
  +		supervisor_server_recover_state
   	]}].
   
   %% misc.
  
positive.code: 	receive upgraded -> ok after 1000 -> error(timeout) end,
  	ok = ranch:stop_listener(Name).
  
  tcp_inherit_options(_) ->
  	Name = tcp_inherit_options,
  	TcpOptions = [{nodelay, false}, {send_timeout_close, false}],
  	{ok, _} = ranch:start_listener(Name, 4, ranch_tcp,
  			TcpOptions,
  			check_tcp_options, [{pid, self()} | TcpOptions]),
  	Port = ranch:get_port(Name),
  	{ok, Socket} = gen_tcp:connect("localhost", Port,
  			[binary, {active, true}, {packet, raw}]),
  	receive checked -> ok after 1000 -> error(timeout) end,
  	ok = gen_tcp:close(Socket),
  	ok = ranch:stop_listener(Name).
  
  %% Supervisor tests
  
  supervisor_clean_restart(_) ->
  	%% There we verify that mature listener death will not let
  	%% whole supervisor down and also the supervisor itself will
  	%% restart everything properly.
  	Name = supervisor_clean_restart,
  	NbAcc = 4,
  	{ok, Pid} = ranch:start_listener(Name,
  		NbAcc, ranch_tcp, [], echo_protocol, []),
  	%% Trace supervisor spawns.
  	1 = erlang:trace(Pid, true, [procs, set_on_spawn]),
  	ConnsSup0 = ranch_server:get_connections_sup(Name),
  	erlang:exit(ConnsSup0, kill),
  	receive after 1000 -> ok end,
  	%% Verify that supervisor is alive
  	true = is_process_alive(Pid),
  	%% ...but children are dead.
  	false = is_process_alive(ConnsSup0),
  	%% Receive traces from newly started children
  	ConnsSup = receive {trace, Pid, spawn, Pid2, _} -> Pid2 end,
  	AccSupPid = receive {trace, Pid, spawn, Pid3, _} -> Pid3 end,
  	%% ...and its acceptors.
  	[receive {trace, AccSupPid, spawn, _Pid, _} -> ok end ||
  		_ <- lists:seq(1, NbAcc)],
  	%% No more traces then.
  	receive
  		{trace, EPid, spawn, _, _} when EPid == Pid; EPid == AccSupPid ->
  			error(invalid_restart)
  	after 1000 -> ok end,
  	%% Verify that new children registered themselves properly.
  	ConnsSup = ranch_server:get_connections_sup(Name),
  	_ = erlang:trace(all, false, [all]),
  	ok = clean_traces(),
  	ok = ranch:stop_listener(Name).
  
  supervisor_clean_child_restart(_) ->
  	%% Then we verify that only parts of the supervision tree
  
negative.code: 		tcp_accept_socket,
  		tcp_active_echo,
  		tcp_echo,
  		tcp_inherit_options,
  		tcp_max_connections,
  		tcp_max_connections_and_beyond,
  		tcp_max_connections_infinity,
  		tcp_set_max_connections,
  		tcp_set_max_connections_clean,
  		tcp_upgrade
  	]}, {ssl, [
  		ssl_accept_error,
  		ssl_accept_socket,
  