Browse Source

Unconditionally run tests that use tracing

Loïc Hoguin 4 years ago
parent
commit
3b9deefd7d
2 changed files with 5 additions and 41 deletions
  1. 5 35
      test/acceptor_SUITE.erl
  2. 0 6
      test/sendfile_SUITE.erl

+ 5 - 35
test/acceptor_SUITE.erl

@@ -823,13 +823,7 @@ tcp_set_max_connections(_) ->
 	20 = ranch:get_max_connections(Name),
 	20 = ranch:get_max_connections(Name),
 	ok = ranch:stop_listener(Name).
 	ok = ranch:stop_listener(Name).
 
 
-tcp_set_max_connections_clean(Config) ->
-	case code:is_module_native(?MODULE) of
-		true -> doc("This test uses tracing and is not compatible with native code.");
-		false -> do_tcp_set_max_connections_clean(Config)
-	end.
-
-do_tcp_set_max_connections_clean(_) ->
+tcp_set_max_connections_clean(_) ->
 	doc("Ensure that setting max_connections does not crash any process."),
 	doc("Ensure that setting max_connections does not crash any process."),
 	Name = name(),
 	Name = name(),
 	{ok, ListSupPid} = ranch:start_listener(Name,
 	{ok, ListSupPid} = ranch:start_listener(Name,
@@ -997,13 +991,7 @@ supervisor_changed_options_restart(_) ->
 	{'EXIT', _} = begin catch ranch:get_port(Name) end,
 	{'EXIT', _} = begin catch ranch:get_port(Name) end,
 	ok.
 	ok.
 
 
-supervisor_clean_child_restart(Config) ->
-	case code:is_module_native(?MODULE) of
-		true -> doc("This test uses tracing and is not compatible with native code.");
-		false -> do_supervisor_clean_child_restart(Config)
-	end.
-
-do_supervisor_clean_child_restart(_) ->
+supervisor_clean_child_restart(_) ->
 	doc("Verify that only the relevant parts of the supervision tree restarted "
 	doc("Verify that only the relevant parts of the supervision tree restarted "
 		"when the listening socket is closed."),
 		"when the listening socket is closed."),
 	Name = name(),
 	Name = name(),
@@ -1043,13 +1031,7 @@ do_supervisor_clean_child_restart(_) ->
 	ok = clean_traces(),
 	ok = clean_traces(),
 	ok = ranch:stop_listener(Name).
 	ok = ranch:stop_listener(Name).
 
 
-supervisor_clean_restart(Config) ->
-	case code:is_module_native(?MODULE) of
-		true -> doc("This test uses tracing and is not compatible with native code.");
-		false -> do_supervisor_clean_restart(Config)
-	end.
-
-do_supervisor_clean_restart(_) ->
+supervisor_clean_restart(_) ->
 	doc("Verify that killing ranch_conns_sup does not crash everything "
 	doc("Verify that killing ranch_conns_sup does not crash everything "
 		"and that it restarts properly."),
 		"and that it restarts properly."),
 	Name = name(),
 	Name = name(),
@@ -1083,13 +1065,7 @@ do_supervisor_clean_restart(_) ->
 	ok = clean_traces(),
 	ok = clean_traces(),
 	ok = ranch:stop_listener(Name).
 	ok = ranch:stop_listener(Name).
 
 
-supervisor_conns_alive(Config) ->
-	case code:is_module_native(?MODULE) of
-		true -> doc("This test uses tracing and is not compatible with native code.");
-		false -> do_supervisor_conns_alive(Config)
-	end.
-
-do_supervisor_conns_alive(_) ->
+supervisor_conns_alive(_) ->
 	doc("Ensure that active connections stay open when the listening socket gets closed."),
 	doc("Ensure that active connections stay open when the listening socket gets closed."),
 	Name = name(),
 	Name = name(),
 	_ = erlang:trace(new, true, [call]),
 	_ = erlang:trace(new, true, [call]),
@@ -1132,13 +1108,7 @@ supervisor_protocol_start_link_crash(_) ->
 	ConnsSup = ranch_server:get_connections_sup(Name),
 	ConnsSup = ranch_server:get_connections_sup(Name),
 	ok = ranch:stop_listener(Name).
 	ok = ranch:stop_listener(Name).
 
 
-supervisor_server_recover_state(Config) ->
-	case code:is_module_native(?MODULE) of
-		true -> doc("This test uses tracing and is not compatible with native code.");
-		false -> do_supervisor_server_recover_state(Config)
-	end.
-
-do_supervisor_server_recover_state(_) ->
+supervisor_server_recover_state(_) ->
 	doc("Ensure that when ranch_server crashes and restarts, it recovers "
 	doc("Ensure that when ranch_server crashes and restarts, it recovers "
 		"its state and continues monitoring the same processes."),
 		"its state and continues monitoring the same processes."),
 	Name = name(),
 	Name = name(),

+ 0 - 6
test/sendfile_SUITE.erl

@@ -228,12 +228,6 @@ rawfile_range_small(Config) ->
 	ok = Transport:close(Server).
 	ok = Transport:close(Server).
 
 
 ssl_chunk_size(Config) ->
 ssl_chunk_size(Config) ->
-	case code:is_module_native(?MODULE) of
-		true -> doc("This test uses tracing and is not compatible with native code.");
-		false -> do_ssl_chunk_size(Config)
-	end.
-
-do_ssl_chunk_size(Config) ->
 	doc("Use sendfile with SSL. Ensure the sendfile fallback respects the chunk size."),
 	doc("Use sendfile with SSL. Ensure the sendfile fallback respects the chunk size."),
 	Transport = config(transport, Config),
 	Transport = config(transport, Config),
 	Filename = config(filename, Config),
 	Filename = config(filename, Config),