aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kernel')
-rw-r--r--lib/kernel/test/application_SUITE.erl47
-rw-r--r--lib/kernel/test/bif_SUITE.erl16
-rw-r--r--lib/kernel/test/code_SUITE.erl14
-rw-r--r--lib/kernel/test/disk_log_SUITE.erl5
-rw-r--r--lib/kernel/test/erl_distribution_SUITE.erl46
-rw-r--r--lib/kernel/test/file_SUITE.erl4
-rw-r--r--lib/kernel/test/global_SUITE.erl56
-rw-r--r--lib/kernel/test/heart_SUITE.erl4
-rw-r--r--lib/kernel/test/inet_SUITE.erl18
-rw-r--r--lib/kernel/test/init_SUITE.erl2
-rw-r--r--lib/kernel/test/pg2_SUITE.erl12
-rw-r--r--lib/kernel/test/prim_file_SUITE.erl10
12 files changed, 117 insertions, 117 deletions
diff --git a/lib/kernel/test/application_SUITE.erl b/lib/kernel/test/application_SUITE.erl
index 18f6ab8212..53e00da4db 100644
--- a/lib/kernel/test/application_SUITE.erl
+++ b/lib/kernel/test/application_SUITE.erl
@@ -1338,8 +1338,8 @@ otp_3002(Conf) when is_list(Conf) ->
% Create the boot script
{{KernelVer,StdlibVer}, {LatestDir, LatestName}} =
create_script_3002("script_3002"),
- ?t:format(0, "LatestDir = ~p~n", [LatestDir]),
- ?t:format(0, "LatestName = ~p~n", [LatestName]),
+ ct:pal(?HI_VERBOSITY, "LatestDir = ~p~n", [LatestDir]),
+ ct:pal(?HI_VERBOSITY, "LatestName = ~p~n", [LatestName]),
case is_real_system(KernelVer, StdlibVer) of
true ->
@@ -1396,29 +1396,29 @@ otp_4066(Conf) when is_list(Conf) ->
ok = rpc:call(Cp1, application, start, [app1]),
wait_until_started(app1, [Cp1]),
- test_server:format("--- App1 started at Cp1 ---~n", []),
+ io:format("--- App1 started at Cp1 ---~n", []),
print_dac_state(AllNodes),
% Cp2 previously crashed on this stop
ok = rpc:call(Cp1, application, stop, [app1]),
wait_until_stopped(app1, [Cp1]),
- test_server:format("--- App1 stopped at Cp1 ---~n", []),
+ io:format("--- App1 stopped at Cp1 ---~n", []),
print_dac_state(AllNodes),
ok = rpc:call(Cp1, application, start, [app1]),
wait_until_started(app1, [Cp1]),
- test_server:format("--- App1 started at Cp1 ---~n", []),
+ io:format("--- App1 started at Cp1 ---~n", []),
print_dac_state(AllNodes),
ok = rpc:call(Cp2, application, load, [app1, App1Nodes]),
ok = rpc:call(Cp2, application, start, [app1]),
- test_server:format("--- App1 started at Cp2 ---~n", []),
+ io:format("--- App1 started at Cp2 ---~n", []),
print_dac_state(AllNodes),
stop_node_nice(Cp1),
wait_until_started(app1, [Cp2]),
- test_server:format("--- Cp1 crashed; failover to Cp2 ---~n", []),
+ io:format("--- Cp1 crashed; failover to Cp2 ---~n", []),
print_dac_state(Cp2),
stop_node_nice(Cp2),
@@ -1434,7 +1434,7 @@ write_config(Fd, Config) ->
print_dac_state(Node) when is_atom(Node) ->
State = gen_server:call({dist_ac, Node}, info),
- test_server:format(" * dist_ac state on node ~p:~n ~p~n",
+ io:format(" * dist_ac state on node ~p:~n ~p~n",
[Node, State]);
print_dac_state(Nodes) when is_list(Nodes) ->
lists:foreach(fun (N) -> print_dac_state(N) end, Nodes).
@@ -1844,7 +1844,6 @@ distr_changed_tc2(Conf) when is_list(Conf) ->
% _DcInfo1 = rpc:call(Cp1, dist_ac, info, []),
_DcInfo2 = rpc:call(Cp2, dist_ac, info, []),
_DcInfo3 = rpc:call(Cp3, dist_ac, info, []),
-% ?t:format(0,"#### DcInfo1 ~n~p~n",[_DcInfo1]),
% DcWa1 = which_applications(Cp1),
DcWa2 = which_applications(Cp2),
@@ -2656,13 +2655,13 @@ start_node_args(Name, Args) ->
start_node_boot_3002(Name, Boot) ->
Pa = filename:dirname(code:which(?MODULE)),
- ?t:format(0, "start_node_boot ~p~n",
- [" -pa " ++ Pa ++ " -env ERL_CRASH_DUMP erl_crash_dump." ++
- atom_to_list(Name) ++ " -boot " ++ Boot ++
- " -sasl dummy \"missing "]),
+ ct:pal(?HI_VERBOSITY, "start_node_boot ~p~n",
+ [" -pa " ++ Pa ++ " -env ERL_CRASH_DUMP erl_crash_dump." ++
+ atom_to_list(Name) ++ " -boot " ++ Boot ++
+ " -sasl dummy \"missing "]),
test_server:start_node(Name, slave,
[{args, " -pa " ++ Pa ++
- " -env ERL_CRASH_DUMP erl_crash_dump." ++
+ " -env ERL_CRASH_DUMP erl_crash_dump." ++
atom_to_list(Name) ++ " -boot " ++ Boot ++
" -sasl dummy \"missing "}]).
@@ -2672,10 +2671,12 @@ start_node_boot_config(Name, SysConfigFun, Conf, Boot) ->
start_node_boot(Name, Config, Boot) ->
Pa = filename:dirname(code:which(?MODULE)),
- ?t:format(0, "start_node_boot ~p~n",[" -pa " ++ Pa ++ " -config " ++ Config ++
- " -boot " ++ atom_to_list(Boot)]),
- test_server:start_node(Name, slave, [{args, " -pa " ++ Pa ++ " -config " ++ Config ++
- " -boot " ++ atom_to_list(Boot)}]).
+ ct:pal(?HI_VERBOSITY,
+ "start_node_boot ~p~n",[" -pa " ++ Pa ++ " -config " ++ Config ++
+ " -boot " ++ atom_to_list(Boot)]),
+ test_server:start_node(Name, slave,
+ [{args, " -pa " ++ Pa ++ " -config " ++ Config ++
+ " -boot " ++ atom_to_list(Boot)}]).
start_node_config_sf(Name, SysConfigFun, Conf) ->
ConfigFile = write_config_file(SysConfigFun, Conf),
@@ -2707,7 +2708,7 @@ get_start_type(Expected) ->
get_start_type(Expected, 30*5, #st{}).
get_start_type(_Expected, 0, Ack) ->
- test_server:format("====== ~p ======~n", [Ack]),
+ io:format("====== ~p ======~n", [Ack]),
ct:fail(not_valid_start_type);
get_start_type(Expected, Times, Ack0) ->
#st{normal = N0, local = L0, takeover = T0, failover = F0} = Ack0,
@@ -2754,10 +2755,10 @@ get_start_phase(Expected) ->
Expected ->
ok;
{sp, T1, I1, So1, Sp1, G1} ->
- test_server:format("=============== {sp,T,I,So,Sp,G} ~p ~n",[" "]),
- test_server:format("=========== got ~p ~n",
+ io:format("=============== {sp,T,I,So,Sp,G} ~p ~n",[" "]),
+ io:format("=========== got ~p ~n",
[{sp, T1, I1, So1, Sp1, G1}]),
- test_server:format("====== expected ~p ~n", [Expected]),
+ io:format("====== expected ~p ~n", [Expected]),
ct:fail(not_valid_start_phase)
after 5000 ->
ct:fail(not_valid_start_phase)
@@ -2791,7 +2792,7 @@ get_conf_change(Expected) ->
{cc, Expected} ->
ok;
{cc, List} ->
- test_server:format("====== ~p ======~n",[{cc, List}]),
+ io:format("====== ~p ======~n",[{cc, List}]),
ct:fail(not_valid_conf_change)
after 5000 ->
ct:fail(not_valid_conf_change_to)
diff --git a/lib/kernel/test/bif_SUITE.erl b/lib/kernel/test/bif_SUITE.erl
index c0ef0ab714..0f95bbd7a8 100644
--- a/lib/kernel/test/bif_SUITE.erl
+++ b/lib/kernel/test/bif_SUITE.erl
@@ -380,7 +380,7 @@ spawn_failures(Config) when is_list(Config) ->
?line {ok, Node} = start_node(spawn_remote_failure),
% unknown nodes
- test_server:format("Testing unknown nodes~n", []),
+ io:format("Testing unknown nodes~n", []),
?line CrashPid1 = (catch spawn_opt('unknown@node',
erlang,
nodes,
@@ -436,7 +436,7 @@ spawn_failures(Config) when is_list(Config) ->
end,
% bad node
- test_server:format("Testing bad nodes~n", []),
+ io:format("Testing bad nodes~n", []),
?line {'EXIT', {badarg, _}} = (catch spawn_opt("Node",erlang,nodes,[],[])),
?line {'EXIT', {badarg, _}} = (catch spawn_opt("Node",
fun () ->
@@ -454,7 +454,7 @@ spawn_failures(Config) when is_list(Config) ->
end)),
% bad module
- test_server:format("Testing bad modules~n", []),
+ io:format("Testing bad modules~n", []),
?line {'EXIT', {badarg, _}} = (catch spawn_opt(Node,"erlang",nodes,[],[])),
?line {'EXIT', {badarg, _}} = (catch spawn_opt("erlang",nodes,[],[])),
?line {'EXIT', {badarg, _}} = (catch spawn_link(Node,"erlang",nodes,[])),
@@ -463,7 +463,7 @@ spawn_failures(Config) when is_list(Config) ->
?line {'EXIT', {badarg, _}} = (catch spawn("erlang",nodes,[])),
% bad function
- test_server:format("Testing bad functions~n", []),
+ io:format("Testing bad functions~n", []),
?line {'EXIT', {badarg, _}} = (catch spawn_opt(Node,erlang,"nodes",[],[])),
?line {'EXIT', {badarg, _}} = (catch spawn_opt(Node,not_a_fun,[])),
?line {'EXIT', {badarg, _}} = (catch spawn_opt(erlang,"nodes",[],[])),
@@ -479,7 +479,7 @@ spawn_failures(Config) when is_list(Config) ->
% bad argument
- test_server:format("Testing bad arguments~n", []),
+ io:format("Testing bad arguments~n", []),
?line {'EXIT', {badarg, _}} = (catch spawn_opt(Node,erlang,nodes,[a|b],[])),
?line {'EXIT', {badarg, _}} = (catch spawn_opt(erlang,nodes,[a|b],[])),
?line {'EXIT', {badarg, _}} = (catch spawn_link(Node,erlang,nodes,[a|b])),
@@ -488,7 +488,7 @@ spawn_failures(Config) when is_list(Config) ->
?line {'EXIT', {badarg, _}} = (catch spawn(erlang,nodes,[a|b])),
% bad option
- test_server:format("Testing bad options~n", []),
+ io:format("Testing bad options~n", []),
?line {'EXIT', {badarg, _}} = (catch spawn_opt(Node,erlang,nodes,[],[a|b])),
?line {'EXIT', {badarg, _}} = (catch spawn_opt(erlang,nodes,[],[a|b])),
@@ -532,7 +532,7 @@ wilderness(suite) ->
wilderness(Config) when is_list(Config) ->
?line OKParams = {512, 8},
?line Alloc = erlang:system_info(allocator),
- ?line test_server:format("Test server allocator info:~n~p", [Alloc]),
+ io:format("Test server allocator info:~n~p", [Alloc]),
Result = case Alloc of
{Allocator, _, _, _} when Allocator == glibc;
Allocator == dlmalloc ->
@@ -566,7 +566,7 @@ run_wilderness_test({Set_tt, Set_tp}, {Exp_tt, Exp_tp}) ->
{Ref, {A, V, F, S}} ->
Ett = Exp_tt*1024,
Etp = Exp_tp*1024,
- ?line test_server:format("Test allocator info:~n~p",
+ io:format("Test allocator info:~n~p",
[{A, V, F, S}]),
?line {value, {sys_alloc, SA_Opts}}
= lists:keysearch(sys_alloc, 1, S),
diff --git a/lib/kernel/test/code_SUITE.erl b/lib/kernel/test/code_SUITE.erl
index 639d59c39a..16a57cd4d8 100644
--- a/lib/kernel/test/code_SUITE.erl
+++ b/lib/kernel/test/code_SUITE.erl
@@ -222,18 +222,18 @@ del_path(Config) when is_list(Config) ->
end.
del_path_1(P) ->
- test_server:format("Initial code:get_path()=~p~n",[P]),
+ io:format("Initial code:get_path()=~p~n",[P]),
{'EXIT',_} = (catch code:del_path(3)),
false = code:del_path(my_dummy_name),
false = code:del_path("/kdlk/my_dummy_dir"),
Dir = filename:join([code:lib_dir(kernel),"ebin"]),
- test_server:format("kernel dir: ~p~n",[Dir]),
+ io:format("kernel dir: ~p~n",[Dir]),
true = code:del_path(kernel),
NewP = code:get_path(),
- test_server:format("Path after removing 'kernel':~p~n",[NewP]),
+ io:format("Path after removing 'kernel':~p~n",[NewP]),
ReferenceP = lists:delete(Dir,P),
- test_server:format("Reference path:~p~n",[ReferenceP]),
+ io:format("Reference path:~p~n",[ReferenceP]),
NewP = ReferenceP, % check that dir is deleted
code:set_path(P),
@@ -875,14 +875,14 @@ check_funs({'$M_EXPR','$F_EXPR',1},
%% check_funs(This = {M,_,_}, Path) ->
%% case catch atom_to_list(M) of
%% [$h,$i,$p,$e | _] ->
-%% test_server:format("hipe_module_ignored(~p, ~p)~n", [This, Path]),
+%% io:format("hipe_module_ignored(~p, ~p)~n", [This, Path]),
%% 0;
%% _ ->
-%% test_server:format("not_verified(~p, ~p)~n", [This, Path]),
+%% io:format("not_verified(~p, ~p)~n", [This, Path]),
%% 1
%% end;
check_funs(This, Path) ->
- test_server:format("not_verified(~p, ~p)~n", [This, Path]),
+ io:format("not_verified(~p, ~p)~n", [This, Path]),
1.
my_usort(List) ->
diff --git a/lib/kernel/test/disk_log_SUITE.erl b/lib/kernel/test/disk_log_SUITE.erl
index 715cbd70d7..0c3b56a101 100644
--- a/lib/kernel/test/disk_log_SUITE.erl
+++ b/lib/kernel/test/disk_log_SUITE.erl
@@ -927,7 +927,7 @@ mk_bytes(N) when N > 4 ->
end.
get_list(File, Log) ->
- ?t:format(0, "File ~p~n",[File]),
+ ct:pal(?HI_VERBOSITY, "File ~p~n", [File]),
ok = disk_log:sync(Log),
{ok, B} = file:read_file(File),
binary_to_list(B).
@@ -3497,7 +3497,6 @@ change_size_before(Conf) when is_list(Conf) ->
?line {ok,Log11_12} = file:read(Fd1, 200),
?line ok = file:close(Fd1),
?line {ok, Fd2} = file:open(File ++ ".2", [read]),
-% ?t:format(0, "~p~n",[file:read(Fd2, 200)]),
?line Log21_22 = Log_2_1 ++ Log_2_2,
?line {ok,Log21_22} = file:read(Fd2, 200),
?line ok = file:close(Fd2),
@@ -4959,7 +4958,7 @@ copy_wrap_log(FromName, ToName, N, FromDir, ToDir) ->
-define(BUFSIZE, 8192).
copy_file(Src, Dest) ->
- % ?t:format("copying from ~p to ~p~n", [Src, Dest]),
+ % io:format("copying from ~p to ~p~n", [Src, Dest]),
{ok, InFd} = file:open(Src, [raw, binary, read]),
{ok, OutFd} = file:open(Dest, [raw, binary, write]),
ok = copy_file1(InFd, OutFd),
diff --git a/lib/kernel/test/erl_distribution_SUITE.erl b/lib/kernel/test/erl_distribution_SUITE.erl
index 10050bc54e..2c26880a3f 100644
--- a/lib/kernel/test/erl_distribution_SUITE.erl
+++ b/lib/kernel/test/erl_distribution_SUITE.erl
@@ -356,7 +356,7 @@ tick_change(Config) when is_list(Config) ->
wait_for_nodedowns(Tester, Ref) ->
receive
{nodedown, Node} ->
- ?t:format("~p~n", [{node(), {nodedown, Node}}]),
+ io:format("~p~n", [{node(), {nodedown, Node}}]),
?line Tester ! {Ref, {node(), {nodedown, Node}}}
end,
wait_for_nodedowns(Tester, Ref).
@@ -600,8 +600,8 @@ do_inet_dist_options_options(Prio) ->
rpc:call(Node1, ?MODULE, get_socket_priorities, []),
?line PrioritiesNode2 =
rpc:call(Node2, ?MODULE, get_socket_priorities, []),
- ?line ?t:format("PrioritiesNode1 = ~p", [PrioritiesNode1]),
- ?line ?t:format("PrioritiesNode2 = ~p", [PrioritiesNode2]),
+ io:format("PrioritiesNode1 = ~p", [PrioritiesNode1]),
+ io:format("PrioritiesNode2 = ~p", [PrioritiesNode2]),
?line Elevated = [P || P <- PrioritiesNode1, P =:= Prio],
?line Elevated = [P || P <- PrioritiesNode2, P =:= Prio],
?line [_|_] = Elevated,
@@ -731,7 +731,7 @@ monitor_nodes_node_type(Config) when is_list(Config) ->
?line ok = net_kernel:monitor_nodes(true),
?line ok = net_kernel:monitor_nodes(true, [{node_type, all}]),
?line Names = get_numbered_nodenames(9, node),
-% ?line ?t:format("Names: ~p~n", [Names]),
+% io:format("Names: ~p~n", [Names]),
?line [NN1, NN2, NN3, NN4, NN5, NN6, NN7, NN8, NN9] = Names,
?line {ok, N1} = start_node(NN1),
@@ -812,7 +812,7 @@ monitor_nodes_misc(Config) when is_list(Config) ->
?line ok = net_kernel:monitor_nodes(true, [{node_type, all}, nodedown_reason]),
?line ok = net_kernel:monitor_nodes(true, [nodedown_reason, {node_type, all}]),
?line Names = get_numbered_nodenames(3, node),
-% ?line ?t:format("Names: ~p~n", [Names]),
+% io:format("Names: ~p~n", [Names]),
?line [NN1, NN2, NN3] = Names,
?line {ok, N1} = start_node(NN1),
@@ -860,12 +860,12 @@ monitor_nodes_otp_6481(doc) ->
monitor_nodes_otp_6481(suite) ->
[];
monitor_nodes_otp_6481(Config) when is_list(Config) ->
- ?line ?t:format("Testing nodedown...~n"),
+ io:format("Testing nodedown...~n"),
?line monitor_nodes_otp_6481_test(Config, nodedown),
- ?line ?t:format("ok~n"),
- ?line ?t:format("Testing nodeup...~n"),
+ io:format("ok~n"),
+ io:format("Testing nodeup...~n"),
?line monitor_nodes_otp_6481_test(Config, nodeup),
- ?line ?t:format("ok~n"),
+ io:format("ok~n"),
?line ok.
monitor_nodes_otp_6481_test(Config, TestType) when is_list(Config) ->
@@ -904,7 +904,7 @@ monitor_nodes_otp_6481_test(Config, TestType) when is_list(Config) ->
%% Verify the monitor_nodes order expected
?line TestMonNodeState = monitor_node_state(),
- %?line ?t:format("~p~n", [TestMonNodeState]),
+ %io:format("~p~n", [TestMonNodeState]),
?line TestMonNodeState =
MonNodeState
++ case TestType of
@@ -1055,18 +1055,18 @@ monitor_nodes_all_comb(Flag) ->
receive_all_comb_nodeup_msgs(visible, Node) ->
- ?t:format("Receive nodeup visible...~n"),
+ io:format("Receive nodeup visible...~n"),
Exp = [{nodeup, Node},
{nodeup, Node, []}]
++ mk_exp_mn_all_comb_nodeup_msgs_common(visible, Node),
receive_mn_msgs(Exp),
- ?t:format("ok~n"),
+ io:format("ok~n"),
ok;
receive_all_comb_nodeup_msgs(hidden, Node) ->
- ?t:format("Receive nodeup hidden...~n"),
+ io:format("Receive nodeup hidden...~n"),
Exp = mk_exp_mn_all_comb_nodeup_msgs_common(hidden, Node),
receive_mn_msgs(Exp),
- ?t:format("ok~n"),
+ io:format("ok~n"),
ok.
mk_exp_mn_all_comb_nodeup_msgs_common(Type, Node) ->
@@ -1077,20 +1077,20 @@ mk_exp_mn_all_comb_nodeup_msgs_common(Type, Node) ->
{nodeup, Node, InfoNt}].
receive_all_comb_nodedown_msgs(visible, Node, Reason) ->
- ?t:format("Receive nodedown visible...~n"),
+ io:format("Receive nodedown visible...~n"),
Exp = [{nodedown, Node},
{nodedown, Node, [{nodedown_reason, Reason}]}]
++ mk_exp_mn_all_comb_nodedown_msgs_common(visible,
Node,
Reason),
receive_mn_msgs(Exp),
- ?t:format("ok~n"),
+ io:format("ok~n"),
ok;
receive_all_comb_nodedown_msgs(hidden, Node, Reason) ->
- ?t:format("Receive nodedown hidden...~n"),
+ io:format("Receive nodedown hidden...~n"),
Exp = mk_exp_mn_all_comb_nodedown_msgs_common(hidden, Node, Reason),
receive_mn_msgs(Exp),
- ?t:format("ok~n"),
+ io:format("ok~n"),
ok.
mk_exp_mn_all_comb_nodedown_msgs_common(Type, Node, Reason) ->
@@ -1104,10 +1104,10 @@ mk_exp_mn_all_comb_nodedown_msgs_common(Type, Node, Reason) ->
receive_mn_msgs([]) ->
ok;
receive_mn_msgs(Msgs) ->
- ?t:format("Expecting msgs: ~p~n", [Msgs]),
+ io:format("Expecting msgs: ~p~n", [Msgs]),
receive
{_Dir, _Node} = Msg ->
- ?t:format("received ~p~n", [Msg]),
+ io:format("received ~p~n", [Msg]),
case lists:member(Msg, Msgs) of
true -> receive_mn_msgs(lists:delete(Msg, Msgs));
false -> ct:fail({unexpected_message, Msg,
@@ -1115,14 +1115,14 @@ receive_mn_msgs(Msgs) ->
end;
{Dir, Node, Info} ->
Msg = {Dir, Node, lists:sort(Info)},
- ?t:format("received ~p~n", [Msg]),
+ io:format("received ~p~n", [Msg]),
case lists:member(Msg, Msgs) of
true -> receive_mn_msgs(lists:delete(Msg, Msgs));
false -> ct:fail({unexpected_message, Msg,
expected_messages, Msgs})
end;
Msg ->
- ?t:format("received ~p~n", [Msg]),
+ io:format("received ~p~n", [Msg]),
ct:fail({unexpected_message, Msg,
expected_messages, Msgs})
end.
@@ -1201,7 +1201,7 @@ check_no_nodedown_nodeup(TimeOut) ->
print_my_messages() ->
?line {messages, Messages} = process_info(self(), messages),
- ?line ?t:format("Messages: ~p~n", [Messages]),
+ io:format("Messages: ~p~n", [Messages]),
?line ok.
diff --git a/lib/kernel/test/file_SUITE.erl b/lib/kernel/test/file_SUITE.erl
index 2319f294f4..0e3ff89ca7 100644
--- a/lib/kernel/test/file_SUITE.erl
+++ b/lib/kernel/test/file_SUITE.erl
@@ -1454,7 +1454,7 @@ file_info_int(Config) ->
%% platforms such as Windows95.
RootDir = filename:join([proplists:get_value(priv_dir, Config)]),
- ?line test_server:format("RootDir = ~p", [RootDir]),
+ io:format("RootDir = ~p", [RootDir]),
?line Name = filename:join(RootDir,
atom_to_list(?MODULE)
@@ -1535,7 +1535,7 @@ file_write_file_info(suite) -> [];
file_write_file_info(doc) -> [];
file_write_file_info(Config) when is_list(Config) ->
?line RootDir = get_good_directory(Config),
- ?line test_server:format("RootDir = ~p", [RootDir]),
+ io:format("RootDir = ~p", [RootDir]),
%% Set the file to read only AND update the file times at the same time.
%% (This used to fail on Windows NT/95 for a local filesystem.)
diff --git a/lib/kernel/test/global_SUITE.erl b/lib/kernel/test/global_SUITE.erl
index 7ec1b1ea53..d1ea0490fd 100644
--- a/lib/kernel/test/global_SUITE.erl
+++ b/lib/kernel/test/global_SUITE.erl
@@ -1362,7 +1362,7 @@ loop_it(N, Config) -> loop_it(N,N, Config).
loop_it(0,_, _Config) -> ok;
loop_it(N,M, Config) ->
- test_server:format(1, "Round: ~w", [M-N]),
+ ct:pal(?HI_VERBOSITY, "Round: ~w", [M-N]),
ring(Config),
line(Config),
loop_it(N-1,M, Config).
@@ -2283,12 +2283,12 @@ res({Res,Resolver}, [N1, A2, Z2], Cf) ->
%% Note: there are no links anymore, but monitors.
#cf{link = LinkedNode, ping = PingNode, n1 = Res1, n2 = OtherNode,
nodes = Nodes0, n_res = NRes, config = Config} = Cf,
- ?t:format("~n~nResolver: ~p", [Res]),
- ?t:format(" Registered on partition 1: ~p", [Res1]),
- ?t:format(" Registered on partition 2: ~p", [OtherNode]),
- ?t:format(" Pinged node: ~p", [PingNode]),
- ?t:format(" Linked node: ~p", [LinkedNode]),
- ?t:format(" Expected # resolvers: ~p", [NRes]),
+ io:format("~n~nResolver: ~p", [Res]),
+ io:format(" Registered on partition 1: ~p", [Res1]),
+ io:format(" Registered on partition 2: ~p", [OtherNode]),
+ io:format(" Pinged node: ~p", [PingNode]),
+ io:format(" Linked node: ~p", [LinkedNode]),
+ io:format(" Expected # resolvers: ~p", [NRes]),
Nodes = lists:sort(Nodes0),
T1 = node(),
Part1 = [T1, N1],
@@ -2349,7 +2349,7 @@ res({Res,Resolver}, [N1, A2, Z2], Cf) ->
[] when LinkedNode =:= none -> ok;
Gs -> ok;
_ when LengthGs < 4, X =:= [] -> ok;
- _ -> ?t:format("ERROR:~nMonitoredBy ~p~n"
+ _ -> io:format("ERROR:~nMonitoredBy ~p~n"
"global_name_servers ~p~n",
[MonitoredByNode, Gs]),
ct:fail(monitor_mismatch)
@@ -2592,7 +2592,7 @@ name_exit(Config) when is_list(Config) ->
{ok, N2} = start_node_rel(n_2, this, Config),
[N1, N2]
end,
- ?t:format("Test of current release~n"),
+ io:format("Test of current release~n"),
do_name_exit(StartFun, current, Config).
do_name_exit(StartFun, Version, Config) ->
@@ -2858,7 +2858,7 @@ many_nodes(Config) when is_list(Config) ->
Return = lists:flatten(io_lib:format("~w nodes took ~w ms",
[N_cps, Diff])),
erlang:display({{nodes,N_cps},{time,Diff}}),
- ?t:format("~s~n", [Return]),
+ io:format("~s~n", [Return]),
{comment, Return}.
node_rel(From, To, Rel) ->
@@ -2971,7 +2971,7 @@ start_and_sync([]) ->
start_and_sync([Name | Names]) ->
?line {ok, N} = start_node(Name, slave, []),
?line {Time, _Void} = rpc:call(N, timer, tc, [global, sync, []]),
- ?t:format("~p: ~p~n", [Name, Time]),
+ io:format("~p: ~p~n", [Name, Time]),
[N | start_and_sync(Names)].
%%%-----------------------------------------------------------------
@@ -3051,14 +3051,14 @@ global_groups_change(Config) ->
(TestGG5_2 =:= TestGG5)
end),
- ?line ?t:format( "#### nodes() ~p~n",[nodes()]),
+ io:format( "#### nodes() ~p~n",[nodes()]),
?line XDcWa1 = rpc:call(Cp1, global_group, info, []),
?line XDcWa2 = rpc:call(Cp2, global_group, info, []),
?line XDcWa3 = rpc:call(Cp3, global_group, info, []),
- ?line ?t:format( "#### XDcWa1 ~p~n",[XDcWa1]),
- ?line ?t:format( "#### XDcWa2 ~p~n",[XDcWa2]),
- ?line ?t:format( "#### XDcWa3 ~p~n",[XDcWa3]),
+ io:format( "#### XDcWa1 ~p~n",[XDcWa1]),
+ io:format( "#### XDcWa2 ~p~n",[XDcWa2]),
+ io:format( "#### XDcWa3 ~p~n",[XDcWa3]),
?line stop_node(CpC),
@@ -3098,8 +3098,8 @@ global_groups_change(Config) ->
?line ok = rpc:call(CpE, application_controller, test_change_apps,
[[kernel], [NewKernel]]),
- ?line ?t:format("#### ~p~n",[multicall]),
- ?line ?t:format( "#### ~p~n",[multicall]),
+ io:format("#### ~p~n",[multicall]),
+ io:format( "#### ~p~n",[multicall]),
%% no idea to check the result from the rpc because the other
%% nodes will disconnect test server, and thus the result will
%% always be {badrpc, nodedown}
@@ -3157,14 +3157,14 @@ global_groups_change(Config) ->
?line InfoC = rpc:call(CpC, global_group, info, []),
?line InfoD = rpc:call(CpD, global_group, info, []),
?line InfoE = rpc:call(CpE, global_group, info, []),
- ?line ?t:format( "#### Info1 ~p~n",[Info1]),
- ?line ?t:format( "#### Info2 ~p~n",[Info2]),
- ?line ?t:format( "#### Info3 ~p~n",[Info3]),
- ?line ?t:format( "#### InfoA ~p~n",[InfoA]),
- ?line ?t:format( "#### InfoB ~p~n",[InfoB]),
- ?line ?t:format( "#### InfoC ~p~n",[InfoC]),
- ?line ?t:format( "#### InfoD ~p~n",[InfoD]),
- ?line ?t:format( "#### InfoE ~p~n",[InfoE]),
+ io:format( "#### Info1 ~p~n",[Info1]),
+ io:format( "#### Info2 ~p~n",[Info2]),
+ io:format( "#### Info3 ~p~n",[Info3]),
+ io:format( "#### InfoA ~p~n",[InfoA]),
+ io:format( "#### InfoB ~p~n",[InfoB]),
+ io:format( "#### InfoC ~p~n",[InfoC]),
+ io:format( "#### InfoD ~p~n",[InfoD]),
+ io:format( "#### InfoE ~p~n",[InfoE]),
?line {global_groups, GGNodes} = NewNG,
@@ -3751,10 +3751,10 @@ pr_diff(Str, T0, T1) ->
{_, {H,M,S}} = calendar:time_difference(T0, T1),
((H*60+M)*60)+S
end,
- test_server:format(1,"~13s: ~w (diff: ~w)",[Str, T1, Diff]),
+ ct:pal(?HI_VERBOSITY,"~13s: ~w (diff: ~w)",[Str, T1, Diff]),
if
Diff > 100 ->
- test_server:format(1,"~s: ** LARGE DIFF ~w~n", [Str, Diff]);
+ io:format(1,"~s: ** LARGE DIFF ~w~n", [Str, Diff]);
true ->
ok
end.
@@ -4189,7 +4189,7 @@ wait_for_ready_net(Config) ->
wait_for_ready_net(Nodes0, Config) ->
Nodes = lists:sort(Nodes0),
- ?t:format("wait_for_ready_net ~p~n", [Nodes]),
+ io:format("wait_for_ready_net ~p~n", [Nodes]),
?UNTIL(begin
lists:all(fun(N) -> Nodes =:= get_known(N) end, Nodes) and
lists:all(fun(N) ->
diff --git a/lib/kernel/test/heart_SUITE.erl b/lib/kernel/test/heart_SUITE.erl
index aa25a77aa8..3b12549194 100644
--- a/lib/kernel/test/heart_SUITE.erl
+++ b/lib/kernel/test/heart_SUITE.erl
@@ -46,7 +46,7 @@ end_per_testcase(_Func, _Config) ->
NNam = list_to_atom(hd(string:tokens(atom_to_list(X),"@"))),
case NNam of
heart_test ->
- ?t:format(1, "WARNING: Killed ~p~n", [X]),
+ ct:pal(?HI_VERBOSITY, "WARNING: Killed ~p~n", [X]),
rpc:cast(X, erlang, halt, []);
_ ->
ok
@@ -228,7 +228,7 @@ node_start_immediately_after_crash_test(Config) when is_list(Config) ->
T0 = now(),
receive {nodedown, Node} ->
- test_server:format("Took ~.2f s. for node to go down~n", [timer:now_diff(now(), T0)/1000000]),
+ io:format("Took ~.2f s. for node to go down~n", [timer:now_diff(now(), T0)/1000000]),
ok
%% timeout is very liberal here. nodedown is received in about 1 s. on linux (palantir)
%% and in about 10 s. on solaris (carcharoth)
diff --git a/lib/kernel/test/inet_SUITE.erl b/lib/kernel/test/inet_SUITE.erl
index 5b238095b4..5719955f86 100644
--- a/lib/kernel/test/inet_SUITE.erl
+++ b/lib/kernel/test/inet_SUITE.erl
@@ -99,7 +99,7 @@ init_per_testcase(lookup_bad_search_option, Config) ->
Prev = ets:lookup(Db, Key),
ets:delete(Db, Key),
ets:insert(Db, {Key,[lookup_bad_search_option]}),
- ?t:format("Misconfigured resolver lookup order", []),
+ io:format("Misconfigured resolver lookup order", []),
[{Key,Prev}|Config];
init_per_testcase(_Func, Config) ->
Config.
@@ -110,7 +110,7 @@ end_per_testcase(lookup_bad_search_option, Config) ->
Prev = proplists:get_value(Key, Config),
ets:delete(Db, Key),
ets:insert(Db, Prev),
- ?t:format("Restored resolver lookup order", []);
+ io:format("Restored resolver lookup order", []);
end_per_testcase(_Func, _Config) ->
ok.
@@ -845,13 +845,13 @@ gethostnative_control_1(Config,
%% I repeatedly do inet_gethost_native:control/1.
?line TrapExit = process_flag(trap_exit, true),
?line gethostnative_control_2([undefined], Interval, Delay, Cnt, N, Hosts),
- ?line test_server:format(
+ io:format(
"First intermission: now starting control sequence ~w\n",
[Seq]),
?line erlang:display(first_intermission),
?line gethostnative_control_2(Seq, Interval, Delay, Cnt, N, Hosts),
?line erlang:display(second_intermission),
- ?line test_server:format(
+ io:format(
"Second intermission: now stopping control sequence ~w\n",
[Seq]),
?line gethostnative_control_2([undefined], Interval, Delay, Cnt, N, Hosts),
@@ -1013,7 +1013,7 @@ getifaddrs(doc) ->
"Test inet:gifaddrs/0";
getifaddrs(Config) when is_list (Config) ->
?line {ok,IfAddrs} = inet:getifaddrs(),
- ?line ?t:format("IfAddrs = ~p.~n", [IfAddrs]),
+ io:format("IfAddrs = ~p.~n", [IfAddrs]),
?line
case
{os:type(),
@@ -1027,17 +1027,17 @@ getifaddrs(Config) when is_list (Config) ->
end,
?line Addrs =
[element(1, A) || A <- ifaddrs(IfAddrs)],
- ?line ?t:format("Addrs = ~p.~n", [Addrs]),
+ io:format("Addrs = ~p.~n", [Addrs]),
?line [check_addr(Addr) || Addr <- Addrs],
ok.
check_addr(Addr)
when tuple_size(Addr) =:= 8,
element(1, Addr) band 16#FFC0 =:= 16#FE80 ->
- ?line ?t:format("Addr: ~p link local; SKIPPED!~n", [Addr]),
+ io:format("Addr: ~p link local; SKIPPED!~n", [Addr]),
ok;
check_addr(Addr) ->
- ?line ?t:format("Addr: ~p.~n", [Addr]),
+ io:format("Addr: ~p.~n", [Addr]),
?line Ping = "ping",
?line Pong = "pong",
?line {ok,L} = gen_tcp:listen(0, [{ip,Addr},{active,false}]),
@@ -1069,7 +1069,7 @@ ifaddrs([{If,Opts}|IOs]) ->
check_ifopts([], #ifopts{name=If,flags=Flags,addrs=Raddrs}=Ifopts) ->
Addrs = lists:reverse(Raddrs),
R = Ifopts#ifopts{addrs=Addrs},
- ?t:format("~p.~n", [R]),
+ io:format("~p.~n", [R]),
%% See how we did...
if is_list(Flags) -> ok;
true ->
diff --git a/lib/kernel/test/init_SUITE.erl b/lib/kernel/test/init_SUITE.erl
index a1f92546d0..ef8e45a3fd 100644
--- a/lib/kernel/test/init_SUITE.erl
+++ b/lib/kernel/test/init_SUITE.erl
@@ -268,7 +268,7 @@ boot_var(Config) when is_list(Config) ->
%% What we need is not so much version numbers on the directories, but
%% for the boot var TEST_VAR to appear in the boot script, and it doesn't
%% if we give the 'local' option to systools:make_script.
- ?t:format(
+ io:format(
"Test case not complete as we are not~n"
"running in a real system!~n"
"Probably this test is performed in a "
diff --git a/lib/kernel/test/pg2_SUITE.erl b/lib/kernel/test/pg2_SUITE.erl
index 8ed54b7d0f..b42d37b459 100644
--- a/lib/kernel/test/pg2_SUITE.erl
+++ b/lib/kernel/test/pg2_SUITE.erl
@@ -359,7 +359,7 @@ ts() ->
].
do(Cs, T, Config) ->
- ?t:format("*** Test ~p ***~n", [T]),
+ io:format("*** Test ~p ***~n", [T]),
{ok,T} = (catch {do(Cs, [], [], Config),T}).
do([{nodeup,N} | Cs], Ps, Ns, Config) ->
@@ -411,7 +411,7 @@ doit(N, C, Ps, Ns) ->
Result when Result =:= R orelse R =:= ignore ->
sane(Ns);
Else ->
- ?t:format("~p and ~p: expected ~p, but got ~p~n",
+ io:format("~p and ~p: expected ~p, but got ~p~n",
[F, As, R, Else]),
throw({error,{F, As, R, Else}})
end.
@@ -432,8 +432,8 @@ killit(N, P, Ps, Ns) ->
lists:keydelete(P, 1, Ps).
pr(Node, C) ->
- _ = [?t:format("~p: ", [Node]) || Node =/= node()],
- ?t:format("do ~p~n", [C]).
+ _ = [io:format("~p: ", [Node]) || Node =/= node()],
+ io:format("do ~p~n", [C]).
get_node(N, Ns) ->
if
@@ -461,7 +461,7 @@ replace_pids(A, Ps) ->
sane(Ns) ->
Nodes = [node()] ++ [NN || {_,NN} <- Ns],
- _ = [?t:format("~p, pg2_table:~n ~p~n", % debug
+ _ = [io:format("~p, pg2_table:~n ~p~n", % debug
[N, rpc:call(N, ets, tab2list, [pg2_table])]) ||
N <- Nodes],
R = [case rpc:call(Node, ?MODULE, sane, []) of
@@ -712,7 +712,7 @@ wait_for_ready_net(Config) ->
wait_for_ready_net(Nodes0, Config) ->
Nodes = lists:sort(Nodes0),
- ?t:format("wait_for_ready_net ~p~n", [Nodes]),
+ io:format("wait_for_ready_net ~p~n", [Nodes]),
?UNTIL(begin
lists:all(fun(N) -> Nodes =:= get_known(N) end, Nodes) and
lists:all(fun(N) ->
diff --git a/lib/kernel/test/prim_file_SUITE.erl b/lib/kernel/test/prim_file_SUITE.erl
index 92d44c8880..ce00cdcead 100644
--- a/lib/kernel/test/prim_file_SUITE.erl
+++ b/lib/kernel/test/prim_file_SUITE.erl
@@ -904,7 +904,7 @@ file_info_int(Config, Handle, Suffix) ->
%% platforms such as Windows95.
RootDir = filename:join([proplists:get_value(priv_dir, Config)]),
- ?line test_server:format("RootDir = ~p", [RootDir]),
+ io:format("RootDir = ~p", [RootDir]),
?line Name = filename:join(RootDir,
atom_to_list(?MODULE)
@@ -987,7 +987,7 @@ file_write_file_info_b(Config) when is_list(Config) ->
file_write_file_info(Config, Handle, Suffix) ->
?line RootDir = get_good_directory(Config),
- ?line test_server:format("RootDir = ~p", [RootDir]),
+ io:format("RootDir = ~p", [RootDir]),
%% Set the file to read only AND update the file times at the same time.
%% (This used to fail on Windows NT/95 for a local filesystem.)
@@ -1063,7 +1063,7 @@ file_write_file_info_opts(doc) -> [];
file_write_file_info_opts(Config) when is_list(Config) ->
{ok, Handle} = ?PRIM_FILE:start(),
RootDir = get_good_directory(Config),
- test_server:format("RootDir = ~p", [RootDir]),
+ io:format("RootDir = ~p", [RootDir]),
Name = filename:join(RootDir, atom_to_list(?MODULE) ++"_write_file_info_opts"),
ok = ?PRIM_FILE:write_file(Name, "hello_opts"),
@@ -1102,7 +1102,7 @@ file_read_file_info_opts(doc) -> [];
file_read_file_info_opts(Config) when is_list(Config) ->
{ok, Handle} = ?PRIM_FILE:start(),
RootDir = get_good_directory(Config),
- test_server:format("RootDir = ~p", [RootDir]),
+ io:format("RootDir = ~p", [RootDir]),
Name = filename:join(RootDir, atom_to_list(?MODULE) ++"_read_file_info_opts"),
ok = ?PRIM_FILE:write_file(Name, "hello_opts"),
@@ -1121,7 +1121,7 @@ file_write_read_file_info_opts(doc) -> [];
file_write_read_file_info_opts(Config) when is_list(Config) ->
{ok, Handle} = ?PRIM_FILE:start(),
RootDir = get_good_directory(Config),
- test_server:format("RootDir = ~p", [RootDir]),
+ io:format("RootDir = ~p", [RootDir]),
Name = filename:join(RootDir, atom_to_list(?MODULE) ++"_read_write_file_info_opts"),
ok = ?PRIM_FILE:write_file(Name, "hello_opts2"),