aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/test
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2016-03-09 06:34:35 +0100
committerBjörn Gustavsson <[email protected]>2016-03-10 15:11:00 +0100
commit3dfdf35c65b8985a3abe21ef83f27cc8e82ba11c (patch)
tree2cf538c8009b53cbbd74eb8be9546d90fbe9f730 /lib/kernel/test
parent729f4375d2c1985825c1d51705aad77616d3d66b (diff)
downloadotp-3dfdf35c65b8985a3abe21ef83f27cc8e82ba11c.tar.gz
otp-3dfdf35c65b8985a3abe21ef83f27cc8e82ba11c.tar.bz2
otp-3dfdf35c65b8985a3abe21ef83f27cc8e82ba11c.zip
Fix comments
Remove out-commented code. Make sure that comments that are not at the end of a line starts with two '%' characters and not just one. That will become important later when we'll remove all ?line macros and ask Emacs to re-indent the files.
Diffstat (limited to 'lib/kernel/test')
-rw-r--r--lib/kernel/test/application_SUITE.erl208
-rw-r--r--lib/kernel/test/bif_SUITE.erl30
-rw-r--r--lib/kernel/test/code_SUITE.erl45
-rw-r--r--lib/kernel/test/disk_log_SUITE.erl128
-rw-r--r--lib/kernel/test/erl_boot_server_SUITE.erl4
-rw-r--r--lib/kernel/test/erl_distribution_SUITE.erl53
-rw-r--r--lib/kernel/test/erl_distribution_wb_SUITE.erl6
-rw-r--r--lib/kernel/test/error_logger_warn_SUITE.erl16
-rw-r--r--lib/kernel/test/file_SUITE.erl56
-rw-r--r--lib/kernel/test/file_name_SUITE.erl16
-rw-r--r--lib/kernel/test/gen_tcp_echo_SUITE.erl4
-rw-r--r--lib/kernel/test/gen_tcp_misc_SUITE.erl18
-rw-r--r--lib/kernel/test/gen_udp_SUITE.erl18
-rw-r--r--lib/kernel/test/global_SUITE.erl324
-rw-r--r--lib/kernel/test/global_group_SUITE.erl120
-rw-r--r--lib/kernel/test/inet_sockopt_SUITE.erl6
-rw-r--r--lib/kernel/test/interactive_shell_SUITE.erl6
-rw-r--r--lib/kernel/test/kernel_SUITE.erl10
-rw-r--r--lib/kernel/test/kernel_config_SUITE.erl2
-rw-r--r--lib/kernel/test/pdict_SUITE.erl1
-rw-r--r--lib/kernel/test/pg2_SUITE.erl12
-rw-r--r--lib/kernel/test/prim_file_SUITE.erl54
-rw-r--r--lib/kernel/test/seq_trace_SUITE.erl7
-rw-r--r--lib/kernel/test/wrap_log_reader_SUITE.erl2
24 files changed, 575 insertions, 571 deletions
diff --git a/lib/kernel/test/application_SUITE.erl b/lib/kernel/test/application_SUITE.erl
index 9f368eb07b..a0a7632d1b 100644
--- a/lib/kernel/test/application_SUITE.erl
+++ b/lib/kernel/test/application_SUITE.erl
@@ -125,14 +125,14 @@ failover(Conf) when is_list(Conf) ->
NoSyncTime = config_fun_fast(config_fo(NodeNames)),
WithSyncTime = config_fun(config_fo(NodeNames)),
- % Test [cp1, cp2, cp3]
+ %% Test [cp1, cp2, cp3]
{ok, Cp1} = start_node_config(Ncp1, NoSyncTime, Conf),
{ok, Cp2} = start_node_config(Ncp2, NoSyncTime, Conf),
{ok, Cp3} = start_node_config(Ncp3, WithSyncTime, Conf),
Cps = [Cp1, Cp2, Cp3],
wait_for_ready_net(),
- % Start app1 and make sure cp1 starts it
+ %% Start app1 and make sure cp1 starts it
{[ok,ok,ok],[]} =
rpc:multicall(Cps, application, load, [app1()]),
?UNTIL(is_loaded(app1, Cps)),
@@ -142,12 +142,12 @@ failover(Conf) when is_list(Conf) ->
false = is_started(app1, Cp2),
ok = get_start_type(#st{normal = 3}),
- % Stop cp1 and make sure cp2 starts app1
+ %% Stop cp1 and make sure cp2 starts app1
stop_node_nice(Cp1),
?UNTIL(is_started(app1, Cp2)),
ok = get_start_type(#st{normal = 3}),
- % Restart cp1 and make sure it restarts app1
+ %% Restart cp1 and make sure it restarts app1
{ok, Cp1_2} = start_node_config(Ncp1, NoSyncTime, Conf),
global:sync(),
ok = rpc:call(Cp1_2, application, load, [app1()]),
@@ -156,8 +156,8 @@ failover(Conf) when is_list(Conf) ->
?UNTIL(not is_started(app1, Cp2)),
ok = get_start_type(#st{takeover = 3}),
- % Test [{cp1, cp2}, cp3]
- % Start app_sp and make sure cp2 starts it (cp1 has more apps started)
+ %% Test [{cp1, cp2}, cp3]
+ %% Start app_sp and make sure cp2 starts it (cp1 has more apps started)
{[ok,ok,ok],[]} =
rpc:multicall([Cp1_2, Cp2, Cp3], application, load, [app_sp()]),
{[ok,ok,ok],[]} =
@@ -167,17 +167,17 @@ failover(Conf) when is_list(Conf) ->
false = is_started(app_sp, Cp3),
ok = get_start_type(#st{normal = 3}),
- % Stop cp2 and make sure cp1 starts app_sp
+ %% Stop cp2 and make sure cp1 starts app_sp
stop_node_nice(Cp2),
?UNTIL(is_started(app_sp, Cp1_2)),
ok = get_start_type(#st{failover = 3}),
- % Stop cp1 and make sure cp3 starts app_sp
+ %% Stop cp1 and make sure cp3 starts app_sp
stop_node_nice(Cp1_2),
?UNTIL(is_started(app_sp, Cp3)),
ok = get_start_type(#st{normal = 3, failover = 3}),
- % Restart cp2 and make sure it restarts app_sp
+ %% Restart cp2 and make sure it restarts app_sp
{ok, Cp2_2} = start_node_config(Ncp2, NoSyncTime, Conf),
global:sync(),
ok = rpc:call(Cp2_2, application, load, [app_sp()]),
@@ -186,7 +186,7 @@ failover(Conf) when is_list(Conf) ->
?UNTIL(not is_started(app_sp, Cp3)),
ok = get_start_type(#st{takeover = 3}),
- % Restart cp1 and make sure it doesn't restart app_sp
+ %% Restart cp1 and make sure it doesn't restart app_sp
{ok, Cp1_3} = start_node_config(Ncp1, NoSyncTime, Conf),
global:sync(),
ok = rpc:call(Cp1_3, application, load, [app_sp()]),
@@ -195,7 +195,7 @@ failover(Conf) when is_list(Conf) ->
false = is_started(app_sp, Cp1_3),
true = is_started(app_sp, Cp2_2),
- % Force takeover to cp1
+ %% Force takeover to cp1
ok = rpc:call(Cp1_3, application, takeover, [app_sp, permanent]),
?UNTIL(is_started(app_sp, Cp1_3)),
?UNTIL(not is_started(app_sp, Cp2_2)),
@@ -229,14 +229,14 @@ failover_comp(Conf) when is_list(Conf) ->
NoSyncTime = config_fun_fast(config(NodeNames)),
WithSyncTime = config_fun(config(NodeNames)),
- % Test [cp1, cp2, cp3]
+ %% Test [cp1, cp2, cp3]
{ok, Cp1} = start_node_config(Ncp1, NoSyncTime, Conf),
{ok, Cp2} = start_node_config(Ncp2, NoSyncTime, Conf),
{ok, Cp3} = start_node_config(Ncp3, WithSyncTime, Conf),
Cps = [Cp1, Cp2, Cp3],
wait_for_ready_net(),
- % Start app1 and make sure cp1 starts it
+ %% Start app1 and make sure cp1 starts it
{[ok,ok,ok],[]} =
rpc:multicall(Cps, application, load, [app1()]),
?UNTIL(is_loaded(app1, Cps)),
@@ -246,12 +246,12 @@ failover_comp(Conf) when is_list(Conf) ->
false = is_started(app1, Cp2),
ok = get_start_type(#st{normal = 3}),
- % Stop cp1 and make sure cp2 starts app1
+ %% Stop cp1 and make sure cp2 starts app1
stop_node_nice(Cp1),
?UNTIL(is_started(app1, Cp2)),
ok = get_start_type(#st{normal = 3}),
- % Restart cp1 and make sure it restarts app1
+ %% Restart cp1 and make sure it restarts app1
{ok, Cp1_2} = start_node_config(Ncp1, NoSyncTime, Conf),
global:sync(),
ok = rpc:call(Cp1_2, application, load, [app1()]),
@@ -261,8 +261,8 @@ failover_comp(Conf) when is_list(Conf) ->
?UNTIL(not is_started(app1, Cp2)),
ok = get_start_type(#st{takeover = 3}),
- % Test [{cp1, cp2}, cp3]
- % Start app3 and make sure cp2 starts it (cp1 has more apps started)
+ %% Test [{cp1, cp2}, cp3]
+ %% Start app3 and make sure cp2 starts it (cp1 has more apps started)
{[ok,ok,ok],[]} =
rpc:multicall([Cp1_2, Cp2, Cp3], application, load, [app3()]),
?UNTIL(is_loaded(app3, [Cp1_2, Cp2, Cp3])),
@@ -273,17 +273,17 @@ failover_comp(Conf) when is_list(Conf) ->
false = is_started(app3, Cp3),
ok = get_start_type(#st{normal = 3}),
- % Stop cp2 and make sure cp1 starts app3
+ %% Stop cp2 and make sure cp1 starts app3
stop_node_nice(Cp2),
?UNTIL(is_started(app3, Cp1_2)),
ok = get_start_type(#st{normal = 3}),
- % Stop cp1 and make sure cp3 starts app3
+ %% Stop cp1 and make sure cp3 starts app3
stop_node_nice(Cp1_2),
?UNTIL(is_started(app3, Cp3)),
ok = get_start_type(#st{normal = 6}),
- % Restart cp2 and make sure it restarts app3
+ %% Restart cp2 and make sure it restarts app3
{ok, Cp2_2} = start_node_config(Ncp2, NoSyncTime, Conf),
global:sync(),
ok = rpc:call(Cp2_2, application, load, [app3()]),
@@ -293,7 +293,7 @@ failover_comp(Conf) when is_list(Conf) ->
?UNTIL(not is_started(app3, Cp3)),
ok = get_start_type(#st{takeover = 3}),
- % Restart cp1 and make sure it doesn't restart app3
+ %% Restart cp1 and make sure it doesn't restart app3
{ok, Cp1_3} = start_node_config(Ncp1, NoSyncTime, Conf),
global:sync(),
ok = rpc:call(Cp1_3, application, load, [app3()]),
@@ -303,7 +303,7 @@ failover_comp(Conf) when is_list(Conf) ->
false = is_started(app3, Cp1_3),
true = is_started(app3, Cp2_2),
- % Force takeover to cp1
+ %% Force takeover to cp1
ok = rpc:call(Cp1_3, application, takeover, [app3, permanent]),
?UNTIL(is_started(app3, Cp1_3)),
?UNTIL(not is_started(app3, Cp2_2)),
@@ -332,14 +332,14 @@ permissions(Conf) when is_list(Conf) ->
NoSyncTime = config_fun_fast(config2(NodeNames)),
WithSyncTime = config_fun(config2(NodeNames)),
- % Test [cp1, cp2, cp3]
+ %% Test [cp1, cp2, cp3]
{ok, Cp1} = start_node_config(Ncp1, NoSyncTime, Conf),
{ok, Cp2} = start_node_config(Ncp2, NoSyncTime, Conf),
{ok, Cp3} = start_node_config(Ncp3, WithSyncTime, Conf),
Cps = [Cp1, Cp2, Cp3],
wait_for_ready_net(),
- % Start app1 and make sure cp1 starts it
+ %% Start app1 and make sure cp1 starts it
{[ok,ok,ok],[]} =
rpc:multicall(Cps, application, load, [app1()]),
?UNTIL(is_loaded(app1, Cps)),
@@ -348,24 +348,24 @@ permissions(Conf) when is_list(Conf) ->
?UNTIL(is_started(app1, Cp1)),
false = is_started(app1, Cp2),
- % Unpermit app1 on cp1, make sure cp2 starts it
+ %% Unpermit app1 on cp1, make sure cp2 starts it
ok = rpc:call(Cp1, application, permit, [app1, false]),
false = is_started(app1, Cp1),
true = is_started(app1, Cp2),
- % Unpermit app1 on cp2, make sure cp3 starts it
+ %% Unpermit app1 on cp2, make sure cp3 starts it
ok = rpc:call(Cp2, application, permit, [app1, false]),
false = is_started(app1, Cp1),
false = is_started(app1, Cp2),
true = is_started(app1, Cp3),
- % Permit cp2 again
+ %% Permit cp2 again
ok = rpc:call(Cp2, application, permit, [app1, true]),
false = is_started(app1, Cp1),
false = is_started(app1, Cp3),
true = is_started(app1, Cp2),
- % Start app3, make sure noone starts it
+ %% Start app3, make sure noone starts it
{[ok,ok,ok],[]} =
rpc:multicall(Cps, application, load, [app3()]),
?UNTIL(is_loaded(app3, Cps)),
@@ -376,22 +376,22 @@ permissions(Conf) when is_list(Conf) ->
false = is_started(app3, Cp2),
false = is_started(app3, Cp3),
- % Permit app3 on Cp3
+ %% Permit app3 on Cp3
ok = rpc:call(Cp3, application, permit, [app3, true]),
true = is_started(app3, Cp3),
- % Permit app3 on Cp2, make sure it starts it
+ %% Permit app3 on Cp2, make sure it starts it
ok = rpc:call(Cp2, application, permit, [app3, true]),
true = is_started(app3, Cp2),
false = is_started(app3, Cp3),
- % Permit app3 on Cp1, make sure it doesn't start it
+ %% Permit app3 on Cp1, make sure it doesn't start it
ok = rpc:call(Cp1, application, permit, [app3, true]),
false = is_started(app3, Cp1),
true = is_started(app3, Cp2),
false = is_started(app3, Cp3),
- % Stop Cp2, make sure Cp1 starts app3
+ %% Stop Cp2, make sure Cp1 starts app3
stop_node_nice(Cp2),
?UNTIL(is_started(app3, Cp1)),
@@ -409,7 +409,7 @@ load(Conf) when is_list(Conf) ->
NoSyncTime = config_fun_fast(config3(NodeNames)),
WithSyncTime = config_fun(config3(NodeNames)),
- % Test [cp1, cp2, cp3]
+ %% Test [cp1, cp2, cp3]
{ok, Cp1} = start_node_config(Ncp1, NoSyncTime, Conf),
{ok, Cp2} = start_node_config(Ncp2, NoSyncTime, Conf),
{ok, Cp3} = start_node_config(Ncp3, WithSyncTime, Conf),
@@ -425,7 +425,7 @@ load(Conf) when is_list(Conf) ->
false = is_started(app1, Cp2),
false = is_started(app1, Cp3),
- % Load app1 with different specs and make sure we get an error
+ %% Load app1 with different specs and make sure we get an error
{[{error,_},{error,_}],[]} =
rpc:multicall([Cp1, Cp2], application, load, [app1(), d1(NodeNames)]),
{error, _} = rpc:call(Cp3, application, load, [app1(), d2(NodeNames)]),
@@ -444,7 +444,7 @@ load_use_cache(Conf) when is_list(Conf) ->
NoSyncTime = config_fun_fast(config3(NodeNames)),
WithSyncTime = config_fun(config3(NodeNames)),
- % Test [cp1, cp2, cp3]
+ %% Test [cp1, cp2, cp3]
{ok, Cp1} = start_node_with_cache(Ncp1, NoSyncTime, Conf),
{ok, Cp2} = start_node_with_cache(Ncp2, NoSyncTime, Conf),
{ok, Cp3} = start_node_with_cache(Ncp3, WithSyncTime, Conf),
@@ -459,7 +459,7 @@ load_use_cache(Conf) when is_list(Conf) ->
?UNTIL(is_started(app1, Cp1)),
false = is_started(app1, Cp2),
- % Load app1 with different specs and make sure we get an error
+ %% Load app1 with different specs and make sure we get an error
{[{error,_},{error,_}],[]} =
rpc:multicall([Cp1, Cp2], application, load, [app1(), d1(NodeNames)]),
{error, _} = rpc:call(Cp3, application, load, [app1(), d2(NodeNames)]),
@@ -543,7 +543,7 @@ script_start(Conf) when is_list(Conf) ->
yes = global:register_name(st_type, StPid),
- % Create the .app files and the boot script
+ %% Create the .app files and the boot script
ok = create_app(),
{{KernelVer,StdlibVer}, _} = create_script("latest"),
case is_real_system(KernelVer, StdlibVer) of
@@ -558,7 +558,7 @@ script_start(Conf) when is_list(Conf) ->
NoSyncTime = config_fun_fast(config_fo(NodeNames)),
WithSyncTime = config_fun(config_fo(NodeNames)),
- % Test [cp1, cp2, cp3]
+ %% Test [cp1, cp2, cp3]
{ok, Cp1} = start_node_boot_config(Ncp1, NoSyncTime, Conf, latest),
{ok, Cp2} = start_node_boot_config(Ncp2, NoSyncTime, Conf, latest),
{ok, Cp3} = start_node_boot_config(Ncp3, WithSyncTime, Conf, latest),
@@ -570,16 +570,16 @@ script_start(Conf) when is_list(Conf) ->
false = is_started(app1, Cp2),
ok = get_start_type(#st{normal = 9}),
- % Stop cp1 and make sure cp2 starts app1, app2 normally (no
- % start_phases defined) and app_sp as failover (start_phases
- % defined)
+ %% Stop cp1 and make sure cp2 starts app1, app2 normally (no
+ %% start_phases defined) and app_sp as failover (start_phases
+ %% defined)
stop_node_nice(Cp1),
?UNTIL(is_started(app1, Cp2)),
?UNTIL(is_started(app2, Cp2)),
?UNTIL(is_started(app_sp, Cp2)),
ok = get_start_type(#st{normal = 6, failover = 3}),
- % Restart cp1, Cp1 takesover app1 and app2
+ %% Restart cp1, Cp1 takesover app1 and app2
{ok, Cp1_2} = start_node_boot_config(Ncp1, NoSyncTime, Conf, latest),
global:sync(),
?UNTIL(is_started(app1, Cp1_2)),
@@ -590,20 +590,20 @@ script_start(Conf) when is_list(Conf) ->
?UNTIL(not is_started(app2, Cp2)),
ok = get_start_type(#st{takeover = 6}),
- % Stop cp2 and make sure cp1 starts app_sp.
+ %% Stop cp2 and make sure cp1 starts app_sp.
false = is_started(app_sp, Cp1_2),
stop_node_nice(Cp2),
?UNTIL(is_started(app_sp, Cp1_2)),
ok = get_start_type(#st{failover = 3}),
- % Stop cp1 and make sure cp3 starts app1, app2 and app_sp
+ %% Stop cp1 and make sure cp3 starts app1, app2 and app_sp
stop_node_nice(Cp1_2),
?UNTIL(is_started(app_sp, Cp3)),
?UNTIL(is_started(app1, Cp3)),
?UNTIL(is_started(app2, Cp3)),
ok = get_start_type(#st{normal = 6, failover = 3}),
- % Restart cp2 and make sure it takesover app1, app2 and app_sp
+ %% Restart cp2 and make sure it takesover app1, app2 and app_sp
{ok, Cp2_2} = start_node_boot_config(Ncp2, NoSyncTime, Conf, latest),
global:sync(),
?UNTIL(is_started(app_sp, Cp2_2)),
@@ -614,7 +614,7 @@ script_start(Conf) when is_list(Conf) ->
?UNTIL(not is_started(app2, Cp3)),
ok = get_start_type(#st{takeover = 9}),
- % Restart cp1 and make sure it takesover app1, app2
+ %% Restart cp1 and make sure it takesover app1, app2
{ok, Cp1_3} = start_node_boot_config(Ncp1, NoSyncTime, Conf, latest),
global:sync(),
?UNTIL(is_started(app1, Cp1_3)),
@@ -625,7 +625,7 @@ script_start(Conf) when is_list(Conf) ->
?UNTIL(not is_started(app2, Cp2_2)),
ok = get_start_type(#st{takeover = 6}),
- % Force takeover to cp1
+ %% Force takeover to cp1
ok = rpc:call(Cp1_3, application, takeover, [app_sp, permanent]),
?UNTIL(is_started(app_sp, Cp1_3)),
?UNTIL(not is_started(app_sp, Cp2_2)),
@@ -654,7 +654,7 @@ permit_false_start_local(Conf) when is_list(Conf) ->
%% This configuration does not start dist_ac.
Config = write_config_file(fun config_perm/1, Conf),
- % Test [cp1, cp2, cp3]
+ %% Test [cp1, cp2, cp3]
[Ncp1, Ncp2, Ncp3] = node_names([cp1, cp2, cp3], Conf),
{ok, Cp1} = start_node(Ncp1, Config),
{ok, Cp2} = start_node(Ncp2, Config),
@@ -677,14 +677,14 @@ permit_false_start_local(Conf) when is_list(Conf) ->
false = is_started(app1, Cp2),
false = is_started(app1, Cp3),
- %Permit a not started application
+ %% Permit a not started application
ok = rpc:call(Cp1, application, permit, [app3, true]),
ct:sleep(1000),
false = is_started(app3, Cp1),
false = is_started(app3, Cp2),
false = is_started(app3, Cp3),
- %Permit a not loaded application
+ %% Permit a not loaded application
{error,{not_loaded,app_notloaded}} =
rpc:call(Cp1, application, permit, [app_notloaded, true]),
ct:sleep(1000),
@@ -692,14 +692,14 @@ permit_false_start_local(Conf) when is_list(Conf) ->
false = is_started(app_notloaded, Cp2),
false = is_started(app_notloaded, Cp3),
- %Unpermit a not started application
+ %% Unpermit a not started application
ok = rpc:call(Cp1, application, permit, [app3, false]),
ct:sleep(1000),
false = is_started(app3, Cp1),
false = is_started(app3, Cp2),
false = is_started(app3, Cp3),
- %Unpermit a not loaded application
+ %% Unpermit a not loaded application
{error,{not_loaded,app_notloaded}} =
rpc:call(Cp1, application, permit, [app_notloaded, false]),
ct:sleep(1000),
@@ -707,64 +707,64 @@ permit_false_start_local(Conf) when is_list(Conf) ->
false = is_started(app_notloaded, Cp2),
false = is_started(app_notloaded, Cp3),
- % Permit app1 on CP1 and make sure it is started
+ %% Permit app1 on CP1 and make sure it is started
ok = rpc:call(Cp1, application, permit, [app1, true]),
?UNTIL(is_started(app1, Cp1)),
false = is_started(app1, Cp2),
false = is_started(app1, Cp3),
- % Permit it again
+ %% Permit it again
ok = rpc:call(Cp1, application, permit, [app1, true]),
ct:sleep(1000),
true = is_started(app1, Cp1),
false = is_started(app1, Cp2),
false = is_started(app1, Cp3),
- % Permit app2 on CP1 and make sure it is started
+ %% Permit app2 on CP1 and make sure it is started
ok = rpc:call(Cp1, application, permit, [app2, true]),
?UNTIL(is_started(app2, Cp1)),
false = is_started(app2, Cp2),
false = is_started(app2, Cp3),
- % Permit app1 on CP2 and make sure it is started
+ %% Permit app1 on CP2 and make sure it is started
ok = rpc:call(Cp2, application, permit, [app1, true]),
?UNTIL(is_started(app1, Cp2)),
true = is_started(app1, Cp1),
false = is_started(app1, Cp3),
- % Unpermit app1 on CP1 and make sure it is stopped
+ %% Unpermit app1 on CP1 and make sure it is stopped
ok = rpc:call(Cp1, application, permit, [app1, false]),
?UNTIL(false =:= is_started(app1, Cp1)),
true = is_started(app1, Cp2),
false = is_started(app1, Cp3),
- % Unpermit it agin
+ %% Unpermit it agin
ok = rpc:call(Cp1, application, permit, [app1, false]),
ct:sleep(1000),
false = is_started(app1, Cp1),
true = is_started(app1, Cp2),
false = is_started(app1, Cp3),
- % Permit app1 on CP1 and make sure it is started
+ %% Permit app1 on CP1 and make sure it is started
ok = rpc:call(Cp1, application, permit, [app1, true]),
?UNTIL(is_started(app1, Cp1)),
true = is_started(app1, Cp2),
false = is_started(app1, Cp3),
- % Unpermit app1 on CP1 and make sure it is stopped
+ %% Unpermit app1 on CP1 and make sure it is stopped
ok = rpc:call(Cp1, application, permit, [app1, false]),
?UNTIL(false =:= is_started(app1, Cp1)),
true = is_started(app1, Cp2),
false = is_started(app1, Cp3),
- % Unpermit app1 on CP2 and make sure it is stopped
+ %% Unpermit app1 on CP2 and make sure it is stopped
ok = rpc:call(Cp2, application, permit, [app1, false]),
ct:sleep(1000),
?UNTIL(false =:= is_started(app1, Cp2)),
false = is_started(app1, Cp1),
false = is_started(app1, Cp3),
- % Unpermit app2 on CP1 and make sure it is stopped
+ %% Unpermit app2 on CP1 and make sure it is stopped
ok = rpc:call(Cp1, application, permit, [app2, false]),
?UNTIL(false =:= is_started(app2, Cp2)),
false = is_started(app2, Cp1),
@@ -783,7 +783,7 @@ permit_false_start_dist(Conf) when is_list(Conf) ->
NoSyncTime = config_fun_fast(config_perm2(NodeNames)),
WithSyncTime = config_fun(config_perm2(NodeNames)),
- % Test [cp1, cp2, cp3]
+ %% Test [cp1, cp2, cp3]
{ok, Cp1} = start_node_config(Ncp1, NoSyncTime, Conf),
{ok, Cp2} = start_node_config(Ncp2, NoSyncTime, Conf),
{ok, Cp3} = start_node_config(Ncp3, WithSyncTime, Conf),
@@ -803,14 +803,14 @@ permit_false_start_dist(Conf) when is_list(Conf) ->
false = is_started(app1, Cp2),
false = is_started(app1, Cp3),
- %Permit a not started application
+ %% Permit a not started application
ok = rpc:call(Cp1, application, permit, [app2, true]),
ct:sleep(1000),
false = is_started(app2, Cp1),
false = is_started(app2, Cp2),
false = is_started(app2, Cp3),
- %Permit a not loaded application
+ %% Permit a not loaded application
{error,{not_loaded,app3}} =
rpc:call(Cp1, application, permit, [app3, true]),
ct:sleep(1000),
@@ -818,7 +818,7 @@ permit_false_start_dist(Conf) when is_list(Conf) ->
false = is_started(app3, Cp2),
false = is_started(app3, Cp3),
- %Unpermit a not started application
+ %% Unpermit a not started application
ok = rpc:call(Cp1, application, permit, [app2, false]),
{[ok,ok,ok],[]} =
rpc:multicall([Cp1, Cp2, Cp3], application, start, [app2, permanent]),
@@ -827,7 +827,7 @@ permit_false_start_dist(Conf) when is_list(Conf) ->
false = is_started(app2, Cp2),
false = is_started(app2, Cp3),
- %Unpermit a not loaded application
+ %% Unpermit a not loaded application
{error,{not_loaded,app3}} =
rpc:call(Cp1, application, permit, [app3, false]),
{[ok,ok,ok],[]} =
@@ -840,37 +840,37 @@ permit_false_start_dist(Conf) when is_list(Conf) ->
false = is_started(app3, Cp2),
false = is_started(app3, Cp3),
- % Permit app1 on CP1 and make sure it is started
+ %% Permit app1 on CP1 and make sure it is started
ok = rpc:call(Cp1, application, permit, [app1, true]),
?UNTIL(is_started(app1, Cp1)),
false = is_started(app1, Cp2),
false = is_started(app1, Cp3),
- % Permit it again
+ %% Permit it again
ok = rpc:call(Cp1, application, permit, [app1, true]),
?UNTIL(is_started(app1, Cp1)),
false = is_started(app1, Cp2),
false = is_started(app1, Cp3),
- % Permit app2 on CP1 and make sure it is started
+ %% Permit app2 on CP1 and make sure it is started
ok = rpc:call(Cp1, application, permit, [app2, true]),
?UNTIL(is_started(app2, Cp1)),
false = is_started(app2, Cp2),
false = is_started(app2, Cp3),
- % Permit app1 on CP2 and make sure it is not started
+ %% Permit app1 on CP2 and make sure it is not started
ok = rpc:call(Cp2, application, permit, [app1, true]),
ct:sleep(1000),
true = is_started(app1, Cp1),
false = is_started(app1, Cp2),
false = is_started(app1, Cp3),
- % Crash CP1 and make sure app1, but not app2, is started on CP2
+ %% Crash CP1 and make sure app1, but not app2, is started on CP2
stop_node_nice(Cp1),
?UNTIL(is_started(app1, Cp2)),
false = is_started(app2, Cp2),
- % Restart CP1 again, check nothing is running on it
+ %% Restart CP1 again, check nothing is running on it
{ok, Cp1_2} = start_node_config(Ncp1, NoSyncTime, Conf),
global:sync(),
ok = rpc:call(Cp1_2, application, load, [app1()]),
@@ -885,19 +885,19 @@ permit_false_start_dist(Conf) when is_list(Conf) ->
false = is_started(app1, Cp1_2),
false = is_started(app2, Cp1_2),
- % Permit app3 on CP3 and make sure it is started
+ %% Permit app3 on CP3 and make sure it is started
ok = rpc:call(Cp3, application, permit, [app3, true]),
?UNTIL(is_started(app3, Cp3)),
false = is_started(app3, Cp1_2),
false = is_started(app3, Cp2),
- % Permit app3 on CP1 and make sure it is moved there from CP3
+ %% Permit app3 on CP1 and make sure it is moved there from CP3
ok = rpc:call(Cp1_2, application, permit, [app3, true]),
?UNTIL(is_started(app3, Cp1_2)),
false = is_started(app3, Cp2),
false = is_started(app3, Cp3),
- % Unpermit app3 on CP3 and CP1 and make sure it is stopped
+ %% Unpermit app3 on CP3 and CP1 and make sure it is stopped
ok = rpc:call(Cp3, application, permit, [app3, false]),
ok = rpc:call(Cp1_2, application, permit, [app3, false]),
?UNTIL(false =:= is_started(app3, Cp1_2)),
@@ -916,18 +916,18 @@ nodedown_start(Conf) when is_list(Conf) ->
NoSyncTime = config_fun_fast(config4(NodeNames)),
WithSyncTime = config_fun(config4(NodeNames)),
- % Test [cp1, cp2]
+ %% Test [cp1, cp2]
{ok, Cp1} = start_node_config(Ncp1, NoSyncTime, Conf),
{ok, Cp2} = start_node_config(Ncp2, WithSyncTime, Conf),
wait_for_ready_net(),
- % Start app1 and make sure cp1 starts it
+ %% Start app1 and make sure cp1 starts it
{[ok,ok],[]} =
rpc:multicall([Cp1, Cp2], application, load, [app1()]),
_ = rpc:cast(Cp2, application, start, [app1, permanent]),
ct:sleep(1000),
- % Crash CP1 and make sure app1 is started on CP2
+ %% Crash CP1 and make sure app1 is started on CP2
stop_node_nice(Cp1),
?UNTIL(is_started(app1, Cp2)),
@@ -1066,13 +1066,13 @@ otp_2078(Conf) when is_list(Conf) ->
NoSyncTime = config_fun_fast(config4(NodeNames)),
WithSyncTime = config_fun(config4(NodeNames)),
- % Test [cp1, cp2]
+ %% Test [cp1, cp2]
{ok, Cp1} = start_node_config(Ncp1, NoSyncTime, Conf),
{ok, Cp2} = start_node_config(Ncp2, WithSyncTime, Conf),
Cps = [Cp1, Cp2],
wait_for_ready_net(),
- % Start app1 and make sure cp1 starts it
+ %% Start app1 and make sure cp1 starts it
{[ok,ok],[]} =
rpc:multicall(Cps, application, load, [app1()]),
?UNTIL(is_loaded(app1, Cps)),
@@ -1080,8 +1080,8 @@ otp_2078(Conf) when is_list(Conf) ->
?UNTIL(is_started(app1, Cp1)),
false = is_started(app1, Cp2),
- % Start app1 on cp2; make sure it works (the bug was that this start
- % returned error)
+ %% Start app1 on cp2; make sure it works (the bug was that this start
+ %% returned error)
ok = rpc:call(Cp2, application, start, [app1, permanent]),
true = is_started(app1, Cp1),
false = is_started(app1, Cp2),
@@ -1096,7 +1096,7 @@ otp_2012(Conf) when is_list(Conf) ->
CcPid = spawn_link(?MODULE, conf_change, []),
yes = global:register_name(conf_change, CcPid),
- % Write a .app file
+ %% Write a .app file
{ok, Fd} = file:open("app1.app", [write]),
w_app1(Fd),
file:close(Fd),
@@ -1104,7 +1104,7 @@ otp_2012(Conf) when is_list(Conf) ->
w_app1(Fd2),
file:close(Fd2),
- % Start app1
+ %% Start app1
ok = application:load(app1()),
ok = application:start(app1, permanent),
@@ -1115,7 +1115,7 @@ otp_2012(Conf) when is_list(Conf) ->
ok = application_controller:config_change(EnvBefore),
ok = get_conf_change([{[], [{new1, hi}, {new2, moi}], []}]),
- % Start app2
+ %% Start app2
ok = application:load(app2()),
ok = application:start(app2, permanent),
@@ -1167,7 +1167,7 @@ otp_2718(Conf) when is_list(Conf) ->
%%-----------------------------------------------------------------
%% Test of two processes simultanously starting the same application.
otp_2973(Conf) when is_list(Conf) ->
- % Write a .app file
+ %% Write a .app file
{ok, Fd} = file:open("app0.app", [write]),
w_app(Fd, app0()),
file:close(Fd),
@@ -1209,7 +1209,7 @@ otp_2973(Conf) when is_list(Conf) ->
end,
- % Write a .app file
+ %% Write a .app file
{ok, Fda} = file:open("app_start_error.app", [write]),
w_app_start_error(Fda),
file:close(Fda),
@@ -1259,26 +1259,26 @@ otp_3184(Conf) when is_list(Conf) ->
NoSyncTime = config_fun_fast(config3184(NodeNames)),
WithSyncTime = config_fun(config3184(NodeNames)),
- % Test [cp1, cp2]
+ %% Test [cp1, cp2]
{ok, Cp1} = start_node_config(Ncp1, NoSyncTime, Conf),
{ok, Cp2} = start_node_config(Ncp2, WithSyncTime, Conf),
wait_for_ready_net(),
- % Start app1 and make sure it is not started
+ %% Start app1 and make sure it is not started
{[ok,ok],[]} =
rpc:multicall([Cp1, Cp2], application, load, [app1()]),
ct:sleep(3000),
false = is_started(app1, Cp1),
false = is_started(app1, Cp2),
- % Start app1 on cp1
+ %% Start app1 on cp1
ok = rpc:call(Cp1, application, permit, [app1, true]),
ok = rpc:call(Cp1, application, start, [app1, permanent]),
ok = rpc:call(Cp2, application, start, [app1, permanent]),
?UNTIL(is_started(app1, Cp1)),
false = is_started(app1, Cp2),
- % Check that the application is marked as running in application_controller
+ %% Check that the application is marked as running in application_controller
X = rpc:call(Cp1, application_controller, info, []),
{value, {running, Xrunning}} = lists:keysearch(running, 1, X),
{value, Xapp1} = lists:keysearch(app1, 1, Xrunning),
@@ -1299,7 +1299,7 @@ otp_3184(Conf) when is_list(Conf) ->
%%-----------------------------------------------------------------
%% crash the node if permanent appl has illegal env parameter values.
otp_3002(Conf) when is_list(Conf) ->
- % Create the boot script
+ %% Create the boot script
{{KernelVer,StdlibVer}, {LatestDir, LatestName}} =
create_script_3002("script_3002"),
ct:pal(?HI_VERBOSITY, "LatestDir = ~p~n", [LatestDir]),
@@ -1331,7 +1331,7 @@ otp_3002(Conf) when is_list(Conf) ->
%% Check that application stop don't cause dist_ac crash.
otp_4066(Conf) when is_list(Conf) ->
- % Write config files
+ %% Write config files
[Ncp1, Ncp2] = node_names([cp1, cp2], Conf),
Host = from($@, atom_to_list(node())),
Cp1 = list_to_atom(Ncp1 ++ "@" ++ Host),
@@ -1344,7 +1344,7 @@ otp_4066(Conf) when is_list(Conf) ->
write_config(FdC, config_4066(AllNodes, 5000, [App1Nodes])),
file:close(FdC),
- % Write the app1.app file
+ %% Write the app1.app file
{ok, FdA12} = file:open(filename:join(Dir, "app1.app"), [write]),
w_app1(FdA12),
file:close(FdA12),
@@ -1362,7 +1362,7 @@ otp_4066(Conf) when is_list(Conf) ->
io:format("--- App1 started at Cp1 ---~n", []),
print_dac_state(AllNodes),
- % Cp2 previously crashed on this stop
+ %% Cp2 previously crashed on this stop
ok = rpc:call(Cp1, application, stop, [app1]),
wait_until_stopped(app1, [Cp1]),
io:format("--- App1 stopped at Cp1 ---~n", []),
@@ -1583,7 +1583,7 @@ get_key(Conf) when is_list(Conf) ->
NodeNames = [Ncp1, _Ncp2, _Ncp3] = node_names([cp1, cp2, cp3], Conf),
WithSyncTime = config_fun(config_inc(NodeNames)),
- % Test [cp1, cp2, cp3]
+ %% Test [cp1, cp2, cp3]
{ok, Cp1} = start_node_config(Ncp1, WithSyncTime, Conf),
ok = rpc:call(Cp1, application, load, [appinc(), d3(NodeNames)]),
@@ -1793,16 +1793,12 @@ distr_changed_tc2(Conf) when is_list(Conf) ->
stop_node_nice(Cp1),
ct:sleep(10000),
-% _DcInfo1 = rpc:call(Cp1, dist_ac, info, []),
_DcInfo2 = rpc:call(Cp2, dist_ac, info, []),
_DcInfo3 = rpc:call(Cp3, dist_ac, info, []),
-% DcWa1 = which_applications(Cp1),
DcWa2 = which_applications(Cp2),
DcWa3 = which_applications(Cp3),
-% Wa1 = lists:foldl(fun({A1, _N1, _V1}, AccIn) -> [A1 | AccIn] end,
-% [], DcWa1),
Wa2 = lists:foldl(fun({A2, _N2, _V2}, AccIn) -> [A2 | AccIn] end,
[], DcWa2),
Wa3 = lists:foldl(fun({A3, _N3, _V3}, AccIn) -> [A3 | AccIn] end,
@@ -2532,7 +2528,7 @@ is_started(Name, Node) ->
false -> false
end.
-% Waits until application Name is started on at least one node.
+%% Waits until application Name is started on at least one node.
wait_until_started(Name, Nodes) ->
case lists:member(true,
lists:map(fun (N) ->
@@ -2546,7 +2542,7 @@ wait_until_started(Name, Nodes) ->
wait_until_started(Name, Nodes)
end.
-% Waits until application Name is stopped on all nodes.
+%% Waits until application Name is stopped on all nodes.
wait_until_stopped(Name, Nodes) ->
case lists:member(true,
lists:map(fun (N) ->
@@ -2834,7 +2830,7 @@ create_script_3002(ScriptName) ->
distr_changed_prep(Conf) when is_list(Conf) ->
- % Write .app files
+ %% Write .app files
{ok, Fd1} = file:open("app1.app", [write]),
w_app1(Fd1),
file:close(Fd1),
@@ -2855,7 +2851,7 @@ distr_changed_prep(Conf) when is_list(Conf) ->
file:close(Fd6),
- % Create the .app files and the boot script
+ %% Create the .app files and the boot script
{{KernelVer,StdlibVer}, _} = create_script_dc("dc"),
case is_real_system(KernelVer, StdlibVer) of
@@ -2877,7 +2873,7 @@ distr_changed_prep(Conf) when is_list(Conf) ->
file:close(Fd_dc2),
Config2 = filename:join(Dir, "sys2"),
- % Test [cp1, cp2, cp3]
+ %% Test [cp1, cp2, cp3]
{ok, Cp1} = start_node_boot_config(Ncp1, NoSyncTime, Conf, dc),
{ok, Cp2} = start_node_boot_config(Ncp2, NoSyncTime, Conf, dc),
{ok, Cp3} = start_node_boot_config(Ncp3, WithSyncTime, Conf, dc),
diff --git a/lib/kernel/test/bif_SUITE.erl b/lib/kernel/test/bif_SUITE.erl
index e53ae5bd8b..553bc80bc2 100644
--- a/lib/kernel/test/bif_SUITE.erl
+++ b/lib/kernel/test/bif_SUITE.erl
@@ -80,7 +80,7 @@ spawn1(Config) when is_list(Config) ->
?line Parent = self(),
?line {_, _, FA, _} = fetch_proc_vals(self()),
- % spawn
+ %% spawn
?line P = spawn(fun() -> Parent ! {self(), fetch_proc_vals(self())} end),
?line receive
{P, PV} ->
@@ -96,7 +96,7 @@ spawn2(Config) when is_list(Config) ->
?line Parent = self(),
?line {_, _, FA, _} = fetch_proc_vals(self()),
- % spawn_link
+ %% spawn_link
?line P = spawn(Node,
fun() -> Parent ! {self(), fetch_proc_vals(self())} end),
?line receive
@@ -116,7 +116,7 @@ spawn3(Config) when is_list(Config) ->
?line Parent = self(),
?line {_, _, FA, _} = fetch_proc_vals(self()),
- % spawn_link
+ %% spawn_link
?line P = spawn(?MODULE,
run_fun,
[fun() ->
@@ -136,7 +136,7 @@ spawn4(Config) when is_list(Config) ->
?line Parent = self(),
?line {_, _, FA, _} = fetch_proc_vals(self()),
- % spawn_link
+ %% spawn_link
?line P = spawn(Node,
?MODULE,
run_fun,
@@ -160,7 +160,7 @@ spawn_link1(Config) when is_list(Config) ->
?line Parent = self(),
?line {_, _, FA, _} = fetch_proc_vals(self()),
- % spawn_link
+ %% spawn_link
?line P = spawn_link(fun() -> Parent ! {self(), fetch_proc_vals(self())} end),
?line receive
{P, PV} ->
@@ -176,7 +176,7 @@ spawn_link2(Config) when is_list(Config) ->
?line Parent = self(),
?line {_, _, FA, _} = fetch_proc_vals(self()),
- % spawn_link
+ %% spawn_link
?line P = spawn_link(Node,
fun() -> Parent ! {self(), fetch_proc_vals(self())} end),
?line receive
@@ -195,7 +195,7 @@ spawn_link3(Config) when is_list(Config) ->
?line Parent = self(),
?line {_, _, FA, _} = fetch_proc_vals(self()),
- % spawn_link
+ %% spawn_link
?line P = spawn_link(?MODULE,
run_fun,
[fun() ->
@@ -215,7 +215,7 @@ spawn_link4(Config) when is_list(Config) ->
?line Parent = self(),
?line {_, _, FA, _} = fetch_proc_vals(self()),
- % spawn_link
+ %% spawn_link
?line P = spawn_link(Node,
?MODULE,
run_fun,
@@ -352,7 +352,7 @@ spawn_failures(Config) when is_list(Config) ->
?line ThisNode = node(),
?line {ok, Node} = start_node(spawn_remote_failure),
- % unknown nodes
+ %% unknown nodes
io:format("Testing unknown nodes~n", []),
?line CrashPid1 = (catch spawn_opt('unknown@node',
erlang,
@@ -408,7 +408,7 @@ spawn_failures(Config) when is_list(Config) ->
ok
end,
- % bad node
+ %% bad node
io:format("Testing bad nodes~n", []),
?line {'EXIT', {badarg, _}} = (catch spawn_opt("Node",erlang,nodes,[],[])),
?line {'EXIT', {badarg, _}} = (catch spawn_opt("Node",
@@ -426,7 +426,7 @@ spawn_failures(Config) when is_list(Config) ->
erlang:nodes()
end)),
- % bad module
+ %% bad module
io:format("Testing bad modules~n", []),
?line {'EXIT', {badarg, _}} = (catch spawn_opt(Node,"erlang",nodes,[],[])),
?line {'EXIT', {badarg, _}} = (catch spawn_opt("erlang",nodes,[],[])),
@@ -435,7 +435,7 @@ spawn_failures(Config) when is_list(Config) ->
?line {'EXIT', {badarg, _}} = (catch spawn(Node,"erlang",nodes,[])),
?line {'EXIT', {badarg, _}} = (catch spawn("erlang",nodes,[])),
- % bad function
+ %% bad function
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,[])),
@@ -451,7 +451,7 @@ spawn_failures(Config) when is_list(Config) ->
?line {'EXIT', {badarg, _}} = (catch spawn(not_a_fun)),
- % bad argument
+ %% bad argument
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],[])),
@@ -460,7 +460,7 @@ spawn_failures(Config) when is_list(Config) ->
?line {'EXIT', {badarg, _}} = (catch spawn(Node,erlang,nodes,[a|b])),
?line {'EXIT', {badarg, _}} = (catch spawn(erlang,nodes,[a|b])),
- % bad option
+ %% bad option
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])),
@@ -493,7 +493,7 @@ decode_packet_delim(Config) when is_list(Config) ->
erlang:decode_packet(line, <<"abc",0,"efg",0>>, [{line_delimiter, 0}]),
{more, undefined} = erlang:decode_packet(line, <<"abc",0,"efg",0>>, []).
-% This testcase should probably be moved somewhere else
+%% This testcase should probably be moved somewhere else
%% Test that memory allocation command line options affecting the
%% wilderness of the heap are interpreted correct by the emulator.
diff --git a/lib/kernel/test/code_SUITE.erl b/lib/kernel/test/code_SUITE.erl
index 4b46957ff0..0cd2c5d47c 100644
--- a/lib/kernel/test/code_SUITE.erl
+++ b/lib/kernel/test/code_SUITE.erl
@@ -131,7 +131,7 @@ set_path(Config) when is_list(Config) ->
get_path(Config) when is_list(Config) ->
P = code:get_path(),
- % test that all directories are strings (lists).
+ %% test that all directories are strings (lists).
[] = lists:filter(fun
(Dir) when is_list(Dir) -> false;
(_) -> true
@@ -383,7 +383,7 @@ purge_many_exits_do(PurgeF) ->
end)}
end,
lists:seq(1, 1000)),
- % Give them time to start...
+ %% Give them time to start...
receive after 1000 -> ok end,
true = code:delete(code_b_test),
lists:foreach(fun ({Pid1, Pid2}) ->
@@ -509,11 +509,9 @@ compile_load(Mod, Dir, Ver, CodeType) ->
CompOpts = [binary, report] ++ Target ++ Version,
Src = filename:join(Dir, atom_to_list(Mod) ++ ".erl"),
- %io:format("compile:file(~p,~p)\n", [Src, CompOpts]),
{ok,Mod,Code} = compile:file(Src, CompOpts),
ObjFile = filename:basename(Src,".erl") ++ ".beam",
{module,Mod} = code:load_binary(Mod, ObjFile, Code),
- %IsNative = code:is_module_native(Mod),
ok.
dir_req(Config) when is_list(Config) ->
@@ -1292,31 +1290,44 @@ create_big_boot(Config) ->
ok = file:set_cwd(OldDir),
{filename:join(LatestDir, LatestName),Apps}.
-% The following apps cannot be loaded
-% hipe .app references (or can reference) files that have no
-% corresponding beam file (if hipe is not enabled)
+%% The following apps cannot be loaded.
+%% hipe .app references (or can reference) files that have no
+%% corresponding beam file (if hipe is not enabled).
filter_app("hipe",_) -> false;
-% Dialyzer and typer depends on hipe
+
+%% Dialyzer and typer depends on hipe
filter_app("dialyzer",_) -> false;
filter_app("typer",_) -> false;
-% Orber requires explicit configuration
+
+%% Orber requires explicit configuration
filter_app("orber",_) -> false;
-% cos* depends on orber
+
+%% cos* depends on orber
filter_app("cos"++_,_) -> false;
-% ic has a mod instruction in the app file but no corresponding start function
+
+%% ic has a mod instruction in the app file but no corresponding start
+%% function
filter_app("ic",_) -> false;
-% Netconf has some dependency that I really do not understand (maybe like orber)
+
+%% Netconf has some dependency that I really do not understand (maybe
+%% like orber)
filter_app("netconf",_) -> false;
-% Safe has the same kind of error in the .app file as ic
+
+%% Safe has the same kind of error in the .app file as ic
filter_app("safe",_) -> false;
-% Comte cannot be started in the "usual" way
+
+%% Comte cannot be started in the "usual" way
filter_app("comte",_) -> false;
-% OS_mon does not find it's port program when running cerl
+
+%% OS_mon does not find its port program when running cerl
filter_app("os_mon",true) -> false;
-% erts is not a "real" app either =/
+
+%% erts is not a "real" app either =/
filter_app("erts",_) -> false;
-% Other apps should be OK.
+
+%% Other apps should be OK.
filter_app(_,_) -> true.
+
create_big_script(Config,Local) ->
PrivDir = proplists:get_value(priv_dir, Config),
Name = filename:join(PrivDir,"full_script_test"),
diff --git a/lib/kernel/test/disk_log_SUITE.erl b/lib/kernel/test/disk_log_SUITE.erl
index b570ded3cc..b506511c69 100644
--- a/lib/kernel/test/disk_log_SUITE.erl
+++ b/lib/kernel/test/disk_log_SUITE.erl
@@ -19,7 +19,7 @@
%%
-module(disk_log_SUITE).
-%-define(debug, true).
+%%-define(debug, true).
-ifdef(debug).
-define(format(S, A), io:format(S, A)).
@@ -745,7 +745,7 @@ wrap_ext_1(Conf) when is_list(Conf) ->
{file, File}]),
x2simple_log(File ++ ".1", a),
?line ok = disk_log:close(a),
-% del(File, 4),
+%% del(File, 4),
?line {ok, a} = disk_log:open([{name,a}, {type,wrap}, {size,{8000, 4}},
{format,external},
{file, File}]),
@@ -997,7 +997,7 @@ xx() ->
{format,internal}, {file, File}]),
W = xwr(a, 400),
disk_log:close(a),
-% file:delete(File),
+%% file:delete(File),
W.
%% old: 6150
@@ -1174,7 +1174,7 @@ head_func(Conf) when is_list(Conf) ->
disk_log:close(a),
del(File, 4),
- % invalid header function
+ %% invalid header function
?line {error, {invalid_header, {_, {term}}}} =
disk_log:open([{name, n}, {file, File}, {type, halt},
{format, external},
@@ -1545,7 +1545,7 @@ block_blocked(Conf) when is_list(Conf) ->
?line B = mk_bytes(60),
Halt = join(Dir, "halt.LOG"),
- % External logs.
+ %% External logs.
?line file:delete(Halt), % cleanup
?line {ok, halt} = disk_log:open([{name, halt}, {type, halt},
{format, external}, {file, Halt}]),
@@ -1583,7 +1583,7 @@ block_blocked(Conf) when is_list(Conf) ->
?line ok = disk_log:close(halt),
?line file:delete(Halt),
- % Internal logs.
+ %% Internal logs.
?line File = filename:join(Dir, "n.LOG"),
?line No = 4,
?line del(File, No), % cleanup
@@ -1815,7 +1815,7 @@ open_overwrite(Conf) when is_list(Conf) ->
?line No = 4,
?line del(File, No), % cleanup
- % read write
+ %% read write
?line First = "n.LOG.1",
?line make_file(Dir, First, 8),
@@ -1837,7 +1837,7 @@ open_overwrite(Conf) when is_list(Conf) ->
?line {error, {not_a_log_file, _}} =
disk_log:open([{name, n}, {file, File}, {type, wrap},
{format, internal}, {size, {100, No}}]),
- % read only
+ %% read only
?line make_file(Dir, First, 6),
?line {error, {not_a_log_file, _}} =
@@ -2059,7 +2059,7 @@ close_race(Conf) when is_list(Conf) ->
?line Error1 = {error, no_such_log} = disk_log:close(n),
?line "There is no disk" ++ _ = format_error(Error1),
- % Pid1 blocks, Pid2 closes without being suspended.
+ %% Pid1 blocks, Pid2 closes without being suspended.
?line Pid1 = spawn_link(?MODULE, lserv, [n]),
?line Pid2 = spawn_link(?MODULE, lserv, [n]),
?line {ok, n} = sync_do(Pid1, {open, File}),
@@ -2073,7 +2073,7 @@ close_race(Conf) when is_list(Conf) ->
?line sync_do(Pid2, terminate),
?line {error, no_such_log} = disk_log:info(n),
- % Pid3 blocks, Pid3 closes. Pid4 should still be ablo to use log.
+ %% Pid3 blocks, Pid3 closes. Pid4 should still be ablo to use log.
?line Pid3 = spawn_link(?MODULE, lserv, [n]),
?line Pid4 = spawn_link(?MODULE, lserv, [n]),
?line {ok, n} = sync_do(Pid3, {open, File}),
@@ -2085,7 +2085,7 @@ close_race(Conf) when is_list(Conf) ->
?line sync_do(Pid4, terminate),
?line {error, no_such_log} = disk_log:info(n),
- % Pid5 blocks, Pid5 terminates. Pid6 should still be ablo to use log.
+ %% Pid5 blocks, Pid5 terminates. Pid6 should still be ablo to use log.
?line Pid5 = spawn_link(?MODULE, lserv, [n]),
?line Pid6 = spawn_link(?MODULE, lserv, [n]),
?line {ok, n} = sync_do(Pid5, {open, File}),
@@ -2141,7 +2141,7 @@ close_block(Conf) when is_list(Conf) ->
?line {error, no_such_log} = disk_log:info(n),
?line true = (P0 == pps()),
- % Blocking owner terminates.
+ %% Blocking owner terminates.
?line Pid5 = spawn_link(?MODULE, lserv, [n]),
?line {ok, n} = disk_log:open([{name, n}, {file, File}, {type, wrap},
{linkto, none},{size, {100,No}},
@@ -2158,7 +2158,7 @@ close_block(Conf) when is_list(Conf) ->
?line {error, no_such_log} = disk_log:info(n),
?line true = (P0 == pps()),
- % Blocking user terminates.
+ %% Blocking user terminates.
?line Pid6 = spawn_link(?MODULE, lserv, [n]),
?line {ok, n} = disk_log:open([{name, n}, {file, File}, {type, wrap},
{size, {100,No}}, {format, external}]),
@@ -2178,7 +2178,7 @@ close_block(Conf) when is_list(Conf) ->
?line {error, no_such_log} = disk_log:info(n),
?line true = (P0 == pps()),
- % Blocking owner terminates.
+ %% Blocking owner terminates.
?line Pid7 = spawn_link(?MODULE, lserv, [n]),
?line {ok, n} = disk_log:open([{name, n}, {file, File}, {type, wrap},
{linkto, none},
@@ -2211,7 +2211,7 @@ close_block(Conf) when is_list(Conf) ->
?line {error, no_such_log} = disk_log:info(n),
?line true = (P0 == pps()),
- % Blocking user closes.
+ %% Blocking user closes.
?line Pid10 = spawn_link(?MODULE, lserv, [n]),
?line {ok, n} = disk_log:open([{name, n}, {file, File}, {type, wrap},
{size, {100,No}}, {format, external}]),
@@ -2229,7 +2229,7 @@ close_block(Conf) when is_list(Conf) ->
?line {error, no_such_log} = disk_log:info(n),
?line true = (P0 == pps()),
- % Blocking user unblocks and closes.
+ %% Blocking user unblocks and closes.
?line Pid11 = spawn_link(?MODULE, lserv, [n]),
?line {ok, n} = disk_log:open([{name, n}, {file, File}, {type, wrap},
{size, {100,No}}, {format, external}]),
@@ -2248,7 +2248,7 @@ close_block(Conf) when is_list(Conf) ->
?line sync_do(Pid11, terminate),
?line true = (P0 == pps()),
- % Blocking owner closes.
+ %% Blocking owner closes.
?line Pid12 = spawn_link(?MODULE, lserv, [n]),
?line {ok, n} = disk_log:open([{name, n}, {file, File}, {type, wrap},
{linkto, none},
@@ -2267,7 +2267,7 @@ close_block(Conf) when is_list(Conf) ->
?line sync_do(Pid12, terminate),
?line true = (P0 == pps()),
- % Blocking owner unblocks and closes.
+ %% Blocking owner unblocks and closes.
?line Pid13 = spawn_link(?MODULE, lserv, [n]),
?line {ok, n} = disk_log:open([{name, n}, {file, File}, {type, wrap},
{linkto, none},
@@ -2463,7 +2463,7 @@ lserv(Log) ->
%% Error while repairing.
error_repair(Conf) when is_list(Conf) ->
- % not all error situations are covered by this test
+ %% not all error situations are covered by this test
DataDir = ?datadir(Conf),
PrivDir = ?privdir(Conf),
@@ -2473,7 +2473,7 @@ error_repair(Conf) when is_list(Conf) ->
?line file:delete(File),
?line del(File, No), % cleanup
- % kurt.LOG is not closed and has four logged items, one is recovered
+ %% kurt.LOG is not closed and has four logged items, one is recovered
?line copy_wrap_log("kurt.LOG", "n.LOG", No, DataDir, PrivDir),
?line {repaired,n,{recovered,1},{badbytes,0}} =
disk_log:open([{name, n}, {file, File}, {type, wrap}, {size,{40,No}}]),
@@ -2482,7 +2482,7 @@ error_repair(Conf) when is_list(Conf) ->
?line 4 = no_items(n),
?line ok = disk_log:close(n),
- % temporary repair file cannot be created
+ %% temporary repair file cannot be created
?line copy_wrap_log("kurt.LOG", "n.LOG", No, DataDir, PrivDir),
?line Dir = File ++ ".4" ++ ".TMP",
?line ok = file:make_dir(Dir),
@@ -2598,13 +2598,13 @@ error_log(Conf) when is_list(Conf) ->
?line LDir = File ++ ".2",
?line Q = qlen(),
- % dummy just to get all processes "above" disk_log going
+ %% dummy just to get all processes "above" disk_log going
?line {ok, n} = disk_log:open([{name, n}, {file, File}, {type, wrap},
{format, external},{size, {100, No}}]),
?line ok = disk_log:close(n),
?line del(File, No),
- % inc_wrap_file fails, the external log is not terminated
+ %% inc_wrap_file fails, the external log is not terminated
?line P0 = pps(),
?line {ok, n} = disk_log:open([{name, n}, {file, File}, {type, wrap},
{format, external},{size, {100, No}}]),
@@ -2614,14 +2614,14 @@ error_log(Conf) when is_list(Conf) ->
?line ok = disk_log:close(n),
?line del(File, No),
- % inc_wrap_file fails, the internal log is not terminated, ./File.2/ exists
+ %% inc_wrap_file fails, the internal log is not terminated, ./File.2/ exists
?line {ok, n} = disk_log:open([{name, n}, {file, File}, {type, wrap},
{format, internal},{size, {100, No}}]),
?line {error, {file_error, _, _}} = disk_log:inc_wrap_file(n),
?line ok = disk_log:close(n),
?line del(File, No),
- % truncate fails, the log is terminated, ./File.2/ exists
+ %% truncate fails, the log is terminated, ./File.2/ exists
?line {ok, n} = disk_log:open([{name, n}, {file, File}, {type, wrap},
{format, external},{size, {100, No}}]),
?line {error, {file_error, _, _}} = disk_log:truncate(n),
@@ -2629,7 +2629,7 @@ error_log(Conf) when is_list(Conf) ->
?line del(File, No),
%% OTP-4880.
- % reopen (rename) fails, the log is terminated, ./File.2/ exists
+ %% reopen (rename) fails, the log is terminated, ./File.2/ exists
?line {ok, n} = disk_log:open([{name, n}, {file, File}, {type, halt},
{format, external},{size, 100000}]),
?line {error, {file_error, _, eisdir}} = disk_log:reopen(n, LDir),
@@ -2648,14 +2648,14 @@ error_log(Conf) when is_list(Conf) ->
?line del(File2, No),
?line del(File, No),
- % log, external wrap log, ./File.2/ exists
+ %% log, external wrap log, ./File.2/ exists
?line {ok, n} = disk_log:open([{name, n}, {file, File}, {type, wrap},
{format, external},{size, {100, No}}]),
?line {error, {file_error, _, _}} = disk_log:blog_terms(n, [B,B,B]),
?line ok = disk_log:close(n),
?line del(File, No),
- % log, internal wrap log, ./File.2/ exists
+ %% log, internal wrap log, ./File.2/ exists
?line {ok, n} = disk_log:open([{name, n}, {file, File}, {type, wrap},
{format, internal},{size, {100, No}}]),
?line {error, {file_error, _, _}} = disk_log:log_terms(n, [B,B,B]),
@@ -2664,7 +2664,7 @@ error_log(Conf) when is_list(Conf) ->
?line ok = file:del_dir(LDir),
- % can't remove file when changing size
+ %% can't remove file when changing size
?line {ok, n} = disk_log:open([{name, n}, {file, File}, {type, wrap},
{format, internal},{size, {100, No}}]),
?line ok = disk_log:log_terms(n, [B,B,B,B]),
@@ -3005,7 +3005,7 @@ truncate(Conf) when is_list(Conf) ->
?line Q = qlen(),
Halt = join(Dir, "halt.LOG"),
- % Halt logs.
+ %% Halt logs.
?line file:delete(Halt), % cleanup
?line {ok, halt} = disk_log:open([{name, halt}, {type, halt}, {file, Halt},
@@ -3862,20 +3862,20 @@ change_size_truncate(Conf) when is_list(Conf) ->
?line ok = disk_log:blog(bert, B),
?line rec(1, {disk_log, node(), bert, {wrap, 1}}),
- % Three items expected.
- % disk_log_1:print_index_file("bert.LOG.idx"),
+ %% Three items expected.
+ %% disk_log_1:print_index_file("bert.LOG.idx"),
?line 3 = curf(bert),
?line ok = disk_log:change_size(bert,{100,1}),
?line ok = disk_log:blog(bert, B),
?line rec(1, {disk_log, node(), bert, {wrap, 1}}),
- % Three items expected.
- % disk_log_1:print_index_file("bert.LOG.idx"),
+ %% Three items expected.
+ %% disk_log_1:print_index_file("bert.LOG.idx"),
?line ok = disk_log:blog(bert, B),
?line rec(1, {disk_log, node(), bert, {wrap, 1}}),
?line ok = disk_log:blog(bert, B),
?line rec(1, {disk_log, node(), bert, {wrap, 1}}),
- % One item expected.
- % disk_log_1:print_index_file("bert.LOG.idx"),
+ %% One item expected.
+ %% disk_log_1:print_index_file("bert.LOG.idx"),
?line ok = disk_log:blog(bert, B),
?line rec(1, {disk_log, node(), bert, {wrap, 1}}),
@@ -3905,30 +3905,30 @@ change_size_truncate(Conf) when is_list(Conf) ->
?line 1 = curf(bert),
?line ok = disk_log:change_size(bert,{100,No+1}),
- % Three items expected.
- % disk_log_1:print_index_file("bert.LOG.idx"),
+ %% Three items expected.
+ %% disk_log_1:print_index_file("bert.LOG.idx"),
?line ok = disk_log:blog(bert, B),
?line rec(1, {disk_log, node(), bert, {wrap, 1}}),
- % Three items expected.
- % disk_log_1:print_index_file("bert.LOG.idx"),
+ %% Three items expected.
+ %% disk_log_1:print_index_file("bert.LOG.idx"),
?line 2 = curf(bert),
?line ok = disk_log:change_size(bert,{100,1}),
- % Three items expected.
- % disk_log_1:print_index_file("bert.LOG.idx"),
+ %% Three items expected.
+ %% disk_log_1:print_index_file("bert.LOG.idx"),
?line ok = disk_log:close(bert),
- % State: .siz is 1, current file is 2, index file size is 3...
+ %% State: .siz is 1, current file is 2, index file size is 3...
?line {ok, bert} = disk_log:open([{name,bert}, {file, File},
{type,wrap}, {notify, true}]),
- % Three items expected.
- % disk_log_1:print_index_file("bert.LOG.idx"),
+ %% Three items expected.
+ %% disk_log_1:print_index_file("bert.LOG.idx"),
?line 2 = curf(bert),
?line ok = disk_log:blog(bert, B),
@@ -3938,8 +3938,8 @@ change_size_truncate(Conf) when is_list(Conf) ->
?line {ok, bert} = disk_log:open([{name,bert}, {file, File},
{type,wrap}, {notify, true}]),
- % Two items expected.
- % disk_log_1:print_index_file("bert.LOG.idx"),
+ %% Two items expected.
+ %% disk_log_1:print_index_file("bert.LOG.idx"),
?line 1 = curf(bert),
?line ok = disk_log:blog(bert, B),
@@ -3947,8 +3947,8 @@ change_size_truncate(Conf) when is_list(Conf) ->
%% reported one lost item.
?line rec(1, {disk_log, node(), bert, {wrap, 0}}),
- % One item expected.
- % disk_log_1:print_index_file("bert.LOG.idx"),
+ %% One item expected.
+ %% disk_log_1:print_index_file("bert.LOG.idx"),
?line ok = disk_log:close(bert),
?line del(File, No),
@@ -3965,7 +3965,7 @@ change_attribute(Conf) when is_list(Conf) ->
?line Q = qlen(),
- % test change_notify
+ %% test change_notify
?line {ok, n} = disk_log:open([{name, n}, {file, File}, {type, wrap},
{size, {100,No}}]),
?line {ok, n} = disk_log:open([{name, n}]), % ignored...
@@ -3984,7 +3984,7 @@ change_attribute(Conf) when is_list(Conf) ->
?line 0 = users(n),
?line 1 = length(owners(n)),
- % test change_header
+ %% test change_header
?line {error, {badarg, head}} = disk_log:change_header(n, none),
?line {error, {badarg, head}} =
disk_log:change_header(n, {head_func, {1,2,3}}),
@@ -4103,7 +4103,7 @@ dist_open(Conf) when is_list(Conf) ->
?line del(File1, No),
?line file:delete(File),
- % open an invalid log file, and see how error are handled
+ %% open an invalid log file, and see how error are handled
?line First = "n.LOG.1",
?line make_file(PrivDir, First, 8),
@@ -4113,7 +4113,7 @@ dist_open(Conf) when is_list(Conf) ->
?line del(File, No),
?line file:delete(File),
- % open a wrap on one other node (not on this node)
+ %% open a wrap on one other node (not on this node)
?line {[_],[]} = disk_log:open([{name, n}, {file, File},
{type, wrap}, {size, {50, No}},
{distributed, [Node]}]),
@@ -4146,11 +4146,11 @@ dist_error_open(Conf) when is_list(Conf) ->
?line {ok, Node} = start_node(disk_log, "-pa " ++ PA),
?line wait_for_ready_net(),
- % open non-distributed on this node:
+ %% open non-distributed on this node:
?line {ok,n} = disk_log:open([{name, n}, {file, File},
{type, wrap}, {size, {50, No}}]),
- % trying to open distributed on this node (error):
+ %% trying to open distributed on this node (error):
?line {[],[Error1={ENode,{error,{node_already_open,n}}}]} =
disk_log:open([{name, n}, {file, File},
{type, wrap}, {size, {50, No}},
@@ -4161,12 +4161,12 @@ dist_error_open(Conf) when is_list(Conf) ->
format_error(Error1)),
?line ok = disk_log:lclose(n),
- % open distributed on this node:
+ %% open distributed on this node:
?line {[_],[]} = disk_log:open([{name, n}, {file, File},
{type, wrap}, {size, {50, No}},
{distributed, [node()]}]),
- % trying to open non-distributed on this node (error):
+ %% trying to open non-distributed on this node (error):
?line {_,{node_already_open,n}} =
disk_log:open([{name, n}, {file, File},
{type, wrap}, {size, {50, No}}]),
@@ -4198,12 +4198,12 @@ dist_notify(Conf) when is_list(Conf) ->
?line {ok, Node} = start_node(disk_log, "-pa " ++ PA),
?line wait_for_ready_net(),
- % opening distributed on this node:
+ %% opening distributed on this node:
?line {[_],[]} = disk_log:open([{name, n}, {file, File}, {notify, false},
{type, wrap}, {size, {50, No}},
{distributed, [node()]}]),
- % opening distributed on other node:
+ %% opening distributed on other node:
?line {[_],[]} = disk_log:open([{name, n}, {file, File1},
{notify, true}, {linkto, self()},
{type, wrap}, {size, {50, No}},
@@ -4582,7 +4582,7 @@ dist_open2_2(Conf, Delay) ->
end,
%% And {priority, ...} probably has no effect either.
?line Pid1 = spawn_opt(F, [{priority, low}]),
- % timer:sleep(1), % no guarantee that Pid1 will return {repaired, ...}
+ %% timer:sleep(1), % no guarantee that Pid1 will return {repaired, ...}
?line Pid2 = spawn_opt(F, [{priority, low}]),
?line {error, no_such_log} =
disk_log:log(Log, term), % maybe repairing now
@@ -4862,7 +4862,7 @@ copy_wrap_log(FromName, ToName, N, FromDir, ToDir) ->
-define(BUFSIZE, 8192).
copy_file(Src, Dest) ->
- % io: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),
@@ -4992,9 +4992,9 @@ start_node(Name, Param) ->
stop_node(Node) ->
test_server:stop_node(Node).
-%from(H, [H | T]) -> T;
-%from(H, [_ | T]) -> from(H, T);
-%from(_H, []) -> [].
+%% from(H, [H | T]) -> T;
+%% from(H, [_ | T]) -> from(H, T);
+%% from(_H, []) -> [].
%%-----------------------------------------------------------------
diff --git a/lib/kernel/test/erl_boot_server_SUITE.erl b/lib/kernel/test/erl_boot_server_SUITE.erl
index 2f17ab0878..b2fb4974d8 100644
--- a/lib/kernel/test/erl_boot_server_SUITE.erl
+++ b/lib/kernel/test/erl_boot_server_SUITE.erl
@@ -118,8 +118,8 @@ stop(Config) when is_list(Config) ->
%% Start a boot server and kill it. Make sure that any helper processes
%% dies.
- % Make sure the inet_gethost_native server is already started,
- % otherwise it will make this test fail:
+ %% Make sure the inet_gethost_native server is already started,
+ %% otherwise it will make this test fail:
?line inet:getaddr(localhost, inet),
?line Before = processes(),
?line {ok, Pid} = erl_boot_server:start([Host1]),
diff --git a/lib/kernel/test/erl_distribution_SUITE.erl b/lib/kernel/test/erl_distribution_SUITE.erl
index 0b09118161..f8c304aec2 100644
--- a/lib/kernel/test/erl_distribution_SUITE.erl
+++ b/lib/kernel/test/erl_distribution_SUITE.erl
@@ -19,7 +19,6 @@
%%
-module(erl_distribution_SUITE).
-%-define(line_trace, 1).
-include_lib("common_test/include/ct.hrl").
-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1,
@@ -295,7 +294,7 @@ tick_change(Config) when is_list(Config) ->
_ -> ct:fail(DefaultTT)
end,
- % In case other nodes are connected
+ %% In case other nodes are connected
case nodes(connected) of
[] -> ?line net_kernel:set_net_ticktime(10, 0);
_ -> ?line rpc:multicall(nodes([this, connected]), net_kernel,
@@ -333,7 +332,7 @@ tick_change(Config) when is_list(Config) ->
?line stop_node(B),
?line stop_node(C),
- % In case other nodes are connected
+ %% In case other nodes are connected
case nodes(connected) of
[] -> ?line net_kernel:set_net_ticktime(DefaultTT, 0);
_ -> ?line rpc:multicall(nodes([this, connected]), net_kernel,
@@ -386,7 +385,7 @@ run_tick_change_test(B, C, PrevTT, TT, PaDir) ->
end
end),
- % In case other nodes than these are connected
+ %% In case other nodes than these are connected
case nodes(connected) -- [B, C, D] of
[] -> ?line ok;
OtherNodes -> ?line rpc:multicall(OtherNodes, net_kernel,
@@ -467,7 +466,7 @@ hidden_node(Config) when is_list(Config) ->
?line {ok, V} = start_node(visible_node, VArgs),
VMN = start_monitor_nodes_proc(V),
?line {ok, H} = start_node(hidden_node, HArgs),
- % Connect visible_node -> hidden_node
+ %% Connect visible_node -> hidden_node
connect_nodes(V, H),
test_nodes(V, H),
stop_node(H),
@@ -477,7 +476,7 @@ hidden_node(Config) when is_list(Config) ->
?line {ok, H} = start_node(hidden_node, HArgs),
HMN = start_monitor_nodes_proc(H),
?line {ok, V} = start_node(visible_node, VArgs),
- % Connect hidden_node -> visible_node
+ %% Connect hidden_node -> visible_node
connect_nodes(H, V),
test_nodes(V, H),
stop_node(V),
@@ -487,21 +486,21 @@ hidden_node(Config) when is_list(Config) ->
ok.
connect_nodes(A, B) ->
- % Check that they haven't already connected.
+ %% Check that they haven't already connected.
?line false = lists:member(A, rpc:call(B, erlang, nodes, [connected])),
?line false = lists:member(B, rpc:call(A, erlang, nodes, [connected])),
- % Connect them.
+ %% Connect them.
?line pong = rpc:call(A, net_adm, ping, [B]).
test_nodes(V, H) ->
- % No nodes should be visible on hidden_node
+ %% No nodes should be visible on hidden_node
?line [] = rpc:call(H, erlang, nodes, []),
- % visible_node should be hidden on hidden_node
+ %% visible_node should be hidden on hidden_node
?line true = lists:member(V, rpc:call(H, erlang, nodes, [hidden])),
- % hidden_node node shouldn't be visible on visible_node
+ %% hidden_node node shouldn't be visible on visible_node
?line false = lists:member(H, rpc:call(V, erlang, nodes, [])),
- % hidden_node should be hidden on visible_node
+ %% hidden_node should be hidden on visible_node
?line true = lists:member(H, rpc:call(V, erlang, nodes, [hidden])).
mn_loop(MNs) ->
@@ -711,7 +710,6 @@ 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),
-% io:format("Names: ~p~n", [Names]),
?line [NN1, NN2, NN3, NN4, NN5, NN6, NN7, NN8, NN9] = Names,
?line {ok, N1} = start_node(NN1),
@@ -790,7 +788,6 @@ 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),
-% io:format("Names: ~p~n", [Names]),
?line [NN1, NN2, NN3] = Names,
?line {ok, N1} = start_node(NN1),
@@ -879,7 +876,7 @@ monitor_nodes_otp_6481_test(Config, TestType) when is_list(Config) ->
%% Verify the monitor_nodes order expected
?line TestMonNodeState = monitor_node_state(),
- %io:format("~p~n", [TestMonNodeState]),
+ %% io:format("~p~n", [TestMonNodeState]),
?line TestMonNodeState =
MonNodeState
++ case TestType of
@@ -899,11 +896,11 @@ monitor_nodes_otp_6481_test(Config, TestType) when is_list(Config) ->
?line RemotePid = spawn(Node,
fun () ->
receive after 1500 -> ok end,
- % infinit loop of msgs
- % we want an endless stream of messages and the kill
- % the node mercilessly.
- % We then want to ensure that the nodedown message arrives
- % last ... without garbage after it.
+ %% infinit loop of msgs
+ %% we want an endless stream of messages and the kill
+ %% the node mercilessly.
+ %% We then want to ensure that the nodedown message arrives
+ %% last ... without garbage after it.
_ = spawn(fun() -> node_loop_send(Me, NodeMsg, 1) end),
receive {Me, kill_it} -> ok end,
halt()
@@ -917,7 +914,7 @@ monitor_nodes_otp_6481_test(Config, TestType) when is_list(Config) ->
?line no_msgs(500),
?line {nodeup, Node} = receive Msg1 -> Msg1 end,
?line {NodeMsg, 1} = receive Msg2 -> Msg2 end,
- % msg stream has begun, kill the node
+ %% msg stream has begun, kill the node
?line RemotePid ! {self(), kill_it},
%% Verify that '{nodedown, Node}' comes after the last '{NodeMsg, N}'
@@ -1182,26 +1179,12 @@ start_node(Name, Param, Rel) when is_list(Rel) ->
start_node(Name, Param) ->
NewParam = Param ++ " -pa " ++ filename:dirname(code:which(?MODULE)),
test_server:start_node(Name, slave, [{args, NewParam}]).
-% M = list_to_atom(from($@, atom_to_list(node()))),
-% slave:start_link(M, Name, Param).
start_node(Name) ->
start_node(Name, "").
stop_node(Node) ->
test_server:stop_node(Node).
-% erlang:monitor_node(Node, true),
-% rpc:cast(Node, init, stop, []),
-% receive
-% {nodedown, Node} ->
-% ok
-% after 10000 ->
-% ct:fail({stop_node, Node})
-% end.
-
-% from(H, [H | T]) -> T;
-% from(H, [_ | T]) -> from(H, T);
-% from(H, []) -> [].
get_nodenames(N, T) ->
get_nodenames(N, T, []).
diff --git a/lib/kernel/test/erl_distribution_wb_SUITE.erl b/lib/kernel/test/erl_distribution_wb_SUITE.erl
index a8625b064b..0c22c94066 100644
--- a/lib/kernel/test/erl_distribution_wb_SUITE.erl
+++ b/lib/kernel/test/erl_distribution_wb_SUITE.erl
@@ -265,9 +265,9 @@ simultaneous_md5(Node, OurName, Cookie) when OurName < Node ->
?line exit(Else2)
end,
?line nok = recv_status(SocketA),
- % Now we are expected to close A
+ %% Now we are expected to close A
?line gen_tcp:close(SocketA),
- % But still Socket B will continue
+ %% But still Socket B will continue
?line {normal,Node,5} = recv_name(SocketB), % See 1)
?line send_status(SocketB, ok_simultaneous),
?line MyChallengeB = gen_challenge(),
@@ -277,7 +277,7 @@ simultaneous_md5(Node, OurName, Cookie) when OurName < Node ->
?line send_challenge_ack(SocketB, DigestB),
?line inet:setopts(SocketB, [{active, false},
{packet, 4}]),
- % This should be the ping message.
+ %% This should be the ping message.
?line {Header, Message} = recv_message(SocketB),
?line io:format("Received header ~p, data ~p.~n",
[Header, Message]),
diff --git a/lib/kernel/test/error_logger_warn_SUITE.erl b/lib/kernel/test/error_logger_warn_SUITE.erl
index 6b5263a3f8..d8bbd42517 100644
--- a/lib/kernel/test/error_logger_warn_SUITE.erl
+++ b/lib/kernel/test/error_logger_warn_SUITE.erl
@@ -120,7 +120,7 @@ file_utc(Config) when is_list(Config) ->
file_utc().
-% a small gen_event
+%% a small gen_event
init([Pid]) ->
{ok, Pid}.
@@ -224,7 +224,7 @@ warnings_errors() ->
stop_node(Node),
ok.
-% RB...
+%% RB...
quote(String) ->
case os:type() of
@@ -271,7 +271,7 @@ findstrc(String,File) ->
0
end.
-% Doesn't count empty lines
+%% Doesn't count empty lines
lines(File) ->
length(
string:tokens(
@@ -279,7 +279,7 @@ lines(File) ->
element(2,file:read_file(File))),
"\n")).
-%directories anf filenames
+%% Directories and filenames
ld() ->
Config = get(elw_config),
PrivDir = proplists:get_value(priv_dir, Config),
@@ -303,7 +303,7 @@ nice_stop_node(Name) ->
{nodedown,Name} -> ok
end.
-%clean out rd() before each report test in order to get only one file...
+%% Clean out rd() before each report test in order to get only one file...
clean_rd() ->
{ok,L} = file:list_dir(rd()),
lists:foreach(fun(F) ->
@@ -340,10 +340,10 @@ one_rb_findstr(Param,String) ->
rb:stop_log(),
findstr(String,lf()).
-% Tests
+%% Tests
rb_basic() ->
clean_rd(),
- % Behold, the magic parameters to activate rb logging...
+ %% Behold, the magic parameters to activate rb logging...
Node = start_node(nn(),"-boot start_sasl -sasl error_logger_mf_dir "++
quote(rd())++" error_logger_mf_maxbytes 5000 "
"error_logger_mf_maxfiles 5"),
@@ -501,9 +501,7 @@ rb_utc() ->
file_utc() ->
file:delete(lf()),
SS="-stdlib utc_log true -kernel error_logger "++ oquote("{file,"++iquote(lf())++"}"),
- %erlang:display(SS),
Node = start_node(nn(),SS),
- %erlang:display(rpc:call(Node,application,get_env,[kernel,error_logger])),
Self = self(),
GL = group_leader(),
fake_gl(Node,error_msg,"~p~n",[Self]),
diff --git a/lib/kernel/test/file_SUITE.erl b/lib/kernel/test/file_SUITE.erl
index ede911c55b..f5f256a257 100644
--- a/lib/kernel/test/file_SUITE.erl
+++ b/lib/kernel/test/file_SUITE.erl
@@ -518,11 +518,11 @@ read_write_file(Config) when is_list(Config) ->
?line {error, enoent} = ?FILE_MODULE:read_file(""),
?line {error, enoent} = ?FILE_MODULE:read_file(''),
- % Try writing to a bad filename
+ %% Try writing to a bad filename
?line {error, enoent} =
?FILE_MODULE:write_file("",term_to_binary(NullTerm)),
- % Try writing something else than a binary
+ %% Try writing something else than a binary
?line {error, badarg} = ?FILE_MODULE:write_file(Name,{1,2,3}),
?line {error, badarg} = ?FILE_MODULE:write_file(Name,self()),
@@ -550,9 +550,9 @@ make_del_dir(Config) when is_list(Config) ->
?line {error, eexist} = ?FILE_MODULE:make_dir(NewDir),
?line ok = ?FILE_MODULE:del_dir(NewDir),
?line {error, enoent} = ?FILE_MODULE:del_dir(NewDir),
- % Make sure we are not in a directory directly under test_server
- % as that would result in eacces errors when trying to delete '..',
- % because there are processes having that directory as current.
+ %% Make sure we are not in a directory directly under test_server
+ %% as that would result in eacces errors when trying to delete '..',
+ %% because there are processes having that directory as current.
?line ok = ?FILE_MODULE:make_dir(NewDir),
?line {ok,CurrentDir} = file:get_cwd(),
case {os:type(), length(NewDir) >= 260 } of
@@ -1917,26 +1917,26 @@ allocate(Config) when is_list(Config) ->
ok.
allocate_and_assert(Fd, Offset, Length) ->
- % Just verify that calls to ?PRIM_FILE:allocate/3 don't crash or have
- % any other negative side effect. We can't really asssert against a
- % specific return value, because support for file space pre-allocation
- % depends on the OS, OS version and underlying filesystem.
- %
- % The Linux kernel added support for fallocate() in version 2.6.23,
- % which currently works only for the ext4, ocfs2, xfs and btrfs file
- % systems. posix_fallocate() is available in glibc as of version
- % 2.1.94, but it was buggy until glibc version 2.7.
- %
- % Mac OS X, as of version 10.3, supports the fcntl operation F_PREALLOCATE.
- %
- % Solaris supports posix_fallocate() but only for the UFS file system
- % apparently (not supported for ZFS).
- %
- % FreeBSD 9.0 is the first FreeBSD release supporting posix_fallocate().
- %
- % For Windows there's apparently no way to pre-allocate file space, at
- % least with same semantics as posix_fallocate(), fallocate() and
- % fcntl F_PREALLOCATE.
+ %% Just verify that calls to ?PRIM_FILE:allocate/3 don't crash or have
+ %% any other negative side effect. We can't really asssert against a
+ %% specific return value, because support for file space pre-allocation
+ %% depends on the OS, OS version and underlying filesystem.
+ %%
+ %% The Linux kernel added support for fallocate() in version 2.6.23,
+ %% which currently works only for the ext4, ocfs2, xfs and btrfs file
+ %% systems. posix_fallocate() is available in glibc as of version
+ %% 2.1.94, but it was buggy until glibc version 2.7.
+ %%
+ %% Mac OS X, as of version 10.3, supports the fcntl operation F_PREALLOCATE.
+ %%
+ %% Solaris supports posix_fallocate() but only for the UFS file system
+ %% apparently (not supported for ZFS).
+ %%
+ %% FreeBSD 9.0 is the first FreeBSD release supporting posix_fallocate().
+ %%
+ %% For Windows there's apparently no way to pre-allocate file space, at
+ %% least with same semantics as posix_fallocate(), fallocate() and
+ %% fcntl F_PREALLOCATE.
Result = ?FILE_MODULE:allocate(Fd, Offset, Length),
case os:type() of
{win32, _} ->
@@ -2543,9 +2543,9 @@ compress_async_crash(Config) when is_list(Config) ->
?line ok = ?FILE_MODULE:write(Fd, ExpectedData),
?line ok = ?FILE_MODULE:close(Fd),
- % Test that when using async thread pool, the emulator doesn't crash
- % when the efile port driver is stopped while a compressed file operation
- % is in progress (being carried by an async thread).
+ %% Test that when using async thread pool, the emulator doesn't crash
+ %% when the efile port driver is stopped while a compressed file operation
+ %% is in progress (being carried by an async thread).
?line ok = compress_async_crash_loop(10000, Path, ExpectedData),
?line ok = ?FILE_MODULE:delete(Path),
ok.
diff --git a/lib/kernel/test/file_name_SUITE.erl b/lib/kernel/test/file_name_SUITE.erl
index b3ebc48856..bedcac7923 100644
--- a/lib/kernel/test/file_name_SUITE.erl
+++ b/lib/kernel/test/file_name_SUITE.erl
@@ -252,7 +252,6 @@ check_normal(Mod) ->
?line make_normal_dir(Mod),
?line {ok, L0} = Mod:list_dir("."),
?line L1 = lists:sort(L0),
- %erlang:display(L1),
?line L1 = lists:sort(list(normal_dir())),
?line {ok,D2} = Mod:get_cwd(),
?line true = is_list(D2),
@@ -366,7 +365,7 @@ check_icky(Mod) ->
?line {ok,BeginAt} = Mod:get_cwd(),
?line rm_r2(Mod,"åäö_dir"),
{OS,_} = os:type(),
- % Check that treat_icky really converts to the same as the OS
+ %% Check that treat_icky really converts to the same as the OS
case UniMode of
true ->
?line chk_cre_dir(Mod,[{directory,"åäö_dir",[]}]),
@@ -577,7 +576,6 @@ rm_rf(Mod,Dir) ->
end.
rm_r(Mod,Dir) ->
- %erlang:display({rm_r,Dir}),
case Mod:read_link_info(Dir) of
{ok, #file_info{type = directory}} ->
{ok,#file_info{type = directory}} = Mod:read_file_info(Dir),
@@ -595,7 +593,7 @@ rm_r(Mod,Dir) ->
end.
%% For icky test, allow binaries sometimes
rm_r2(Mod,Dir) ->
- %erlang:display({rm_r2,Dir}),
+ %% erlang:display({rm_r2,Dir}),
case Mod:read_link_info(Dir) of
{ok, #file_info{type = directory}} ->
{ok,#file_info{type = directory}} = Mod:read_file_info(Dir),
@@ -615,7 +613,7 @@ rm_r2(Mod,Dir) ->
chk_cre_dir(_,[]) ->
ok;
chk_cre_dir(Mod,[{regular,Name,Content}|T]) ->
- %io:format("~p~n",[Name]),
+ %% io:format("~p~n",[Name]),
ok = Mod:write_file(Name,Content),
chk_cre_dir(Mod,T);
chk_cre_dir(Mod,[{link,Name,Target}|T]) ->
@@ -626,9 +624,9 @@ chk_cre_dir(Mod,[{symlink,Name,Target}|T]) ->
chk_cre_dir(Mod,T);
chk_cre_dir(Mod,[{directory,Name,Content}|T]) ->
ok = Mod:make_dir(Name),
- %io:format("Content = ~p~n",[Content]),
+ %% io:format("Content = ~p~n",[Content]),
Content2 = [{Ty,filename:join(Name,N),case Ty of link -> filename:join(Name,C); _ -> C end} || {Ty,N,C} <- Content ],
- %io:format("Content2 = ~p~n",[Content2]),
+ %% io:format("Content2 = ~p~n",[Content2]),
chk_cre_dir(Mod,Content2),
chk_cre_dir(Mod,T).
@@ -769,7 +767,7 @@ treat_icky(Bin) ->
Bin
end.
-% Handle windows having absolute soft link targets.
+%% Handle windows having absolute soft link targets.
fixlink({ok,Link}) ->
case os:type() of
{win32,_} ->
@@ -812,7 +810,7 @@ get_data(FN,List) ->
convlist(L) ->
convlist(file:native_name_encoding(),L).
convlist(latin1,[Bin|T]) when is_binary(Bin) ->
- %erlang:display('Convert...'),
+ %% erlang:display('Convert...'),
[binary_to_list(Bin)| convlist(latin1,T)];
convlist(Any,[H|T]) ->
[H|convlist(Any,T)];
diff --git a/lib/kernel/test/gen_tcp_echo_SUITE.erl b/lib/kernel/test/gen_tcp_echo_SUITE.erl
index 9e7970da4f..bc5888368a 100644
--- a/lib/kernel/test/gen_tcp_echo_SUITE.erl
+++ b/lib/kernel/test/gen_tcp_echo_SUITE.erl
@@ -151,8 +151,8 @@ echo_test_1(SockOpts, EchoFun, Config0) ->
[{type, {cdr, little}}|Config]),
?line case lists:keymember(packet_size, 1, SockOpts) of
false ->
- % This is cheating, we should test that packet_size
- % also works for line and http.
+ %% This is cheating, we should test that packet_size
+ %% also works for line and http.
echo_packet([{packet, line}|SockOpts], EchoFun, Config),
echo_packet([{packet, http}|SockOpts], EchoFun, Config),
echo_packet([{packet, http_bin}|SockOpts], EchoFun, Config);
diff --git a/lib/kernel/test/gen_tcp_misc_SUITE.erl b/lib/kernel/test/gen_tcp_misc_SUITE.erl
index 3854142e86..7c3b011eb9 100644
--- a/lib/kernel/test/gen_tcp_misc_SUITE.erl
+++ b/lib/kernel/test/gen_tcp_misc_SUITE.erl
@@ -21,8 +21,6 @@
-include_lib("common_test/include/ct.hrl").
-%-compile(export_all).
-
-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1,
init_per_group/2,end_per_group/2,
controlling_process/1, controlling_process_self/1,
@@ -43,7 +41,7 @@
busy_send/1, busy_disconnect_passive/1, busy_disconnect_active/1,
fill_sendq/1, partial_recv_and_close/1,
partial_recv_and_close_2/1,partial_recv_and_close_3/1,so_priority/1,
- % Accept tests
+ %% Accept tests
primitive_accept/1,multi_accept_close_listen/1,accept_timeout/1,
accept_timeouts_in_order/1,accept_timeouts_in_order2/1,
accept_timeouts_in_order3/1,accept_timeouts_in_order4/1,
@@ -535,8 +533,8 @@ otp_3924_1(MaxDelay) ->
{ok, Node} = start_node(otp_3924),
DataLen = 100*1024,
Data = otp_3924_data(DataLen),
- % Repeat the test a couple of times to prevent the test from passing
- % by chance.
+ %% Repeat the test a couple of times to prevent the test from passing
+ %% by chance.
repeat(10, fun(N) ->
ok = otp_3924(MaxDelay, Node, Data, DataLen, N)
end),
@@ -743,8 +741,8 @@ all_equal(Rule, [Rule | T]) ->
all_equal(Rule, T);
all_equal(_, [_ | _]) ->
ct:sleep(?RECOVER_SLEEP), % Wait a while and *hope* that we'll
- % recover so other tests won't be
- % affected.
+ %% recover so other tests won't be
+ %% affected.
ct:fail(max_socket_mismatch);
all_equal(_Rule, []) ->
ok.
@@ -1871,10 +1869,6 @@ priority_server({Parent,Ref}) ->
test_prio_fail() ->
{ok,L} = gen_tcp:listen(0, [{active,false}]),
{error,_} = inet:setopts(L,[{priority,1000}]),
-% This error could only happen in linux kernels earlier than 2.6.24.4
-% Privilege check is now disabled and IP_TOS can never fail (only silently
-% be masked).
-% {error,_} = inet:setopts(L,[{tos,6 bsl 5}]),
gen_tcp:close(L),
ok.
@@ -2405,7 +2399,6 @@ mad_sender(S) ->
flush() ->
receive
_X ->
- %erlang:display(_X),
flush()
after 0 ->
ok
@@ -2425,7 +2418,6 @@ send_timeout_active(Config) when is_list(Config) ->
{tcp, _Sock, _Data} ->
inet:setopts(A, [{active, once}]),
Res = gen_tcp:send(A,lists:duplicate(1000, $a)),
- %erlang:display(Res),
Res;
Err ->
io:format("sock closed: ~p~n", [Err]),
diff --git a/lib/kernel/test/gen_udp_SUITE.erl b/lib/kernel/test/gen_udp_SUITE.erl
index 3eb0c90e3e..f7e9e69e48 100644
--- a/lib/kernel/test/gen_udp_SUITE.erl
+++ b/lib/kernel/test/gen_udp_SUITE.erl
@@ -17,15 +17,16 @@
%%
%% %CopyrightEnd%
%%
-%
-% test the behavior of gen_udp. Testing udp is really a very unfunny task,
-% because udp is not deterministic.
-%
+
+%%
+%% Test the behavior of gen_udp. Testing udp is really a very unfunny task,
+%% because udp is not deterministic.
+%%
-module(gen_udp_SUITE).
-include_lib("common_test/include/ct.hrl").
-% XXX - we should pick a port that we _know_ is closed. That's pretty hard.
+%% XXX - we should pick a port that we _know_ is closed. That's pretty hard.
-define(CLOSED_PORT, 6666).
-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1,
@@ -550,9 +551,10 @@ active_n(Config) when is_list(Config) ->
ok = gen_udp:close(S1),
ok.
-%
-% Utils
-%
+%%
+%% Utils
+%%
+
start_node(Name) ->
Pa = filename:dirname(code:which(?MODULE)),
test_server:start_node(Name, slave, [{args, "-pa " ++ Pa}]).
diff --git a/lib/kernel/test/global_SUITE.erl b/lib/kernel/test/global_SUITE.erl
index 9bc659b6e1..19b800fc75 100644
--- a/lib/kernel/test/global_SUITE.erl
+++ b/lib/kernel/test/global_SUITE.erl
@@ -19,8 +19,6 @@
%%
-module(global_SUITE).
-%-define(line_trace, 1).
-
-export([all/0, suite/0,groups/0,init_per_group/2,end_per_group/2,
init_per_suite/1, end_per_suite/1,
names/1, names_hidden/1, locks/1, locks_hidden/1,
@@ -311,7 +309,7 @@ lost_unregister(Config) when is_list(Config) ->
?line wait_for_ready_net(Config),
- % start a proc and register it
+ %% start a proc and register it
?line {Pid, yes} = start_proc(test),
?line ?UNTIL(Pid =:= global:whereis_name(test)),
@@ -410,16 +408,16 @@ lock_global2(Id, Parent) ->
%% erl -sname XXX -rsh ctrsh where XX not in [cp1, cp2, cp3]
%%-----------------------------------------------------------------
-%cp1 - cp3 are started, and the name 'test' registered for a process on
-%test_server. Then it is checked that the name is registered on all
-%nodes, using whereis_name. Check that the same
-%name can't be registered with another value. Exit the registered
-%process and check that the name disappears. Register a new process
-%(Pid2) under the name 'test'. Let another new process (Pid3)
-%reregister itself under the same name. Test global:send/2. Test
-%unregister. Kill Pid3. Start a process (Pid6) on cp3,
-%register it as 'test', stop cp1 - cp3 and check that 'test' disappeared.
-%Kill Pid2 and check that 'test' isn't registered.
+%% cp1 - cp3 are started, and the name 'test' registered for a process on
+%% test_server. Then it is checked that the name is registered on all
+%% nodes, using whereis_name. Check that the same
+%% name can't be registered with another value. Exit the registered
+%% process and check that the name disappears. Register a new process
+%% (Pid2) under the name 'test'. Let another new process (Pid3)
+%% reregister itself under the same name. Test global:send/2. Test
+%% unregister. Kill Pid3. Start a process (Pid6) on cp3,
+%% register it as 'test', stop cp1 - cp3 and check that 'test' disappeared.
+%% Kill Pid2 and check that 'test' isn't registered.
names(Config) when is_list(Config) ->
Timeout = 30,
@@ -434,10 +432,10 @@ names(Config) when is_list(Config) ->
?line wait_for_ready_net(Config),
- % start a proc and register it
+ %% start a proc and register it
?line {Pid, yes} = start_proc(test),
- % test that it is registered at all nodes
+ %% test that it is registered at all nodes
?line
?UNTIL(begin
(Pid =:= global:whereis_name(test)) and
@@ -447,11 +445,11 @@ names(Config) when is_list(Config) ->
([test] =:= global:registered_names() -- OrigNames)
end),
- % try to register the same name
+ %% try to register the same name
?line no = global:register_name(test, self()),
?line no = rpc:call(Cp1, global, register_name, [test, self()]),
- % let process exit, check that it is unregistered automatically
+ %% let process exit, check that it is unregistered automatically
exit_p(Pid),
?line
@@ -460,14 +458,14 @@ names(Config) when is_list(Config) ->
(undefined =:= rpc:call(Cp2, global, whereis_name, [test])) and
(undefined =:= rpc:call(Cp3, global, whereis_name, [test]))),
- % test re_register
+ %% test re_register
?line {Pid2, yes} = start_proc(test),
?line ?UNTIL(Pid2 =:= rpc:call(Cp3, global, whereis_name, [test])),
Pid3 = rpc:call(Cp3, ?MODULE, start_proc2, [test]),
?line ?UNTIL(Pid3 =:= rpc:call(Cp3, global, whereis_name, [test])),
Pid3 = global:whereis_name(test),
- % test sending
+ %% test sending
global:send(test, {ping, self()}),
receive
{pong, Cp3} -> ok
@@ -493,11 +491,12 @@ names(Config) when is_list(Config) ->
?line ?UNTIL(undefined =:= global:whereis_name(test)),
- % register a proc
+ %% register a proc
?line {_Pid6, yes} = rpc:call(Cp3, ?MODULE, start_proc, [test]),
write_high_level_trace(Config),
- % stop the nodes, and make sure names are released.
+
+ %% stop the nodes, and make sure names are released.
stop_node(Cp1),
stop_node(Cp2),
stop_node(Cp3),
@@ -528,21 +527,21 @@ names_hidden(Config) when is_list(Config) ->
?line [] = [Cp1, Cp2 | OrigNodes] -- nodes(),
- % start a proc on hidden node and register it
+ %% start a proc on hidden node and register it
?line {HPid, yes} = rpc:call(Cp3, ?MODULE, start_proc, [test]),
?line Cp3 = node(HPid),
- % Check that it didn't get registered on visible nodes
+ %% Check that it didn't get registered on visible nodes
?line
?UNTIL((undefined =:= global:whereis_name(test)) and
(undefined =:= rpc:call(Cp1, global, whereis_name, [test])) and
(undefined =:= rpc:call(Cp2, global, whereis_name, [test]))),
- % start a proc on visible node and register it
+ %% start a proc on visible node and register it
?line {Pid, yes} = start_proc(test),
?line true = (Pid =/= HPid),
- % test that it is registered at all nodes
+ %% test that it is registered at all nodes
?line
?UNTIL((Pid =:= global:whereis_name(test)) and
(Pid =:= rpc:call(Cp1, global, whereis_name, [test])) and
@@ -550,11 +549,11 @@ names_hidden(Config) when is_list(Config) ->
(HPid =:= rpc:call(Cp3, global, whereis_name, [test])) and
([test] =:= global:registered_names() -- OrigNames)),
- % try to register the same name
+ %% try to register the same name
?line no = global:register_name(test, self()),
?line no = rpc:call(Cp1, global, register_name, [test, self()]),
- % let process exit, check that it is unregistered automatically
+ %% let process exit, check that it is unregistered automatically
exit_p(Pid),
?line
@@ -563,14 +562,14 @@ names_hidden(Config) when is_list(Config) ->
(undefined =:= rpc:call(Cp2, global, whereis_name, [test])) and
(HPid =:= rpc:call(Cp3, global, whereis_name, [test]))),
- % test re_register
+ %% test re_register
?line {Pid2, yes} = start_proc(test),
?line ?UNTIL(Pid2 =:= rpc:call(Cp2, global, whereis_name, [test])),
Pid3 = rpc:call(Cp2, ?MODULE, start_proc2, [test]),
?line ?UNTIL(Pid3 =:= rpc:call(Cp2, global, whereis_name, [test])),
?line Pid3 = global:whereis_name(test),
- % test sending
+ %% test sending
?line Pid3 = global:send(test, {ping, self()}),
receive
{pong, Cp2} -> ok
@@ -605,7 +604,8 @@ names_hidden(Config) when is_list(Config) ->
?line ?UNTIL(undefined =:= global:whereis_name(test)),
write_high_level_trace(Config),
- % stop the nodes, and make sure names are released.
+
+ %% stop the nodes, and make sure names are released.
stop_node(Cp1),
stop_node(Cp2),
stop_node(Cp3),
@@ -624,93 +624,106 @@ locks(Config) when is_list(Config) ->
?line wait_for_ready_net(Config),
- % start two procs
+ %% start two procs
?line Pid = start_proc(),
?line Pid2 = rpc:call(Cp1, ?MODULE, start_proc, []),
- % set a lock, and make sure noone else can set the same lock
+
+ %% set a lock, and make sure noone else can set the same lock
?line true = global:set_lock({test_lock, self()}, ?NODES, 1),
?line false = req(Pid, {set_lock, test_lock, self()}),
?line false = req(Pid2, {set_lock, test_lock, self()}),
- % delete, and let another proc set the lock
+
+ %% delete, and let another proc set the lock
global:del_lock({test_lock, self()}),
?line true = req(Pid, {set_lock, test_lock, self()}),
?line false = req(Pid2, {set_lock, test_lock, self()}),
?line false = global:set_lock({test_lock, self()}, ?NODES,1),
- % kill lock-holding proc, make sure the lock is released
+
+ %% kill lock-holding proc, make sure the lock is released
exit_p(Pid),
?UNTIL(true =:= global:set_lock({test_lock, self()}, ?NODES,1)),
Pid2 ! {set_lock_loop, test_lock, self()},
- % make sure we don't have the msg
+
+ %% make sure we don't have the msg
receive
{got_lock, Pid2} -> ct:fail(got_lock)
after
1000 -> ok
end,
global:del_lock({test_lock, self()}),
- % make sure pid2 got the lock
+
+ %% make sure pid2 got the lock
receive
{got_lock, Pid2} -> ok
after
- % 12000 >> 5000, which is the max time before a new retry for
- % set_lock
+ %% 12000 >> 5000, which is the max time before a new retry for
+ %% set_lock
12000 -> ct:fail(got_lock2)
end,
- % let proc set the same lock
+ %% let proc set the same lock
?line true = req(Pid2, {set_lock, test_lock, self()}),
- % let proc set new lock
+
+ %% let proc set new lock
?line true = req(Pid2, {set_lock, test_lock2, self()}),
?line false = global:set_lock({test_lock, self()},?NODES,1),
?line false = global:set_lock({test_lock2, self()}, ?NODES,1),
exit_p(Pid2),
-% erlang:display({locks1, ets:tab2list(global_locks)}),
?UNTIL(true =:= global:set_lock({test_lock, self()}, ?NODES, 1)),
?UNTIL(true =:= global:set_lock({test_lock2, self()}, ?NODES, 1)),
?line global:del_lock({test_lock, self()}),
?line global:del_lock({test_lock2, self()}),
- % let proc set two locks
+ %% let proc set two locks
?line Pid3 = rpc:call(Cp1, ?MODULE, start_proc, []),
?line true = req(Pid3, {set_lock, test_lock, self()}),
?line true = req(Pid3, {set_lock, test_lock2, self()}),
- % del one lock
+
+ %% del one lock
?line Pid3 ! {del_lock, test_lock2},
ct:sleep(100),
- % check that one lock is still set, but not the other
+
+ %% check that one lock is still set, but not the other
?line false = global:set_lock({test_lock, self()}, ?NODES, 1),
?line true = global:set_lock({test_lock2, self()}, ?NODES, 1),
?line global:del_lock({test_lock2, self()}),
- % kill lock-holder
+
+ %% kill lock-holder
exit_p(Pid3),
-% erlang:display({locks2, ets:tab2list(global_locks)}),
+
?UNTIL(true =:= global:set_lock({test_lock, self()}, ?NODES, 1)),
?line global:del_lock({test_lock, self()}),
?UNTIL(true =:= global:set_lock({test_lock2, self()}, ?NODES, 1)),
?line global:del_lock({test_lock2, self()}),
- % start one proc on each node
+ %% start one proc on each node
?line Pid4 = start_proc(),
?line Pid5 = rpc:call(Cp1, ?MODULE, start_proc, []),
?line Pid6 = rpc:call(Cp2, ?MODULE, start_proc, []),
?line Pid7 = rpc:call(Cp3, ?MODULE, start_proc, []),
- % set lock on two nodes
+
+ %% set lock on two nodes
?line true = req(Pid4, {set_lock, test_lock, self(), [node(), Cp1]}),
?line false = req(Pid5, {set_lock, test_lock, self(), [node(), Cp1]}),
- % set same lock on other two nodes
+
+ %% set same lock on other two nodes
?line true = req(Pid6, {set_lock, test_lock, self(), [Cp2, Cp3]}),
?line false = req(Pid7, {set_lock, test_lock, self(), [Cp2, Cp3]}),
- % release lock
+
+ %% release lock
Pid6 ! {del_lock, test_lock, [Cp2, Cp3]},
- % try to set lock on a node that already has the lock
+
+ %% try to set lock on a node that already has the lock
?line false = req(Pid6, {set_lock, test_lock, self(), [Cp1, Cp2, Cp3]}),
- % set lock on a node
+ %% set lock on a node
exit_p(Pid4),
?UNTIL(true =:= req(Pid5, {set_lock, test_lock, self(), [node(), Cp1]})),
?line Pid8 = start_proc(),
?line false = req(Pid8, {set_lock, test_lock, self()}),
write_high_level_trace(Config),
- % stop the nodes, and make sure locks are released.
+
+ %% stop the nodes, and make sure locks are released.
stop_node(Cp1),
stop_node(Cp2),
stop_node(Cp3),
@@ -740,61 +753,68 @@ locks_hidden(Config) when is_list(Config) ->
?line [] = [Cp1, Cp2 | OrigNodes] -- nodes(),
- % start two procs
+ %% start two procs
?line Pid = start_proc(),
?line Pid2 = rpc:call(Cp1, ?MODULE, start_proc, []),
?line HPid = rpc:call(Cp3, ?MODULE, start_proc, []),
- % Make sure hidden node doesn't interfere with visible nodes lock
+
+ %% Make sure hidden node doesn't interfere with visible nodes lock
?line true = req(HPid, {set_lock, test_lock, self()}),
?line true = global:set_lock({test_lock, self()}, ?NODES, 1),
?line false = req(Pid, {set_lock, test_lock, self()}),
?line true = req(HPid, {del_lock_sync, test_lock, self()}),
?line false = req(Pid2, {set_lock, test_lock, self()}),
- % delete, and let another proc set the lock
+
+ %% delete, and let another proc set the lock
global:del_lock({test_lock, self()}),
?line true = req(Pid, {set_lock, test_lock, self()}),
?line false = req(Pid2, {set_lock, test_lock, self()}),
?line false = global:set_lock({test_lock, self()}, ?NODES,1),
- % kill lock-holding proc, make sure the lock is released
+
+ %% kill lock-holding proc, make sure the lock is released
exit_p(Pid),
?UNTIL(true =:= global:set_lock({test_lock, self()}, ?NODES, 1)),
?UNTIL(true =:= req(HPid, {set_lock, test_lock, self()})),
Pid2 ! {set_lock_loop, test_lock, self()},
- % make sure we don't have the msg
+
+ %% make sure we don't have the msg
receive
{got_lock, Pid2} -> ct:fail(got_lock)
after
1000 -> ok
end,
global:del_lock({test_lock, self()}),
- % make sure pid2 got the lock
+
+ %% make sure pid2 got the lock
receive
{got_lock, Pid2} -> ok
after
- % 12000 >> 5000, which is the max time before a new retry for
- % set_lock
+ %% 12000 >> 5000, which is the max time before a new retry for
+ %% set_lock
12000 -> ct:fail(got_lock2)
end,
?line true = req(HPid, {del_lock_sync, test_lock, self()}),
- % let proc set the same lock
+ %% let proc set the same lock
?line true = req(Pid2, {set_lock, test_lock, self()}),
- % let proc set new lock
+
+ %% let proc set new lock
?line true = req(Pid2, {set_lock, test_lock2, self()}),
?line true = req(HPid, {set_lock, test_lock, self()}),
?line true = req(HPid, {set_lock, test_lock2, self()}),
exit_p(HPid),
?line false = global:set_lock({test_lock, self()},?NODES,1),
?line false = global:set_lock({test_lock2, self()}, ?NODES,1),
+
exit_p(Pid2),
-% erlang:display({locks1, ets:tab2list(global_locks)}),
?UNTIL(true =:= global:set_lock({test_lock, self()}, ?NODES, 1)),
?UNTIL(true =:= global:set_lock({test_lock2, self()}, ?NODES, 1)),
?line global:del_lock({test_lock, self()}),
?line global:del_lock({test_lock2, self()}),
write_high_level_trace(Config),
- % stop the nodes, and make sure locks are released.
+
+ %% stop the nodes, and make sure locks are released.
stop_node(Cp1),
stop_node(Cp2),
stop_node(Cp3),
@@ -832,34 +852,39 @@ names_and_locks(Config) when is_list(Config) ->
?line {ok, Cp2} = start_node(cp2, Config),
?line {ok, Cp3} = start_node(cp3, Config),
- % start one proc on each node
+ %% start one proc on each node
?line PidTS = start_proc(),
?line Pid1 = rpc:call(Cp1, ?MODULE, start_proc, []),
?line Pid2 = rpc:call(Cp2, ?MODULE, start_proc, []),
?line Pid3 = rpc:call(Cp3, ?MODULE, start_proc, []),
- % register some of them
+
+ %% register some of them
?line yes = global:register_name(test1, Pid1),
?line yes = global:register_name(test2, Pid2),
?line yes = global:register_name(test3, Pid3),
?line no = global:register_name(test3, PidTS),
?line yes = global:register_name(test4, PidTS),
- % set lock on two nodes
+ %% set lock on two nodes
?line true = req(PidTS, {set_lock, test_lock, self(), [node(), Cp1]}),
?line false = req(Pid1, {set_lock, test_lock, self(), [node(), Cp1]}),
- % set same lock on other two nodes
+
+ %% set same lock on other two nodes
?line true = req(Pid2, {set_lock, test_lock, self(), [Cp2, Cp3]}),
?line false = req(Pid3, {set_lock, test_lock, self(), [Cp2, Cp3]}),
- % release lock
+
+ %% release lock
Pid2 ! {del_lock, test_lock, [Cp2, Cp3]},
ct:sleep(100),
- % try to set lock on a node that already has the lock
+
+ %% try to set lock on a node that already has the lock
?line false = req(Pid2, {set_lock, test_lock, self(), [Cp1, Cp2, Cp3]}),
- % set two locks
+
+ %% set two locks
?line true = req(Pid2, {set_lock, test_lock, self(), [Cp2, Cp3]}),
?line true = req(Pid2, {set_lock, test_lock2, self(), [Cp2, Cp3]}),
- % kill some processes, make sure all locks/names are released
+ %% kill some processes, make sure all locks/names are released
exit_p(PidTS),
?line ?UNTIL(undefined =:= global:whereis_name(test4)),
?line true = global:set_lock({test_lock, self()}, [node(), Cp1], 1),
@@ -1004,19 +1029,19 @@ basic_partition(Config) when is_list(Config) ->
?line wait_for_ready_net(Config),
- % make cp2 and cp3 connected, partitioned from us and cp1
+ %% make cp2 and cp3 connected, partitioned from us and cp1
?line rpc_cast(Cp2, ?MODULE, part1, [Config, node(), Cp1, Cp3]),
?line ?UNTIL(is_ready_partition(Config)),
- % start different processes in both partitions
+ %% start different processes in both partitions
?line {Pid, yes} = start_proc(test),
- % connect to other partition
+ %% connect to other partition
?line pong = net_adm:ping(Cp2),
?line pong = net_adm:ping(Cp3),
?line [Cp1, Cp2, Cp3] = lists:sort(nodes()),
- % check names
+ %% check names
?line ?UNTIL(Pid =:= rpc:call(Cp2, global, whereis_name, [test])),
?line ?UNTIL(undefined =/= global:whereis_name(test2)),
?line Pid2 = global:whereis_name(test2),
@@ -1026,9 +1051,9 @@ basic_partition(Config) when is_list(Config) ->
?line ?UNTIL(Pid3 =:= rpc:call(Cp1, global, whereis_name, [test4])),
?line assert_pid(Pid3),
- % kill all procs
+ %% kill all procs
?line Pid3 = global:send(test4, die),
- % sleep to let the proc die
+ %% sleep to let the proc die
wait_for_exit(Pid3),
?line ?UNTIL(undefined =:= global:whereis_name(test4)),
@@ -1060,33 +1085,34 @@ basic_name_partition(Config) when is_list(Config) ->
?line wait_for_ready_net(Config),
- % There used to be more than one name registered for some
- % processes. That was a mistake; there is no support for more than
- % one name per process, and the manual is quite clear about that
- % ("equivalent to the register/2 and whereis/1 BIFs"). The
- % resolver procedure did not take care of such "duplicated" names,
- % which caused this testcase to fail every now and then.
-
- % make cp2 and cp3 connected, partitioned from us and cp1
- % us: register name03
- % cp1: register name12
- % cp2: register name12
- % cp3: register name03
+ %% There used to be more than one name registered for some
+ %% processes. That was a mistake; there is no support for more than
+ %% one name per process, and the manual is quite clear about that
+ %% ("equivalent to the register/2 and whereis/1 BIFs"). The
+ %% resolver procedure did not take care of such "duplicated" names,
+ %% which caused this testcase to fail every now and then.
+
+ %% make cp2 and cp3 connected, partitioned from us and cp1
+ %% us: register name03
+ %% cp1: register name12
+ %% cp2: register name12
+ %% cp3: register name03
?line rpc_cast(Cp2, ?MODULE, part1_5, [Config, node(), Cp1, Cp3]),
?line ?UNTIL(is_ready_partition(Config)),
- % start different processes in both partitions
+ %% start different processes in both partitions
?line {_, yes} = start_proc_basic(name03),
?line {_, yes} = rpc:call(Cp1, ?MODULE, start_proc_basic, [name12]),
ct:sleep(1000),
- % connect to other partition
+ %% connect to other partition
?line pong = net_adm:ping(Cp3),
?line ?UNTIL([Cp1, Cp2, Cp3] =:= lists:sort(nodes())),
?line wait_for_ready_net(Config),
- % check names
+
+ %% check names
?line Pid03 = global:whereis_name(name03),
?line assert_pid(Pid03),
?line true = lists:member(node(Pid03), [node(), Cp3]),
@@ -1097,10 +1123,11 @@ basic_name_partition(Config) when is_list(Config) ->
?line true = lists:member(node(Pid12), [Cp1, Cp2]),
?line check_everywhere(Nodes, name12, Config),
- % kill all procs
+ %% kill all procs
?line Pid12 = global:send(name12, die),
?line Pid03 = global:send(name03, die),
- % sleep to let the procs die
+
+ %% sleep to let the procs die
wait_for_exit(Pid12),
wait_for_exit(Pid03),
?line
@@ -1119,18 +1146,18 @@ basic_name_partition(Config) when is_list(Config) ->
?line init_condition(Config),
ok.
-%Peer nodes cp0 - cp6 are started. Break apart the connections from
-%cp3-cp6 to cp0-cp2 and test_server so we get two partitions.
-%In the cp3-cp6 partition, start one process on each node and register
-%using both erlang:register, and global:register (test1 on cp3, test2 on
-%cp4, test3 on cp5, test4 on cp6), using different resolution functions:
-%default for test1, notify_all_name for test2, random_notify_name for test3
-%and one for test4 that sends a message to test_server and keeps the
-%process which is greater in the standard ordering. In the other partition,
-%do the same (test1 on test_server, test2 on cp0, test3 on cp1, test4 on cp2).
-%Sleep a little, then from test_server, connect to cp3-cp6 in order.
-%Check that the values for the registered names are the expected ones, and
-%that the messages from test4 arrive.
+%% Peer nodes cp0 - cp6 are started. Break apart the connections from
+%% cp3-cp6 to cp0-cp2 and test_server so we get two partitions.
+%% In the cp3-cp6 partition, start one process on each node and register
+%% using both erlang:register, and global:register (test1 on cp3, test2 on
+%% cp4, test3 on cp5, test4 on cp6), using different resolution functions:
+%% default for test1, notify_all_name for test2, random_notify_name for test3
+%% and one for test4 that sends a message to test_server and keeps the
+%% process which is greater in the standard ordering. In the other partition,
+%% do the same (test1 on test_server, test2 on cp0, test3 on cp1, test4 on cp2).
+%% Sleep a little, then from test_server, connect to cp3-cp6 in order.
+%% Check that the values for the registered names are the expected ones, and
+%% that the messages from test4 arrive.
%% Test that names are resolved correctly when two
%% partitioned networks connect.
@@ -1146,15 +1173,15 @@ advanced_partition(Config) when is_list(Config) ->
Nodes = lists:sort([node(), Cp0, Cp1, Cp2, Cp3, Cp4, Cp5, Cp6]),
?line wait_for_ready_net(Config),
- % make cp3-cp6 connected, partitioned from us and cp0-cp2
+ %% make cp3-cp6 connected, partitioned from us and cp0-cp2
?line rpc_cast(Cp3, ?MODULE, part2,
[Config, self(), node(), Cp0, Cp1, Cp2, Cp3, Cp4, Cp5,Cp6]),
?line ?UNTIL(is_ready_partition(Config)),
- % start different processes in this partition
+ %% start different processes in this partition
?line start_procs(self(), Cp0, Cp1, Cp2, Config),
- % connect to other partition
+ %% connect to other partition
?line pong = net_adm:ping(Cp3),
?line pong = net_adm:ping(Cp4),
?line pong = net_adm:ping(Cp5),
@@ -1177,7 +1204,7 @@ advanced_partition(Config) when is_list(Config) ->
Mt3 = rpc:call(Cp1, erlang, whereis, [test3]),
_Mt4 = rpc:call(Cp2, erlang, whereis, [test4]),
- % check names
+ %% check names
?line Pid1 = global:whereis_name(test1),
?line Pid1 = rpc:call(Cp3, global, whereis_name, [test1]),
?line assert_pid(Pid1),
@@ -1202,7 +1229,6 @@ advanced_partition(Config) when is_list(Config) ->
?line Pid4 = global:whereis_name(test4),
?line Pid4 = rpc:call(Cp3, global, whereis_name, [test4]),
?line assert_pid(Pid4),
-% ?line true = lists:member(Pid4, [Nt4, Mt4]),
?line Pid4 = Nt4,
?line check_everywhere(Nodes, test4, Config),
@@ -1226,14 +1252,14 @@ advanced_partition(Config) when is_list(Config) ->
?line init_condition(Config),
ok.
-%Peer nodes cp0 - cp6 are started, and partitioned just like in
-%advanced_partition. Start cp8, only connected to test_server. Let cp6
-%break apart from the rest, and 12 s later, ping cp0 and cp3, and
-%register the name test5. After the same 12 s, let cp5 halt.
-%Wait for the death of cp5. Ping cp3 (at the same time as cp6 does).
-%Take down cp2. Start cp7, restart cp2. Ping cp4, cp6 and cp8.
-%Now, expect all nodes to be connected and have the same picture of all
-%registered names.
+%% Peer nodes cp0 - cp6 are started, and partitioned just like in
+%% advanced_partition. Start cp8, only connected to test_server. Let cp6
+%% break apart from the rest, and 12 s later, ping cp0 and cp3, and
+%% register the name test5. After the same 12 s, let cp5 halt.
+%% Wait for the death of cp5. Ping cp3 (at the same time as cp6 does).
+%% Take down cp2. Start cp7, restart cp2. Ping cp4, cp6 and cp8.
+%% Now, expect all nodes to be connected and have the same picture of all
+%% registered names.
%% Stress global, make a partitioned net, make some nodes
%% go up/down a bit.
@@ -1249,13 +1275,13 @@ stress_partition(Config) when is_list(Config) ->
?line wait_for_ready_net(Config),
- % make cp3-cp5 connected, partitioned from us and cp0-cp2
- % cp6 is alone (single node). cp6 pings cp0 and cp3 in 12 secs...
+ %% make cp3-cp5 connected, partitioned from us and cp0-cp2
+ %% cp6 is alone (single node). cp6 pings cp0 and cp3 in 12 secs...
?line rpc_cast(Cp3, ?MODULE, part3,
[Config, self(), node(), Cp0, Cp1, Cp2, Cp3, Cp4, Cp5,Cp6]),
?line ?UNTIL(is_ready_partition(Config)),
- % start different processes in this partition
+ %% start different processes in this partition
?line start_procs(self(), Cp0, Cp1, Cp2, Config),
?line {ok, Cp8} = start_peer_node(cp8, Config),
@@ -1268,13 +1294,13 @@ stress_partition(Config) when is_list(Config) ->
end,
monitor_node(Cp5, false),
- % Ok, now cp6 pings us, and cp5 will go down.
+ %% Ok, now cp6 pings us, and cp5 will go down.
- % connect to other partition
+ %% connect to other partition
?line pong = net_adm:ping(Cp3),
?line rpc_cast(Cp2, ?MODULE, crash, [0]),
- % Start new nodes
+ %% Start new nodes
?line {ok, Cp7} = start_peer_node(cp7, Config),
?line {ok, Cp2_2} = start_peer_node(cp2, Config),
Nodes = lists:sort([node(), Cp0, Cp1, Cp2_2, Cp3, Cp4, Cp6, Cp7, Cp8]),
@@ -1286,7 +1312,7 @@ stress_partition(Config) when is_list(Config) ->
?line wait_for_ready_net(Nodes, Config),
- % Make sure that all nodes have the same picture of all names
+ %% Make sure that all nodes have the same picture of all names
?line check_everywhere(Nodes, test1, Config),
?line assert_pid(global:whereis_name(test1)),
@@ -1368,7 +1394,7 @@ ring(Config) when is_list(Config) ->
?line rpc_cast(Cp7, ?MODULE, single_node, [Time, Cp6, Config]),
?line rpc_cast(Cp8, ?MODULE, single_node, [Time, Cp7, Config]),
- % sleep to make the partitioned net ready
+ %% sleep to make the partitioned net ready
ct:sleep(Time - msec()),
?line pong = net_adm:ping(Cp0),
@@ -1393,7 +1419,7 @@ ring(Config) when is_list(Config) ->
?line wait_for_ready_net(Nodes, Config),
- % Just make sure that all nodes have the same picture of all names
+ %% Just make sure that all nodes have the same picture of all names
?line check_everywhere(Nodes, single_name, Config),
?line assert_pid(global:whereis_name(single_name)),
@@ -1452,7 +1478,7 @@ simple_ring(Config) when is_list(Config) ->
?line rpc_cast(Cp4, ?MODULE, single_node, [Time, Cp3, Config]),
?line rpc_cast(Cp5, ?MODULE, single_node, [Time, Cp4, Config]),
- % sleep to make the partitioned net ready
+ %% sleep to make the partitioned net ready
ct:sleep(Time - msec()),
?line pong = net_adm:ping(Cp0),
@@ -1471,7 +1497,7 @@ simple_ring(Config) when is_list(Config) ->
?line wait_for_ready_net(Nodes, Config),
- % Just make sure that all nodes have the same picture of all names
+ %% Just make sure that all nodes have the same picture of all names
?line check_everywhere(Nodes, single_name, Config),
?line assert_pid(global:whereis_name(single_name)),
@@ -1529,7 +1555,7 @@ line(Config) when is_list(Config) ->
?line rpc_cast(Cp7, ?MODULE, single_node, [Time, Cp6, Config]),
?line rpc_cast(Cp8, ?MODULE, single_node, [Time, Cp7, Config]),
- % sleep to make the partitioned net ready
+ %% Sleep to make the partitioned net ready
ct:sleep(Time - msec()),
?line pong = net_adm:ping(Cp0),
@@ -1554,7 +1580,7 @@ line(Config) when is_list(Config) ->
?line wait_for_ready_net(Nodes, Config),
- % Just make sure that all nodes have the same picture of all names
+ %% Just make sure that all nodes have the same picture of all names
?line check_everywhere(Nodes, single_name, Config),
?line assert_pid(global:whereis_name(single_name)),
@@ -1614,7 +1640,7 @@ simple_line(Config) when is_list(Config) ->
?line rpc_cast(Cp4, ?MODULE, single_node, [Time, Cp3, Config]),
?line rpc_cast(Cp5, ?MODULE, single_node, [Time, Cp4, Config]),
- % sleep to make the partitioned net ready
+ %% sleep to make the partitioned net ready
ct:sleep(Time - msec()),
?line pong = net_adm:ping(Cp0),
@@ -1633,7 +1659,7 @@ simple_line(Config) when is_list(Config) ->
?line wait_for_ready_net(Nodes, Config),
- % Just make sure that all nodes have the same picture of all names
+ %% Just make sure that all nodes have the same picture of all names
?line check_everywhere(Nodes, single_name, Config),
?line assert_pid(global:whereis_name(single_name)),
@@ -1673,7 +1699,7 @@ otp_1849(Config) when is_list(Config) ->
?line wait_for_ready_net(Config),
- % start procs on each node
+ %% start procs on each node
?line Pid1 = rpc:call(Cp1, ?MODULE, start_proc, []),
?line assert_pid(Pid1),
?line Pid2 = rpc:call(Cp2, ?MODULE, start_proc, []),
@@ -1681,7 +1707,7 @@ otp_1849(Config) when is_list(Config) ->
?line Pid3 = rpc:call(Cp3, ?MODULE, start_proc, []),
?line assert_pid(Pid3),
- % set a lock on every node
+ %% set a lock on every node
?line true = req(Pid1, {set_lock2, {test_lock, ?MODULE}, self()}),
?line true = req(Pid2, {set_lock2, {test_lock, ?MODULE}, self()}),
?line true = req(Pid3, {set_lock2, {test_lock, ?MODULE}, self()}),
@@ -1765,7 +1791,7 @@ do_otp_3162(StartFun, Config) ->
?line wait_for_ready_net(Config),
- % start procs on each node
+ %% start procs on each node
?line Pid1 = rpc:call(Cp1, ?MODULE, start_proc4, [kalle]),
?line assert_pid(Pid1),
?line Pid2 = rpc:call(Cp2, ?MODULE, start_proc4, [stina]),
@@ -2922,7 +2948,7 @@ global_groups_change(Config) ->
?line init_condition(Config),
?line M = from($@, atom_to_list(node())),
- % Create the .app files and the boot script
+ %% Create the .app files and the boot script
?line {KernelVer, StdlibVer} = create_script_dc("dc"),
?line case is_real_system(KernelVer, StdlibVer) of
true ->
@@ -2936,14 +2962,14 @@ global_groups_change(Config) ->
[Ncp1,Ncp2,Ncp3,Ncp4,Ncp5,NcpA,NcpB,NcpC,NcpD,NcpE] =
node_names([cp1,cp2,cp3,cp4,cp5,cpA,cpB,cpC,cpD,cpE], Config),
- % Write config files
+ %% Write config files
Dir = proplists:get_value(priv_dir,Config),
?line {ok, Fd_dc} = file:open(filename:join(Dir, "sys.config"), [write]),
?line config_dc1(Fd_dc, Ncp1, Ncp2, Ncp3, NcpA, NcpB, NcpC, NcpD, NcpE),
?line file:close(Fd_dc),
?line Config1 = filename:join(Dir, "sys"),
- % Test [cp1, cp2, cp3]
+ %% Test [cp1, cp2, cp3]
?line {ok, Cp1} = start_node_boot(Ncp1, Config1, dc),
?line {ok, Cp2} = start_node_boot(Ncp2, Config1, dc),
?line {ok, Cp3} = start_node_boot(Ncp3, Config1, dc),
@@ -3363,7 +3389,7 @@ part1(Config, Main, Cp1, Cp3) ->
{_, yes} -> ok; % w("ok", []);
{'EXIT', _R} ->
ok
- % w("global_SUITE line:~w: ~p", [?LINE, _R])
+ %% w("global_SUITE line:~w: ~p", [?LINE, _R])
end.
%% Runs at Cp2
@@ -3377,7 +3403,7 @@ part1_5(Config, Main, Cp1, Cp3) ->
{_, yes} -> ok; % w("ok", []);
{'EXIT', _R} ->
ok
- % w("global_SUITE line:~w: ~p", [?LINE, _R])
+ %% w("global_SUITE line:~w: ~p", [?LINE, _R])
end.
w(X,Y) ->
@@ -3451,7 +3477,7 @@ part2(Config, Parent, Main, Cp0, Cp1, Cp2, Cp3, Cp4, Cp5, Cp6) ->
part3(Config, Parent, Main, Cp0, Cp1, Cp2, Cp3, Cp4, Cp5, Cp6) ->
make_partition(Config, [Main, Cp0, Cp1, Cp2], [Cp3, Cp4, Cp5, Cp6]),
start_procs(Parent, Cp4, Cp5, Cp6, Config),
- % Make Cp6 alone
+ %% Make Cp6 alone
?line rpc_cast(Cp5, ?MODULE, crash, [12000]),
?line rpc_cast(Cp6, ?MODULE, alone, [Cp0, Cp3]).
@@ -3730,12 +3756,12 @@ start_node(Name0, How, Args, Config) ->
R = test_server:start_node(Name, How, [{args,
Args ++ " " ++
"-kernel net_setuptime 100 "
-% "-noshell "
+%% "-noshell "
"-pa " ++ Pa},
{linked, false}
]),
%% {linked,false} only seems to work for slave nodes.
-% ct:sleep(1000),
+%% ct:sleep(1000),
record_started_node(R).
start_node_rel(Name0, Rel, Config) ->
@@ -4202,8 +4228,8 @@ start_tracer() ->
tracer(L) ->
receive
- % {save, Term} ->
- % tracer([{now(),Term} | L]);
+ %% {save, Term} ->
+ %% tracer([{now(),Term} | L]);
{get, From} ->
From ! {trace, lists:reverse(L)},
tracer([]);
diff --git a/lib/kernel/test/global_group_SUITE.erl b/lib/kernel/test/global_group_SUITE.erl
index 7feabb570f..590b90c6c0 100644
--- a/lib/kernel/test/global_group_SUITE.erl
+++ b/lib/kernel/test/global_group_SUITE.erl
@@ -28,7 +28,7 @@
-export([init_per_testcase/2, end_per_testcase/2]).
-%-compile(export_all).
+%%-compile(export_all).
-include_lib("common_test/include/ct.hrl").
@@ -114,7 +114,7 @@ start_gg_proc(Config) when is_list(Config) ->
?line [] = rpc:call(Cp2, global_group, registered_names, [{node, Cp2nn}]),
?line [] = rpc:call(Cp3, global_group, registered_names, [{node, Cp3nn}]),
- % stop the nodes, and make sure names are released.
+ %% stop the nodes, and make sure names are released.
stop_node(Cp1),
stop_node(Cp2),
stop_node(Cp3),
@@ -164,7 +164,7 @@ no_gg_proc(Config) when is_list(Config) ->
?line [test_server] = rpc:call(Cp3, global_group, registered_names, [{node, Cpznn}]),
- % start a proc and register it
+ %% start a proc and register it
?line {Pid2, yes} = rpc:call(Cp2, ?MODULE, start_proc, [test2]),
?line RegNames = lists:sort([test2,test_server]),
@@ -217,7 +217,7 @@ no_gg_proc(Config) when is_list(Config) ->
end,
- % start a proc and register it
+ %% start a proc and register it
?line {PidX, yes} = rpc:call(Cpx, ?MODULE, start_proc, [test]),
@@ -228,7 +228,7 @@ no_gg_proc(Config) when is_list(Config) ->
?line PidX = rpc:call(Cpx, global_group, send, [{node, Cpxnn}, test, monitor]),
- % Kill node Cp1
+ %% Kill node Cp1
?line Pid2 =
rpc:call(Cp2, global_group, send, [{node, Cp2nn}, test2, {wait_nodedown, Cp1}]),
?line PidX =
@@ -240,7 +240,7 @@ no_gg_proc(Config) when is_list(Config) ->
?line ok = assert_loop(Cp2, Cp2nn, test2, Pid2, loop),
?line ok = assert_loop(Cpx, Cpxnn, test, PidX, loop),
- % Kill node Cpz
+ %% Kill node Cpz
?line Pid2 =
rpc:call(Cp2, global_group, send, [{node, Cp2nn}, test2, {wait_nodedown, Cpz}]),
?line PidX =
@@ -252,7 +252,7 @@ no_gg_proc(Config) when is_list(Config) ->
?line ok = assert_loop(Cp2, Cp2nn, test2, Pid2, loop),
?line ok = assert_loop(Cpx, Cpxnn, test, PidX, loop),
- % Restart node Cp1
+ %% Restart node Cp1
?line Pid2 =
rpc:call(Cp2, global_group, send, [{node, Cp2nn}, test2, {wait_nodeup, Cp1}]),
?line PidX =
@@ -265,7 +265,7 @@ no_gg_proc(Config) when is_list(Config) ->
?line ok = assert_loop(Cp2, Cp2nn, test2, Pid2, loop),
?line ok = assert_loop(Cpx, Cpxnn, test, PidX, loop),
- % Restart node Cpz
+ %% Restart node Cpz
?line Pid2 =
rpc:call(Cp2, global_group, send, [{node, Cp2nn}, test2, {wait_nodeup, Cpz}]),
?line PidX =
@@ -278,7 +278,7 @@ no_gg_proc(Config) when is_list(Config) ->
?line ok = assert_loop(Cp2, Cp2nn, test2, Pid2, loop),
?line ok = assert_loop(Cpx, Cpxnn, test, PidX, loop),
- % stop the nodes, and make sure names are released.
+ %% stop the nodes, and make sure names are released.
stop_node(Cp1),
stop_node(Cp2),
stop_node(Cp3),
@@ -334,7 +334,7 @@ no_gg_proc_sync(Config) when is_list(Config) ->
?line [test_server] = rpc:call(Cp3, global_group, registered_names, [{node, Cpznn}]),
- % start a proc and register it
+ %% start a proc and register it
?line {Pid2, yes} = rpc:call(Cp2, ?MODULE, start_proc, [test2]),
?line RegNames = lists:sort([test2,test_server]),
@@ -387,7 +387,7 @@ no_gg_proc_sync(Config) when is_list(Config) ->
end,
- % start a proc and register it
+ %% start a proc and register it
?line {PidX, yes} = rpc:call(Cpx, ?MODULE, start_proc, [test]),
@@ -398,7 +398,7 @@ no_gg_proc_sync(Config) when is_list(Config) ->
?line PidX = rpc:call(Cpx, global_group, send, [{node, Cpxnn}, test, monitor]),
- % Kill node Cp1
+ %% Kill node Cp1
?line Pid2 =
rpc:call(Cp2, global_group, send, [{node, Cp2nn}, test2, {wait_nodedown, Cp1}]),
?line PidX =
@@ -410,7 +410,7 @@ no_gg_proc_sync(Config) when is_list(Config) ->
?line ok = assert_loop(Cp2, Cp2nn, test2, Pid2, loop),
?line ok = assert_loop(Cpx, Cpxnn, test, PidX, loop),
- % Kill node Cpz
+ %% Kill node Cpz
?line Pid2 =
rpc:call(Cp2, global_group, send, [{node, Cp2nn}, test2, {wait_nodedown, Cpz}]),
?line PidX =
@@ -422,7 +422,7 @@ no_gg_proc_sync(Config) when is_list(Config) ->
?line ok = assert_loop(Cp2, Cp2nn, test2, Pid2, loop),
?line ok = assert_loop(Cpx, Cpxnn, test, PidX, loop),
- % Restart node Cp1
+ %% Restart node Cp1
?line Pid2 =
rpc:call(Cp2, global_group, send, [{node, Cp2nn}, test2, {wait_nodeup, Cp1}]),
?line PidX =
@@ -435,7 +435,7 @@ no_gg_proc_sync(Config) when is_list(Config) ->
?line ok = assert_loop(Cp2, Cp2nn, test2, Pid2, loop),
?line ok = assert_loop(Cpx, Cpxnn, test, PidX, loop),
- % Restart node Cpz
+ %% Restart node Cpz
?line Pid2 =
rpc:call(Cp2, global_group, send, [{node, Cp2nn}, test2, {wait_nodeup, Cpz}]),
?line PidX =
@@ -448,7 +448,7 @@ no_gg_proc_sync(Config) when is_list(Config) ->
?line ok = assert_loop(Cp2, Cp2nn, test2, Pid2, loop),
?line ok = assert_loop(Cpx, Cpxnn, test, PidX, loop),
- % stop the nodes, and make sure names are released.
+ %% stop the nodes, and make sure names are released.
stop_node(Cp1),
stop_node(Cp2),
stop_node(Cp3),
@@ -503,7 +503,7 @@ compatible(Config) when is_list(Config) ->
?line [test_server] = rpc:call(Cp3, global_group, registered_names, [{node, Cpznn}]),
- % start a proc and register it
+ %% start a proc and register it
?line {Pid2, yes} = rpc:call(Cp2, ?MODULE, start_proc, [test2]),
?line RegNames = lists:sort([test2,test_server]),
@@ -556,7 +556,7 @@ compatible(Config) when is_list(Config) ->
end,
- % start a proc and register it
+ %% start a proc and register it
?line {PidX, yes} = rpc:call(Cpx, ?MODULE, start_proc, [test]),
@@ -567,7 +567,7 @@ compatible(Config) when is_list(Config) ->
?line PidX = rpc:call(Cpx, global_group, send, [{node, Cpxnn}, test, monitor]),
- % Kill node Cp1
+ %% Kill node Cp1
?line Pid2 =
rpc:call(Cp2, global_group, send, [{node, Cp2nn}, test2, {wait_nodedown, Cp1}]),
?line PidX =
@@ -579,7 +579,7 @@ compatible(Config) when is_list(Config) ->
?line ok = assert_loop(Cp2, Cp2nn, test2, Pid2, loop),
?line ok = assert_loop(Cpx, Cpxnn, test, PidX, loop),
- % Kill node Cpz
+ %% Kill node Cpz
?line Pid2 =
rpc:call(Cp2, global_group, send, [{node, Cp2nn}, test2, {wait_nodedown, Cpz}]),
?line PidX =
@@ -591,7 +591,7 @@ compatible(Config) when is_list(Config) ->
?line ok = assert_loop(Cp2, Cp2nn, test2, Pid2, loop),
?line ok = assert_loop(Cpx, Cpxnn, test, PidX, loop),
- % Restart node Cp1
+ %% Restart node Cp1
?line Pid2 =
rpc:call(Cp2, global_group, send, [{node, Cp2nn}, test2, {wait_nodeup, Cp1}]),
?line PidX =
@@ -604,7 +604,7 @@ compatible(Config) when is_list(Config) ->
?line ok = assert_loop(Cp2, Cp2nn, test2, Pid2, loop),
?line ok = assert_loop(Cpx, Cpxnn, test, PidX, loop),
- % Restart node Cpz
+ %% Restart node Cpz
?line Pid2 =
rpc:call(Cp2, global_group, send, [{node, Cp2nn}, test2, {wait_nodeup, Cpz}]),
?line PidX =
@@ -617,7 +617,7 @@ compatible(Config) when is_list(Config) ->
?line ok = assert_loop(Cp2, Cp2nn, test2, Pid2, loop),
?line ok = assert_loop(Cpx, Cpxnn, test, PidX, loop),
- % stop the nodes, and make sure names are released.
+ %% stop the nodes, and make sure names are released.
stop_node(Cp1),
stop_node(Cp2),
stop_node(Cp3),
@@ -643,21 +643,21 @@ one_grp(Config) when is_list(Config) ->
?line {ok, Cp2} = start_node(Ncp2, Config),
?line {ok, Cp3} = start_node(Ncp3, Config),
- % sleep a while to make the global_group to sync...
+ %% sleep a while to make the global_group to sync...
ct:sleep(1000),
- % start a proc and register it
+ %% start a proc and register it
?line {Pid, yes} = rpc:call(Cp1, ?MODULE, start_proc, [test]),
- % test that it is registered at all nodes
+ %% test that it is registered at all nodes
?line Pid = rpc:call(Cp1, global, whereis_name, [test]),
?line Pid = rpc:call(Cp2, global, whereis_name, [test]),
?line Pid = rpc:call(Cp3, global, whereis_name, [test]),
- % try to register the same name
+ %% try to register the same name
?line no = rpc:call(Cp1, global, register_name, [test, self()]),
- % let process exit, check that it is unregistered automatically
+ %% let process exit, check that it is unregistered automatically
Pid ! die,
?line
?UNTIL(begin
@@ -666,13 +666,13 @@ one_grp(Config) when is_list(Config) ->
(undefined =:= rpc:call(Cp3, global, whereis_name, [test]))
end),
- % test re_register
+ %% test re_register
?line {Pid2, yes} = rpc:call(Cp1, ?MODULE, start_proc, [test]),
?line Pid2 = rpc:call(Cp3, global, whereis_name, [test]),
Pid3 = rpc:call(Cp3, ?MODULE, start_proc_rereg, [test]),
?line Pid3 = rpc:call(Cp3, global, whereis_name, [test]),
- % test sending
+ %% test sending
rpc:call(Cp1, global, send, [test, {ping, self()}]),
receive
{pong, Cp3} -> ok
@@ -695,10 +695,10 @@ one_grp(Config) when is_list(Config) ->
Pid3 ! die,
?line ?UNTIL(undefined =:= rpc:call(Cp3, global, whereis_name, [test])),
- % register a proc
+ %% register a proc
?line {_, yes} = rpc:call(Cp3, ?MODULE, start_proc, [test]),
- % stop the nodes, and make sure names are released.
+ %% stop the nodes, and make sure names are released.
stop_node(Cp3),
?line ?UNTIL(undefined =:= rpc:call(Cp1, global, whereis_name, [test])),
@@ -723,30 +723,30 @@ one_grp_x(Config) when is_list(Config) ->
?line config(Fd, Ncp1, Ncp2, Ncp3, "cpx", "cpy", "cpz", "cpq"),
?line {ok, Cp1} = start_node(Ncp1, Config),
- % sleep a while to make the global_group to sync...
+ %% sleep a while to make the global_group to sync...
ct:sleep(1000),
- % start a proc and register it
+ %% start a proc and register it
?line {Pid, yes} = rpc:call(Cp1, ?MODULE, start_proc, [test]),
?line {ok, Cp2} = start_node(Ncp2, Config),
- % sleep a while to make the global_group to sync...
+ %% sleep a while to make the global_group to sync...
ct:sleep(1000),
- % test that it is registered at all nodes
+ %% test that it is registered at all nodes
?line Pid = rpc:call(Cp1, global, whereis_name, [test]),
?line Pid = rpc:call(Cp2, global, whereis_name, [test]),
?line {ok, Cp3} = start_node(Ncp3, Config),
- % sleep a while to make the global_group to sync...
+ %% sleep a while to make the global_group to sync...
ct:sleep(1000),
?line Pid = rpc:call(Cp3, global, whereis_name, [test]),
- % try to register the same name
+ %% try to register the same name
?line no = rpc:call(Cp1, global, register_name, [test, self()]),
- % let process exit, check that it is unregistered automatically
+ %% let process exit, check that it is unregistered automatically
Pid ! die,
?line
?UNTIL(begin
@@ -755,7 +755,7 @@ one_grp_x(Config) when is_list(Config) ->
(undefined =:= rpc:call(Cp3, global, whereis_name, [test]))
end),
- % test re_register
+ %% test re_register
?line {Pid2, yes} = rpc:call(Cp1, ?MODULE, start_proc, [test]),
?line Pid2 = rpc:call(Cp3, global, whereis_name, [test]),
@@ -799,10 +799,10 @@ two_grp(Config) when is_list(Config) ->
%% The groups (cpq not started):
%% [{nc1, [cp1,cp2,cp3]}, {nc2, [cpx,cpy,cpz]}, {nc3, [cpq]}]
- % sleep a while to make the global_groups to sync...
+ %% sleep a while to make the global_groups to sync...
ct:sleep(1000),
- % check the global group names
+ %% check the global group names
?line {nc1, [nc2, nc3]} = rpc:call(Cp1, global_group, global_groups, []),
?line {nc1, [nc2, nc3]} = rpc:call(Cp2, global_group, global_groups, []),
?line {nc1, [nc2, nc3]} = rpc:call(Cp3, global_group, global_groups, []),
@@ -810,7 +810,7 @@ two_grp(Config) when is_list(Config) ->
?line {nc2, [nc1, nc3]} = rpc:call(Cpy, global_group, global_groups, []),
?line {nc2, [nc1, nc3]} = rpc:call(Cpz, global_group, global_groups, []),
- % check the global group nodes
+ %% check the global group nodes
?line [Cp1nn, Cp2nn, Cp3nn] = rpc:call(Cp1, global_group, own_nodes, []),
?line [Cp1nn, Cp2nn, Cp3nn] = rpc:call(Cp2, global_group, own_nodes, []),
?line [Cp1nn, Cp2nn, Cp3nn] = rpc:call(Cp3, global_group, own_nodes, []),
@@ -819,7 +819,7 @@ two_grp(Config) when is_list(Config) ->
?line [Cpxnn, Cpynn, Cpznn] = rpc:call(Cpz, global_group, own_nodes, []),
- % start a proc and register it
+ %% start a proc and register it
?line {Pid1, yes} = rpc:call(Cp1, ?MODULE, start_proc, [test]),
?line Pid1 = rpc:call(Cp1, global_group, send, [test, {io, from_cp1}]),
@@ -841,7 +841,7 @@ two_grp(Config) when is_list(Config) ->
- % test that it is registered at all nodes
+ %% test that it is registered at all nodes
?line Pid1 = rpc:call(Cp1, global, whereis_name, [test]),
?line Pid1 = rpc:call(Cp2, global, whereis_name, [test]),
?line Pid1 = rpc:call(Cp3, global, whereis_name, [test]),
@@ -849,10 +849,10 @@ two_grp(Config) when is_list(Config) ->
?line undefined = rpc:call(Cpy, global, whereis_name, [test]),
?line undefined = rpc:call(Cpz, global, whereis_name, [test]),
- % start a proc and register it
+ %% start a proc and register it
?line {PidX, yes} = rpc:call(Cpx, ?MODULE, start_proc, [test]),
- % test that it is registered at all nodes
+ %% test that it is registered at all nodes
?line Pid1 = rpc:call(Cp1, global, whereis_name, [test]),
?line Pid1 = rpc:call(Cp2, global, whereis_name, [test]),
?line Pid1 = rpc:call(Cp3, global, whereis_name, [test]),
@@ -870,10 +870,10 @@ two_grp(Config) when is_list(Config) ->
undefined =:= Pid
end),
- % start a proc and register it
+ %% start a proc and register it
?line {Pid2, yes} = rpc:call(Cp2, ?MODULE, start_proc, [test2]),
- % test that it is registered at all nodes
+ %% test that it is registered at all nodes
?line Pid2 = rpc:call(Cp1, global, whereis_name, [test2]),
?line Pid2 = rpc:call(Cp2, global, whereis_name, [test2]),
?line Pid2 = rpc:call(Cp3, global, whereis_name, [test2]),
@@ -995,7 +995,7 @@ two_grp(Config) when is_list(Config) ->
rpc:call(Cpx, global_group, send, [{node, Cpxnn}, test, monitor]),
- % Kill node Cp1
+ %% Kill node Cp1
?line Pid2 = rpc:call(Cp2, global_group, send, [{node, Cp2nn}, test2,
{wait_nodedown, Cp1}]),
?line PidX = rpc:call(Cpx, global_group, send, [{node, Cpxnn}, test,
@@ -1009,7 +1009,7 @@ two_grp(Config) when is_list(Config) ->
?line PidX =
rpc:call(Cpx, global_group, send, [{node, Cpxnn}, test, to_loop]),
- % Kill node Cpz
+ %% Kill node Cpz
?line Pid2 = rpc:call(Cp2, global_group, send, [{node, Cp2nn}, test2,
{wait_nodedown, Cpz}]),
?line PidX = rpc:call(Cpx, global_group, send, [{node, Cpxnn}, test,
@@ -1023,7 +1023,7 @@ two_grp(Config) when is_list(Config) ->
?line Pid2 =
rpc:call(Cp2, global_group, send, [{node, Cp2nn}, test2, to_loop]),
- % Restart node Cp1
+ %% Restart node Cp1
?line [Cp1nn, Cp2nn, Cp3nn] = rpc:call(Cp2, global_group, own_nodes, []),
?line Pid2 = rpc:call(Cp2, global_group, send, [{node, Cp2nn}, test2,
{wait_nodeup, Cp1}]),
@@ -1039,7 +1039,7 @@ two_grp(Config) when is_list(Config) ->
rpc:call(Cpx, global_group, send, [{node, Cpxnn}, test, to_loop]),
- % Restart node Cpz
+ %% Restart node Cpz
?line Pid2 = rpc:call(Cp2, global_group, send, [{node, Cp2nn}, test2,
{wait_nodeup, Cpz}]),
?line PidX = rpc:call(Cpx, global_group, send, [{node, Cpxnn}, test,
@@ -1086,10 +1086,10 @@ hidden_groups(Config) when is_list(Config) ->
?line {ok, Cpz} = start_node(Ncpz, Config),
?line {ok, Cpq} = start_node(Ncpq, Config),
- % sleep a while to make the global_groups to sync...
+ %% sleep a while to make the global_groups to sync...
ct:sleep(1000),
- % check the global group names
+ %% check the global group names
?line {nc1, [nc2, nc3]} = rpc:call(Cp1, global_group, global_groups, []),
?line {nc1, [nc2, nc3]} = rpc:call(Cp2, global_group, global_groups, []),
?line {nc1, [nc2, nc3]} = rpc:call(Cp3, global_group, global_groups, []),
@@ -1097,7 +1097,7 @@ hidden_groups(Config) when is_list(Config) ->
?line {nc2, [nc1, nc3]} = rpc:call(Cpy, global_group, global_groups, []),
?line {nc2, [nc1, nc3]} = rpc:call(Cpz, global_group, global_groups, []),
- % check the global group nodes
+ %% check the global group nodes
?line [Cp1, Cp2, Cp3] = rpc:call(Cp1, global_group, own_nodes, []),
?line [Cp1, Cp2, Cp3] = rpc:call(Cp2, global_group, own_nodes, []),
?line [Cp1, Cp2, Cp3] = rpc:call(Cp3, global_group, own_nodes, []),
@@ -1106,7 +1106,7 @@ hidden_groups(Config) when is_list(Config) ->
?line [Cpx, Cpy, Cpz] = rpc:call(Cpz, global_group, own_nodes, []),
?line [Cpq] = rpc:call(Cpq, global_group, own_nodes, []),
- % Make some inter group connections
+ %% Make some inter group connections
?line pong = rpc:call(Cp1, net_adm, ping, [Cpx]),
?line pong = rpc:call(Cpy, net_adm, ping, [Cp2]),
?line pong = rpc:call(Cp3, net_adm, ping, [Cpx]),
@@ -1114,7 +1114,7 @@ hidden_groups(Config) when is_list(Config) ->
?line pong = rpc:call(Cpq, net_adm, ping, [Cp1]),
?line pong = rpc:call(Cpz, net_adm, ping, [Cpq]),
- % Check that no inter group connections are visible
+ %% Check that no inter group connections are visible
NC1Nodes = lists:sort([Cp1, Cp2, Cp3]),
NC2Nodes = lists:sort([Cpx, Cpy, Cpz]),
?line NC1Nodes = lists:sort([Cp1|rpc:call(Cp1, erlang, nodes, [])]),
@@ -1156,12 +1156,12 @@ test_exit(Config) when is_list(Config) ->
rpc:call(Cp1, global_group, send, [king, "The message"]),
?line undefined = rpc:call(Cp1, global_group, whereis_name, [king]),
- % stop the nodes, and make sure names are released.
+ %% stop the nodes, and make sure names are released.
stop_node(Cp1),
stop_node(Cp2),
stop_node(Cp3),
- % sleep to let the nodes die
+ %% sleep to let the nodes die
ct:sleep(1000),
ok.
diff --git a/lib/kernel/test/inet_sockopt_SUITE.erl b/lib/kernel/test/inet_sockopt_SUITE.erl
index 154cd3a89f..a413ea7dbe 100644
--- a/lib/kernel/test/inet_sockopt_SUITE.erl
+++ b/lib/kernel/test/inet_sockopt_SUITE.erl
@@ -342,8 +342,8 @@ do_large_raw(Config,Binary) when is_list(Config) ->
true ->
?line {Sock1,Sock2} = create_socketpair([{linger,{true,10}}],
[{linger,{false,0}}]),
- ?line LargeSize = 1024, % Solaris can take up to 1024*9,
- % linux 1024*63...
+ ?line LargeSize = 1024, % Solaris can take up to 1024*9,
+ % linux 1024*63...
?line TooLargeSize = 1024*64,
?line {ok,[{raw,Proto,Linger,Linger1}]} =
inet:getopts(Sock1,[{raw,Proto,Linger,
@@ -822,7 +822,7 @@ make_check_fun(Type,Element) ->
NewAcc
end.
-% {OptionName,Value1,Value2,Mandatory,Changeable}
+%% {OptionName,Value1,Value2,Mandatory,Changeable}
all_listen_options() ->
[{tos,0,1,false,true},
{priority,0,1,false,true},
diff --git a/lib/kernel/test/interactive_shell_SUITE.erl b/lib/kernel/test/interactive_shell_SUITE.erl
index 7e724bb35e..fa5976e184 100644
--- a/lib/kernel/test/interactive_shell_SUITE.erl
+++ b/lib/kernel/test/interactive_shell_SUITE.erl
@@ -65,7 +65,7 @@ end_per_group(_GroupName, Config) ->
Config.
-%-define(DEBUG,1).
+%%-define(DEBUG,1).
-ifdef(DEBUG).
-define(dbg(Data),erlang:display(Data)).
-else.
@@ -97,7 +97,7 @@ get_columns_and_rows(Config) when is_list(Config) ->
[],
"stty rows 40; stty columns 90; ");
new ->
- % New shell tests
+ %% New shell tests
?dbg(new_shell),
?line rtnode([{putline,""},
{putline, "2."},
@@ -558,7 +558,7 @@ create_tempdir(Dir,X) when X > $z ->
[Dir++[$z]])),
{error, Estr};
create_tempdir(Dir0, Ch) ->
- % Expect fairly standard unix.
+ %% Expect fairly standard unix.
Dir = Dir0++[Ch],
case file:make_dir(Dir) of
{error, eexist} ->
diff --git a/lib/kernel/test/kernel_SUITE.erl b/lib/kernel/test/kernel_SUITE.erl
index 8619385478..e02aa2aa8d 100644
--- a/lib/kernel/test/kernel_SUITE.erl
+++ b/lib/kernel/test/kernel_SUITE.erl
@@ -24,12 +24,12 @@
-include_lib("common_test/include/ct.hrl").
-% Test server specific exports
+%% Test server specific exports
-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1,
init_per_group/2,end_per_group/2]).
-export([init_per_testcase/2, end_per_testcase/2]).
-% Test cases must be exported.
+%% Test cases must be exported.
-export([app_test/1, appup_test/1]).
suite() ->
@@ -60,9 +60,9 @@ init_per_testcase(_Case, Config) ->
end_per_testcase(_Case, _Config) ->
ok.
-%
-% Test cases starts here.
-%
+%%
+%% Test cases starts here.
+%%
%% Tests the applications consistency.
app_test(Config) when is_list(Config) ->
ok=test_server:app_test(kernel),
diff --git a/lib/kernel/test/kernel_config_SUITE.erl b/lib/kernel/test/kernel_config_SUITE.erl
index a227c37cc8..7a50f51ce0 100644
--- a/lib/kernel/test/kernel_config_SUITE.erl
+++ b/lib/kernel/test/kernel_config_SUITE.erl
@@ -66,7 +66,7 @@ from(_, []) -> [].
%% erl -sname XXX where XX not in [cp1, cp2]
%%-----------------------------------------------------------------
sync(Conf) when is_list(Conf) ->
- % Write a config file
+ %% Write a config file
Dir = proplists:get_value(priv_dir,Conf),
{ok, Fd} = file:open(Dir ++ "sys.config", [write]),
config(Fd),
diff --git a/lib/kernel/test/pdict_SUITE.erl b/lib/kernel/test/pdict_SUITE.erl
index 61551a3acf..a89fdf4797 100644
--- a/lib/kernel/test/pdict_SUITE.erl
+++ b/lib/kernel/test/pdict_SUITE.erl
@@ -18,7 +18,6 @@
%% %CopyrightEnd%
%%
-module(pdict_SUITE).
-%% NB: The ?line macro cannot be used when testing the dictionary.
-include_lib("common_test/include/ct.hrl").
diff --git a/lib/kernel/test/pg2_SUITE.erl b/lib/kernel/test/pg2_SUITE.erl
index 636ff7598d..0db772c2b2 100644
--- a/lib/kernel/test/pg2_SUITE.erl
+++ b/lib/kernel/test/pg2_SUITE.erl
@@ -101,11 +101,11 @@ otp_8653(Config) when is_list(Config) ->
?line wait_for_ready_net(Config),
- % make b and c connected, partitioned from node() and a
+ %% make b and c connected, partitioned from node() and a
?line rpc_cast(B, ?MODULE, part2, [Config, node(), A, C]),
?line ?UNTIL(is_ready_partition(Config)),
- % Connect to the other partition.
+ %% Connect to the other partition.
?line pong = net_adm:ping(B),
timer:sleep(100),
?line pong = net_adm:ping(C),
@@ -155,18 +155,18 @@ otp_8259(Config) when is_list(Config) ->
G = pg2_otp_8259,
Name = otp_8259_a_global_name,
- % start different processes in both partitions
+ %% start different processes in both partitions
?line {Pid, yes} = rpc:call(A, ?MODULE, start_proc, [Name]),
?line ok = pg2:create(G),
?line ok = pg2:join(G, Pid),
- % make b and c connected, partitioned from node() and a
+ %% make b and c connected, partitioned from node() and a
?line rpc_cast(B, ?MODULE, part1, [Config, node(), A, C, Name]),
?line ?UNTIL(is_ready_partition(Config)),
- % Connect to the other partition.
- % The resolver on node b will be called.
+ %% Connect to the other partition.
+ %% The resolver on node b will be called.
?line pong = net_adm:ping(B),
timer:sleep(100),
?line pong = net_adm:ping(C),
diff --git a/lib/kernel/test/prim_file_SUITE.erl b/lib/kernel/test/prim_file_SUITE.erl
index 5cef61e7cc..c331865adf 100644
--- a/lib/kernel/test/prim_file_SUITE.erl
+++ b/lib/kernel/test/prim_file_SUITE.erl
@@ -213,11 +213,11 @@ read_write_file(Config) when is_list(Config) ->
?line {error, enoent} = ?PRIM_FILE:read_file(Name2),
?line {error, enoent} = ?PRIM_FILE:read_file(""),
- % Try writing to a bad filename
+ %% Try writing to a bad filename
?line {error, enoent} =
?PRIM_FILE:write_file("",term_to_binary(NullTerm)),
- % Try writing something else than a binary
+ %% Try writing something else than a binary
?line {error, badarg} = ?PRIM_FILE:write_file(Name,{1,2,3}),
?line {error, badarg} = ?PRIM_FILE:write_file(Name,self()),
@@ -256,9 +256,9 @@ make_del_dir(Config, Handle, Suffix) ->
?line ok = ?PRIM_FILE_call(del_dir, Handle, [NewDir]),
?line {error, enoent} = ?PRIM_FILE_call(del_dir, Handle, [NewDir]),
- % Make sure we are not in a directory directly under test_server
- % as that would result in eacces errors when trying to delete '..',
- % because there are processes having that directory as current.
+ %% Make sure we are not in a directory directly under test_server
+ %% as that would result in eacces errors when trying to delete '..',
+ %% because there are processes having that directory as current.
?line ok = ?PRIM_FILE_call(make_dir, Handle, [NewDir]),
?line {ok, CurrentDir} = ?PRIM_FILE_call(get_cwd, Handle, []),
case {os:type(), length(NewDir) >= 260 } of
@@ -1023,8 +1023,8 @@ file_write_file_info_opts(Config) when is_list(Config) ->
Time <- [ 0,1,-1,100,-100,1000,-1000,10000,-10000 ]
]),
- % REM: determine date range dependent on time_t = Uint32 | Sint32 | Sint64
- % Determine time_t on os:type()?
+ %% REM: determine date range dependent on time_t = Uint32 | Sint32 | Sint64
+ %% Determine time_t on os:type()?
lists:foreach(fun
({FI, Opts}) ->
ok = ?PRIM_FILE_call(write_file_info, Handle, [Name, FI, Opts])
@@ -1294,26 +1294,26 @@ allocate(Config) when is_list(Config) ->
ok.
allocate_and_assert(Fd, Offset, Length) ->
- % Just verify that calls to ?PRIM_FILE:allocate/3 don't crash or have
- % any other negative side effect. We can't really asssert against a
- % specific return value, because support for file space pre-allocation
- % depends on the OS, OS version and underlying filesystem.
- %
- % The Linux kernel added support for fallocate() in version 2.6.23,
- % which currently works only for the ext4, ocfs2, xfs and btrfs file
- % systems. posix_fallocate() is available in glibc as of version
- % 2.1.94, but it was buggy until glibc version 2.7.
- %
- % Mac OS X, as of version 10.3, supports the fcntl operation F_PREALLOCATE.
- %
- % Solaris supports posix_fallocate() but only for the UFS file system
- % apparently (not supported for ZFS).
- %
- % FreeBSD 9.0 is the first FreeBSD release supporting posix_fallocate().
- %
- % For Windows there's apparently no way to pre-allocate file space, at
- % least with similar API/semantics as posix_fallocate(), fallocate() or
- % fcntl F_PREALLOCATE.
+ %% Just verify that calls to ?PRIM_FILE:allocate/3 don't crash or have
+ %% any other negative side effect. We can't really asssert against a
+ %% specific return value, because support for file space pre-allocation
+ %% depends on the OS, OS version and underlying filesystem.
+ %%
+ %% The Linux kernel added support for fallocate() in version 2.6.23,
+ %% which currently works only for the ext4, ocfs2, xfs and btrfs file
+ %% systems. posix_fallocate() is available in glibc as of version
+ %% 2.1.94, but it was buggy until glibc version 2.7.
+ %%
+ %% Mac OS X, as of version 10.3, supports the fcntl operation F_PREALLOCATE.
+ %%
+ %% Solaris supports posix_fallocate() but only for the UFS file system
+ %% apparently (not supported for ZFS).
+ %%
+ %% FreeBSD 9.0 is the first FreeBSD release supporting posix_fallocate().
+ %%
+ %% For Windows there's apparently no way to pre-allocate file space, at
+ %% least with similar API/semantics as posix_fallocate(), fallocate() or
+ %% fcntl F_PREALLOCATE.
Result = ?PRIM_FILE:allocate(Fd, Offset, Length),
case os:type() of
{win32, _} ->
diff --git a/lib/kernel/test/seq_trace_SUITE.erl b/lib/kernel/test/seq_trace_SUITE.erl
index 65a62a5a10..c50eace20d 100644
--- a/lib/kernel/test/seq_trace_SUITE.erl
+++ b/lib/kernel/test/seq_trace_SUITE.erl
@@ -27,12 +27,11 @@
trace_exit/1, distributed_exit/1, call/1, port/1,
match_set_seq_token/1, gc_seq_token/1]).
-% internal exports
+%% internal exports
-export([simple_tracer/2, one_time_receiver/0, one_time_receiver/1,
start_tracer/0, stop_tracer/1,
do_match_set_seq_token/1, do_gc_seq_token/1, countdown_start/2]).
- %-define(line_trace, 1).
-include_lib("common_test/include/ct.hrl").
-define(TIMESTAMP_MODES, [no_timestamp,
@@ -461,7 +460,7 @@ match_set_seq_token(Config) when is_list(Config) ->
%%
%% All the timeout stuff is here to get decent accuracy of the error
%% return value, instead of just 'timeout'.
- %
+ %%
?line {ok, Sandbox} = start_node(seq_trace_other, []),
?line true = rpc:call(Sandbox, code, add_patha,
[filename:dirname(code:which(?MODULE))]),
@@ -606,7 +605,7 @@ gc_seq_token(Config) when is_list(Config) ->
%%
%% All the timeout stuff is here to get decent accuracy of the error
%% return value, instead of just 'timeout'.
- %
+ %%
?line {ok, Sandbox} = start_node(seq_trace_other, []),
?line true = rpc:call(Sandbox, code, add_patha,
[filename:dirname(code:which(?MODULE))]),
diff --git a/lib/kernel/test/wrap_log_reader_SUITE.erl b/lib/kernel/test/wrap_log_reader_SUITE.erl
index db41c14be9..888695b1ec 100644
--- a/lib/kernel/test/wrap_log_reader_SUITE.erl
+++ b/lib/kernel/test/wrap_log_reader_SUITE.erl
@@ -20,7 +20,7 @@
-module(wrap_log_reader_SUITE).
-%-define(debug, true).
+%%-define(debug, true).
-ifdef(debug).
-define(format(S, A), io:format(S, A)).