diff options
author | Björn Gustavsson <[email protected]> | 2016-03-02 06:50:54 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2016-03-10 15:11:00 +0100 |
commit | 0ba20cd6d43e277593b59463d2c2959bb6db0957 (patch) | |
tree | 5c9fac877f54fe9b26622125707f030361af86c1 /lib/kernel/test/rpc_SUITE.erl | |
parent | 3dfdf35c65b8985a3abe21ef83f27cc8e82ba11c (diff) | |
download | otp-0ba20cd6d43e277593b59463d2c2959bb6db0957.tar.gz otp-0ba20cd6d43e277593b59463d2c2959bb6db0957.tar.bz2 otp-0ba20cd6d43e277593b59463d2c2959bb6db0957.zip |
Remove ?line macros
While we are it, also re-ident the files.
Diffstat (limited to 'lib/kernel/test/rpc_SUITE.erl')
-rw-r--r-- | lib/kernel/test/rpc_SUITE.erl | 396 |
1 files changed, 198 insertions, 198 deletions
diff --git a/lib/kernel/test/rpc_SUITE.erl b/lib/kernel/test/rpc_SUITE.erl index 23bb7613cf..77b85f39e0 100644 --- a/lib/kernel/test/rpc_SUITE.erl +++ b/lib/kernel/test/rpc_SUITE.erl @@ -59,23 +59,23 @@ end_per_group(_GroupName, Config) -> %% Test different rpc calls. call(Config) when is_list(Config) -> - ?line PA = filename:dirname(code:which(?MODULE)), + PA = filename:dirname(code:which(?MODULE)), %% Note. First part of nodename sets response delay in seconds {ok, N1} = test_server:start_node('3_rpc_SUITE_call', slave, - [{args, "-pa " ++ PA}]), + [{args, "-pa " ++ PA}]), {ok, N2} = test_server:start_node('1_rcp_SUITE_call', slave, - [{args, "-pa " ++ PA}]), + [{args, "-pa " ++ PA}]), {ok, N3} = test_server:start_node('4_rcp_SUITE_call', slave, - [{args, "-pa " ++ PA}]), + [{args, "-pa " ++ PA}]), {ok, N4} = test_server:start_node('8_rcp_SUITE_call', slave, - [{args, "-pa " ++ PA}]), - ?line ok = io:format("~p~n", [[N1, N2, N3]]), - ?line {hej,_,N1} = rpc:call(N1, ?MODULE, f, []), - ?line {hej,_,N2} = rpc:call(N2, ?MODULE, f, [], 2000), - ?line {badrpc,timeout} = rpc:call(N3, ?MODULE, f, [], 2000), - ?line receive after 6000 -> ok end, - ?line [] = flush([]), - ?line {hej,_,N4} = rpc:call(N4, ?MODULE, f, []), + [{args, "-pa " ++ PA}]), + ok = io:format("~p~n", [[N1, N2, N3]]), + {hej,_,N1} = rpc:call(N1, ?MODULE, f, []), + {hej,_,N2} = rpc:call(N2, ?MODULE, f, [], 2000), + {badrpc,timeout} = rpc:call(N3, ?MODULE, f, [], 2000), + receive after 6000 -> ok end, + [] = flush([]), + {hej,_,N4} = rpc:call(N4, ?MODULE, f, []), test_server:stop_node(N1), test_server:stop_node(N2), test_server:stop_node(N3), @@ -84,23 +84,23 @@ call(Config) when is_list(Config) -> %% Test different rpc calls. block_call(Config) when is_list(Config) -> - ?line PA = filename:dirname(code:which(?MODULE)), + PA = filename:dirname(code:which(?MODULE)), %% Note. First part of nodename sets response delay in seconds {ok, N1} = test_server:start_node('3_rpc_SUITE_block_call', slave, - [{args, "-pa " ++ PA}]), + [{args, "-pa " ++ PA}]), {ok, N2} = test_server:start_node('1_rcp_SUITE_block_call', slave, - [{args, "-pa " ++ PA}]), + [{args, "-pa " ++ PA}]), {ok, N3} = test_server:start_node('4_rcp_SUITE_block_call', slave, - [{args, "-pa " ++ PA}]), + [{args, "-pa " ++ PA}]), {ok, N4} = test_server:start_node('8_rcp_SUITE_block_call', slave, - [{args, "-pa " ++ PA}]), - ?line ok = io:format("~p~n", [[N1, N2, N3]]), - ?line {hej,_,N1} = rpc:block_call(N1, ?MODULE, f, []), - ?line {hej,_,N2} = rpc:block_call(N2, ?MODULE, f, [], 2000), - ?line {badrpc,timeout} = rpc:block_call(N3, ?MODULE, f, [], 2000), - ?line receive after 6000 -> ok end, - ?line [] = flush([]), - ?line {hej,_,N4} = rpc:block_call(N4, ?MODULE, f, []), + [{args, "-pa " ++ PA}]), + ok = io:format("~p~n", [[N1, N2, N3]]), + {hej,_,N1} = rpc:block_call(N1, ?MODULE, f, []), + {hej,_,N2} = rpc:block_call(N2, ?MODULE, f, [], 2000), + {badrpc,timeout} = rpc:block_call(N3, ?MODULE, f, [], 2000), + receive after 6000 -> ok end, + [] = flush([]), + {hej,_,N4} = rpc:block_call(N4, ?MODULE, f, []), test_server:stop_node(N1), test_server:stop_node(N2), test_server:stop_node(N3), @@ -110,38 +110,38 @@ block_call(Config) when is_list(Config) -> %% OTP-3449. multicall(Config) when is_list(Config) -> - ?line PA = filename:dirname(code:which(?MODULE)), + PA = filename:dirname(code:which(?MODULE)), %% Note. First part of nodename sets response delay in seconds {ok, N1} = test_server:start_node('3_rpc_SUITE_multicall', slave, - [{args, "-pa " ++ PA}]), + [{args, "-pa " ++ PA}]), {ok, N2} = test_server:start_node('1_rcp_SUITE_multicall', slave, - [{args, "-pa " ++ PA}]), - ?line ok = io:format("~p~n", [[N1, N2]]), - ?line {[{hej,_,N1},{hej,_,N2}],[]} = - rpc:multicall([N1, N2], ?MODULE, f, []), - ?line Msgs = flush([]), - ?line [] = Msgs, + [{args, "-pa " ++ PA}]), + ok = io:format("~p~n", [[N1, N2]]), + {[{hej,_,N1},{hej,_,N2}],[]} = + rpc:multicall([N1, N2], ?MODULE, f, []), + Msgs = flush([]), + [] = Msgs, test_server:stop_node(N1), test_server:stop_node(N2), ok. multicall_timeout(Config) when is_list(Config) -> - ?line PA = filename:dirname(code:which(?MODULE)), + PA = filename:dirname(code:which(?MODULE)), %% Note. First part of nodename sets response delay in seconds {ok, N1} = test_server:start_node('11_rpc_SUITE_multicall', slave, - [{args, "-pa " ++ PA}]), + [{args, "-pa " ++ PA}]), {ok, N2} = test_server:start_node('8_rpc_SUITE_multicall', slave, - [{args, "-pa " ++ PA}]), + [{args, "-pa " ++ PA}]), {ok, N3} = test_server:start_node('5_rpc_SUITE_multicall', slave, - [{args, "-pa " ++ PA}]), + [{args, "-pa " ++ PA}]), {ok, N4} = test_server:start_node('2_rcp_SUITE_multicall', slave, - [{args, "-pa " ++ PA}]), - ?line ok = io:format("~p~n", [[N1, N2]]), + [{args, "-pa " ++ PA}]), + ok = io:format("~p~n", [[N1, N2]]), {[{hej,_,N3},{hej,_,N4}],[N1, N2]} = rpc:multicall([N3, N1, N2, N4], ?MODULE, f, [], 6000), ct:sleep({seconds,8}), %Wait for late answers - ?line Msgs = flush([]), - ?line [] = Msgs, + Msgs = flush([]), + [] = Msgs, test_server:stop_node(N1), test_server:stop_node(N2), test_server:stop_node(N3), @@ -149,38 +149,38 @@ multicall_timeout(Config) when is_list(Config) -> ok. multicall_dies(Config) when is_list(Config) -> - ?line PA = filename:dirname(code:which(?MODULE)), + PA = filename:dirname(code:which(?MODULE)), {ok, N1} = test_server:start_node('rpc_SUITE_multicall_dies_1', slave, - [{args, "-pa " ++ PA}]), + [{args, "-pa " ++ PA}]), {ok, N2} = test_server:start_node('rcp_SUITE_multicall_dies_2', slave, - [{args, "-pa " ++ PA}]), - ?line Nodes = [N1, N2], + [{args, "-pa " ++ PA}]), + Nodes = [N1, N2], %% - ?line {[{badrpc, {'EXIT', normal}}, {badrpc, {'EXIT', normal}}], []} = + {[{badrpc, {'EXIT', normal}}, {badrpc, {'EXIT', normal}}], []} = do_multicall(Nodes, erlang, exit, [normal]), - ?line {[{badrpc, {'EXIT', abnormal}}, {badrpc, {'EXIT', abnormal}}], []} = + {[{badrpc, {'EXIT', abnormal}}, {badrpc, {'EXIT', abnormal}}], []} = do_multicall(Nodes, erlang, exit, [abnormal]), - ?line {[{badrpc, {'EXIT', {badarith, _}}}, - {badrpc, {'EXIT', {badarith, _}}}], - []} = + {[{badrpc, {'EXIT', {badarith, _}}}, + {badrpc, {'EXIT', {badarith, _}}}], + []} = do_multicall(Nodes, erlang, 'div', [1, 0]), - ?line {[{badrpc, {'EXIT', {badarg, _}}}, - {badrpc, {'EXIT', {badarg, _}}}], - []} = + {[{badrpc, {'EXIT', {badarg, _}}}, + {badrpc, {'EXIT', {badarg, _}}}], + []} = do_multicall(Nodes, erlang, atom_to_list, [1]), - ?line {[{badrpc, {'EXIT', {undef, _}}}, - {badrpc, {'EXIT', {undef, _}}}], - []} = + {[{badrpc, {'EXIT', {undef, _}}}, + {badrpc, {'EXIT', {undef, _}}}], + []} = do_multicall(Nodes, ?MODULE, suicide, []), - ?line {[timeout, timeout], []} = + {[timeout, timeout], []} = do_multicall(Nodes, ?MODULE, suicide, [link, normal]), - ?line {[{badrpc, {'EXIT', abnormal}}, {badrpc, {'EXIT', abnormal}}], []} = + {[{badrpc, {'EXIT', abnormal}}, {badrpc, {'EXIT', abnormal}}], []} = do_multicall(Nodes, ?MODULE, suicide, [link, abnormal]), - ?line {[timeout, timeout], []} = + {[timeout, timeout], []} = do_multicall(Nodes, ?MODULE, suicide, [exit, normal]), - ?line {[{badrpc, {'EXIT', abnormal}}, {badrpc, {'EXIT', abnormal}}], []} = + {[{badrpc, {'EXIT', abnormal}}, {badrpc, {'EXIT', abnormal}}], []} = do_multicall(Nodes, ?MODULE, suicide, [exit, abnormal]), - ?line {[{badrpc, {'EXIT', killed}}, {badrpc, {'EXIT', killed}}], []} = + {[{badrpc, {'EXIT', killed}}, {badrpc, {'EXIT', killed}}], []} = do_multicall(Nodes, ?MODULE, suicide, [exit, kill]), %% test_server:stop_node(N1), @@ -188,10 +188,10 @@ multicall_dies(Config) when is_list(Config) -> ok. do_multicall(Nodes, Mod, Func, Args) -> - ?line ok = io:format("~p:~p~p~n", [Mod, Func, Args]), - ?line Result = rpc:multicall(Nodes, Mod, Func, Args), - ?line Msgs = flush([]), - ?line [] = Msgs, + ok = io:format("~p:~p~p~n", [Mod, Func, Args]), + Result = rpc:multicall(Nodes, Mod, Func, Args), + Msgs = flush([]), + [] = Msgs, Result. @@ -203,105 +203,105 @@ multicall_node_dies(Config) when is_list(Config) -> ok. do_multicall_2_nodes_dies(Mod, Func, Args) -> - ?line ok = io:format("~p:~p~p~n", [Mod, Func, Args]), - ?line PA = filename:dirname(code:which(?MODULE)), + ok = io:format("~p:~p~p~n", [Mod, Func, Args]), + PA = filename:dirname(code:which(?MODULE)), {ok, N1} = test_server:start_node('rpc_SUITE_multicall_node_dies_1', slave, - [{args, "-pa " ++ PA}]), + [{args, "-pa " ++ PA}]), {ok, N2} = test_server:start_node('rcp_SUITE_multicall_node_dies_2', slave, - [{args, "-pa " ++ PA}]), - ?line Nodes = [N1, N2], - ?line {[], Nodes} = rpc:multicall(Nodes, Mod, Func, Args), - ?line Msgs = flush([]), - ?line [] = Msgs, + [{args, "-pa " ++ PA}]), + Nodes = [N1, N2], + {[], Nodes} = rpc:multicall(Nodes, Mod, Func, Args), + Msgs = flush([]), + [] = Msgs, ok. %% OTP-3766. called_dies(Config) when is_list(Config) -> - ?line PA = filename:dirname(code:which(?MODULE)), + PA = filename:dirname(code:which(?MODULE)), {ok, N} = test_server:start_node(rpc_SUITE_called_dies, slave, - [{args, "-pa " ++ PA}]), + [{args, "-pa " ++ PA}]), %% - ?line rep(fun (Tag, Call, Args) -> - {Tag,{badrpc,{'EXIT',normal}}} = - {Tag,apply(rpc, Call, Args)} - end, N, erlang, exit, [normal]), - ?line rep(fun (Tag, Call, Args) -> - {Tag,{badrpc,{'EXIT',abnormal}}} = - {Tag,apply(rpc, Call, Args)} - end, N, erlang, exit, [abnormal]), - ?line rep(fun (Tag, Call, Args) -> - {Tag,{badrpc,{'EXIT',{badarith,_}}}} = - {Tag,apply(rpc, Call, Args)} - end, N, erlang, 'div', [1,0]), - ?line rep(fun (Tag, Call, Args) -> - {Tag,{badrpc,{'EXIT',{badarg,_}}}} = - {Tag,apply(rpc, Call, Args)} - end, N, erlang, atom_to_list, [1]), - ?line rep(fun (Tag, Call, Args) -> - {Tag,{badrpc,{'EXIT',{undef,_}}}} = - {Tag,apply(rpc, Call, Args)} - end, N, ?MODULE, suicide, []), + rep(fun (Tag, Call, Args) -> + {Tag,{badrpc,{'EXIT',normal}}} = + {Tag,apply(rpc, Call, Args)} + end, N, erlang, exit, [normal]), + rep(fun (Tag, Call, Args) -> + {Tag,{badrpc,{'EXIT',abnormal}}} = + {Tag,apply(rpc, Call, Args)} + end, N, erlang, exit, [abnormal]), + rep(fun (Tag, Call, Args) -> + {Tag,{badrpc,{'EXIT',{badarith,_}}}} = + {Tag,apply(rpc, Call, Args)} + end, N, erlang, 'div', [1,0]), + rep(fun (Tag, Call, Args) -> + {Tag,{badrpc,{'EXIT',{badarg,_}}}} = + {Tag,apply(rpc, Call, Args)} + end, N, erlang, atom_to_list, [1]), + rep(fun (Tag, Call, Args) -> + {Tag,{badrpc,{'EXIT',{undef,_}}}} = + {Tag,apply(rpc, Call, Args)} + end, N, ?MODULE, suicide, []), %% TrapExit = process_flag(trap_exit, true), %% - ?line rep(fun (Tag, Call, Args=[Node|_]) when Node == node() -> - {Tag,timeout} = - {Tag,apply(rpc, Call, Args)}, - {Tag,flush,[{'EXIT',_,normal}]} = - {Tag,flush,flush([])}; - (Tag, Call, Args) -> - {Tag,timeout} = - {Tag,apply(rpc, Call, Args)} - end, N, ?MODULE, suicide, [link,normal]), - ?line rep(fun (Tag, Call, Args=[Node|_]) when Node == node() -> - {Tag,timeout} = - {Tag,apply(rpc, Call, Args)}, - {Tag,flush,[{'EXIT',_,abnormal}]} = - {Tag,flush,flush([])}; - (Tag, block_call, Args) -> - {Tag,timeout} = - {Tag,apply(rpc, block_call, Args)}; - (Tag, Call, Args) -> - {Tag,{badrpc,{'EXIT',abnormal}}} = - {Tag,apply(rpc, Call, Args)} - end, N, ?MODULE, suicide, [link,abnormal]), - ?line rep(fun (Tag, Call, Args=[Node|_]) when Node == node() -> - {Tag,timeout} = - {Tag,apply(rpc, Call, Args)}, - {Tag,flush,[{'EXIT',_,normal}]} = - {Tag,flush,flush([])}; - (Tag, Call, Args) -> - {Tag,timeout} = - {Tag,apply(rpc, Call, Args)} - end, N, ?MODULE, suicide, [exit,normal]), - ?line rep(fun (Tag, Call, Args=[Node|_]) when Node == node() -> - {Tag,timeout} = - {Tag,apply(rpc, Call, Args)}, - {Tag,flush,[{'EXIT',_,abnormal}]} = - {Tag,flush,flush([])}; - (Tag, block_call, Args) -> - {Tag,timeout} = - {Tag,apply(rpc, block_call, Args)}; - (Tag, Call, Args) -> - {Tag,{badrpc,{'EXIT',abnormal}}} = - {Tag,apply(rpc, Call, Args)} - end, N, ?MODULE, suicide, [exit,abnormal]), + rep(fun (Tag, Call, Args=[Node|_]) when Node == node() -> + {Tag,timeout} = + {Tag,apply(rpc, Call, Args)}, + {Tag,flush,[{'EXIT',_,normal}]} = + {Tag,flush,flush([])}; + (Tag, Call, Args) -> + {Tag,timeout} = + {Tag,apply(rpc, Call, Args)} + end, N, ?MODULE, suicide, [link,normal]), + rep(fun (Tag, Call, Args=[Node|_]) when Node == node() -> + {Tag,timeout} = + {Tag,apply(rpc, Call, Args)}, + {Tag,flush,[{'EXIT',_,abnormal}]} = + {Tag,flush,flush([])}; + (Tag, block_call, Args) -> + {Tag,timeout} = + {Tag,apply(rpc, block_call, Args)}; + (Tag, Call, Args) -> + {Tag,{badrpc,{'EXIT',abnormal}}} = + {Tag,apply(rpc, Call, Args)} + end, N, ?MODULE, suicide, [link,abnormal]), + rep(fun (Tag, Call, Args=[Node|_]) when Node == node() -> + {Tag,timeout} = + {Tag,apply(rpc, Call, Args)}, + {Tag,flush,[{'EXIT',_,normal}]} = + {Tag,flush,flush([])}; + (Tag, Call, Args) -> + {Tag,timeout} = + {Tag,apply(rpc, Call, Args)} + end, N, ?MODULE, suicide, [exit,normal]), + rep(fun (Tag, Call, Args=[Node|_]) when Node == node() -> + {Tag,timeout} = + {Tag,apply(rpc, Call, Args)}, + {Tag,flush,[{'EXIT',_,abnormal}]} = + {Tag,flush,flush([])}; + (Tag, block_call, Args) -> + {Tag,timeout} = + {Tag,apply(rpc, block_call, Args)}; + (Tag, Call, Args) -> + {Tag,{badrpc,{'EXIT',abnormal}}} = + {Tag,apply(rpc, Call, Args)} + end, N, ?MODULE, suicide, [exit,abnormal]), %% process_flag(trap_exit, TrapExit), %% - ?line rep(fun %% A local [exit,kill] would kill the test case process - (_Tag, _Call, [Node|_]) when Node == node() -> - ok; - %% A block_call [exit,kill] would kill the rpc server - (_Tag, block_call, _Args) -> ok; - (Tag, Call, Args) -> - {Tag,{badrpc,{'EXIT',killed}}} = - {Tag,apply(rpc, Call, Args)} - end, N, ?MODULE, suicide, [exit,kill]), + rep(fun %% A local [exit,kill] would kill the test case process + (_Tag, _Call, [Node|_]) when Node == node() -> + ok; + %% A block_call [exit,kill] would kill the rpc server + (_Tag, block_call, _Args) -> ok; + (Tag, Call, Args) -> + {Tag,{badrpc,{'EXIT',killed}}} = + {Tag,apply(rpc, Call, Args)} + end, N, ?MODULE, suicide, [exit,kill]), %% - ?line [] = flush([]), + [] = flush([]), test_server:stop_node(N), ok. @@ -317,7 +317,7 @@ rep(Fun, N, M, F, A) -> Fun(9, block_call, [N, M, F, A, infinity]), Fun(10, block_call, [N, M, F, A, 3000]), ok. - + suicide(link, Reason) -> spawn_link( @@ -347,61 +347,61 @@ suicide(Mod, Func, Args) -> called_node_dies(Config) when is_list(Config) -> - ?line PA = filename:dirname(code:which(?MODULE)), + PA = filename:dirname(code:which(?MODULE)), %% - ?line node_rep( - fun (Tag, Call, Args) -> - {Tag,{badrpc,nodedown}} = - {Tag,apply(rpc, Call, Args)} - end, "rpc_SUITE_called_node_dies_1", - PA, ?MODULE, suicide, [erlang,halt,[]]), - ?line node_rep( - fun (Tag, Call, Args) -> - {Tag,{badrpc,nodedown}} = - {Tag,apply(rpc, Call, Args)} - end, "rpc_SUITE_called_node_dies_2", - PA, ?MODULE, suicide, [init,stop,[]]), - ?line node_rep( - fun (Tag, Call, Args=[_|_]) -> - {Tag,{'EXIT',{killed,_}}} = - {Tag,catch {noexit,apply(rpc, Call, Args)}} - end, "rpc_SUITE_called_node_dies_3", - PA, ?MODULE, suicide, [erlang,exit,[rex,kill]]), - ?line node_rep( - fun %% Cannot block call rpc - will hang - (_Tag, block_call, _Args) -> ok; - (Tag, Call, Args=[_|_]) -> + node_rep( + fun (Tag, Call, Args) -> + {Tag,{badrpc,nodedown}} = + {Tag,apply(rpc, Call, Args)} + end, "rpc_SUITE_called_node_dies_1", + PA, ?MODULE, suicide, [erlang,halt,[]]), + node_rep( + fun (Tag, Call, Args) -> + {Tag,{badrpc,nodedown}} = + {Tag,apply(rpc, Call, Args)} + end, "rpc_SUITE_called_node_dies_2", + PA, ?MODULE, suicide, [init,stop,[]]), + node_rep( + fun (Tag, Call, Args=[_|_]) -> + {Tag,{'EXIT',{killed,_}}} = + {Tag,catch {noexit,apply(rpc, Call, Args)}} + end, "rpc_SUITE_called_node_dies_3", + PA, ?MODULE, suicide, [erlang,exit,[rex,kill]]), + node_rep( + fun %% Cannot block call rpc - will hang + (_Tag, block_call, _Args) -> ok; + (Tag, Call, Args=[_|_]) -> {Tag,{'EXIT',{normal,_}}} = {Tag,catch {noexit,apply(rpc, Call, Args)}} end, "rpc_SUITE_called_node_dies_4", - PA, ?MODULE, suicide, [rpc,stop,[]]), + PA, ?MODULE, suicide, [rpc,stop,[]]), %% ok. node_rep(Fun, Name, PA, M, F, A) -> {ok, Na} = test_server:start_node(list_to_atom(Name++"_a"), slave, - [{args, "-pa " ++ PA}]), + [{args, "-pa " ++ PA}]), Fun(a, call, [Na, M, F, A]), catch test_server:stop_node(Na), {ok, Nb} = test_server:start_node(list_to_atom(Name++"_b"), slave, - [{args, "-pa " ++ PA}]), + [{args, "-pa " ++ PA}]), Fun(b, call, [Nb, M, F, A, infinity]), catch test_server:stop_node(Nb), {ok, Nc} = test_server:start_node(list_to_atom(Name++"_c"), slave, - [{args, "-pa " ++ PA}]), + [{args, "-pa " ++ PA}]), Fun(c, call, [Nc, M, F, A, infinity]), catch test_server:stop_node(Nc), %% {ok, Nd} = test_server:start_node(list_to_atom(Name++"_d"), slave, - [{args, "-pa " ++ PA}]), + [{args, "-pa " ++ PA}]), Fun(d, block_call, [Nd, M, F, A]), catch test_server:stop_node(Nd), {ok, Ne} = test_server:start_node(list_to_atom(Name++"_e"), slave, - [{args, "-pa " ++ PA}]), + [{args, "-pa " ++ PA}]), Fun(e, block_call, [Ne, M, F, A, infinity]), catch test_server:stop_node(Ne), {ok, Nf} = test_server:start_node(list_to_atom(Name++"_f"), slave, - [{args, "-pa " ++ PA}]), + [{args, "-pa " ++ PA}]), Fun(f, block_call, [Nf, M, F, A, infinity]), catch test_server:stop_node(Nf), ok. @@ -410,19 +410,19 @@ node_rep(Fun, Name, PA, M, F, A) -> %% OTP-3766. called_throws(Config) when is_list(Config) -> - ?line PA = filename:dirname(code:which(?MODULE)), + PA = filename:dirname(code:which(?MODULE)), %% {ok, N} = test_server:start_node(rpc_SUITE_called_throws, slave, - [{args, "-pa " ++ PA}]), + [{args, "-pa " ++ PA}]), %% - ?line rep(fun (Tag, Call, Args) -> - {Tag,up} = - {Tag,apply(rpc, Call, Args)} - end, N, erlang, throw, [up]), - ?line rep(fun (Tag, Call, Args) -> - {Tag,{badrpc,{'EXIT',reason}}} = - {Tag,apply(rpc, Call, Args)} - end, N, erlang, throw, [{'EXIT',reason}]), + rep(fun (Tag, Call, Args) -> + {Tag,up} = + {Tag,apply(rpc, Call, Args)} + end, N, erlang, throw, [up]), + rep(fun (Tag, Call, Args) -> + {Tag,{badrpc,{'EXIT',reason}}} = + {Tag,apply(rpc, Call, Args)} + end, N, erlang, throw, [{'EXIT',reason}]), %% test_server:stop_node(N), ok. @@ -432,7 +432,7 @@ called_throws(Config) when is_list(Config) -> call_benchmark(Config) when is_list(Config) -> PA = filename:dirname(code:which(?MODULE)), {ok, Node} = test_server:start_node(rpc_SUITE_call_benchmark, slave, - [{args, "-pa " ++ PA}]), + [{args, "-pa " ++ PA}]), Iter = case erlang:system_info(modified_timing_level) of undefined -> 10000; _ -> 500 %Modified timing - spawn is slower @@ -459,26 +459,26 @@ do_call_benchmark(Node, I, M) -> async_call(Config) when is_list(Config) -> %% Note: First part of nodename sets response delay in seconds. - ?line PA = filename:dirname(code:which(?MODULE)), - ?line NodeArgs = [{args,"-pa "++ PA}], + PA = filename:dirname(code:which(?MODULE)), + NodeArgs = [{args,"-pa "++ PA}], {ok,Node1} = test_server:start_node('1_rpc_SUITE_call', slave, NodeArgs), {ok,Node2} = test_server:start_node('10_rpc_SUITE_call', slave, NodeArgs), {ok,Node3} = test_server:start_node('20_rpc_SUITE_call', slave, NodeArgs), - ?line Promise1 = rpc:async_call(Node1, ?MODULE, f, []), - ?line Promise2 = rpc:async_call(Node2, ?MODULE, f, []), - ?line Promise3 = rpc:async_call(Node3, ?MODULE, f, []), + Promise1 = rpc:async_call(Node1, ?MODULE, f, []), + Promise2 = rpc:async_call(Node2, ?MODULE, f, []), + Promise3 = rpc:async_call(Node3, ?MODULE, f, []), %% Test fast timeouts. - ?line timeout = rpc:nb_yield(Promise2), - ?line timeout = rpc:nb_yield(Promise2, 10), + timeout = rpc:nb_yield(Promise2), + timeout = rpc:nb_yield(Promise2, 10), %% Let Node1 finish its work before yielding. ct:sleep({seconds,2}), - ?line {hej,_,Node1} = rpc:yield(Promise1), + {hej,_,Node1} = rpc:yield(Promise1), %% Wait for the Node2 and Node3. - ?line {value,{hej,_,Node2}} = rpc:nb_yield(Promise2, infinity), - ?line {hej,_,Node3} = rpc:yield(Promise3), + {value,{hej,_,Node2}} = rpc:nb_yield(Promise2, infinity), + {hej,_,Node3} = rpc:yield(Promise3), ok. |