anchor.diff:      WithSyncTime = config_fun(config2(NodeNames)),
   
       % Test [cp1, cp2, cp3]
  -    ?line {ok, Cp1} = start_node_config(Ncp1, NoSyncTime, Conf),
  -    ?line {ok, Cp2} = start_node_config(Ncp2, NoSyncTime, Conf),
  -    ?line {ok, Cp3} = start_node_config(Ncp3, WithSyncTime, Conf),
  +    {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],
  -    ?line wait_for_ready_net(),
  +    wait_for_ready_net(),
   
       % Start app1 and make sure cp1 starts it
  -    ?line {[ok,ok,ok],[]} =
  +    {[ok,ok,ok],[]} =
           rpc:multicall(Cps, application, load, [app1()]),
  -    ?line ?UNTIL(is_loaded(app1, Cps)),
  -    ?line {[ok,ok,ok],[]} =
  +    ?UNTIL(is_loaded(app1, Cps)),
  +    {[ok,ok,ok],[]} =
           rpc:multicall(Cps, application, start, [app1, permanent]),
  -    ?line ?UNTIL(is_started(app1, Cp1)),
  -    ?line false = is_started(app1, Cp2),
  +    ?UNTIL(is_started(app1, Cp1)),
  +    false = is_started(app1, Cp2),
   
       % Unpermit app1 on cp1, make sure cp2 starts it
  -    ?line ok = rpc:call(Cp1, application, permit, [app1, false]),
  -    ?line false = is_started(app1, Cp1),
  -    ?line true = is_started(app1, Cp2),
  +    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
  -    ?line ok = rpc:call(Cp2, application, permit, [app1, false]),
  -    ?line false = is_started(app1, Cp1),
  -    ?line false = is_started(app1, Cp2),
  -    ?line true = is_started(app1, Cp3),
  +    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
  -    ?line ok = rpc:call(Cp2, application, permit, [app1, true]),
  -    ?line false = is_started(app1, Cp1),
  -    ?line false = is_started(app1, Cp3),
  -    ?line true = is_started(app1, Cp2),
  +    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
  -    ?line {[ok,ok,ok],[]} = 
  +    {[ok,ok,ok],[]} = 
           rpc:multicall(Cps, application, load, [app3()]),
  -    ?line ?UNTIL(is_loaded(app3, Cps)),
  -    ?line {[ok,ok,ok],[]} = 
  +    ?UNTIL(is_loaded(app3, Cps)),
  +    {[ok,ok,ok],[]} = 
           rpc:multicall(Cps, application, start, [app3, permanent]),
       test_server:sleep(1000),
  -    ?line false = is_started(app3, Cp1),
  -    ?line false = is_started(app3, Cp2),
  -    ?line false = is_started(app3, Cp3),
  +    false = is_started(app3, Cp1),
  +    false = is_started(app3, Cp2),
  +    false = is_started(app3, Cp3),
   
       % Permit app3 on Cp3
  -    ?line ok = rpc:call(Cp3, application, permit, [app3, true]),
  -    ?line true = is_started(app3, Cp3),
  +    ok = rpc:call(Cp3, application, permit, [app3, true]),
  +    true = is_started(app3, Cp3),
   
       % Permit app3 on Cp2, make sure it starts it
  -    ?line ok = rpc:call(Cp2, application, permit, [app3, true]),
  -    ?line true = is_started(app3, Cp2),
  -    ?line false = is_started(app3, Cp3),
  +    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
  -    ?line ok = rpc:call(Cp1, application, permit, [app3, true]),
  -    ?line false = is_started(app3, Cp1),
  -    ?line true = is_started(app3, Cp2),
  -    ?line false = is_started(app3, Cp3),
  +    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_node_nice(Cp2),
  -    ?line ?UNTIL(is_started(app3, Cp1)),
  +    ?UNTIL(is_started(app3, Cp1)),
   
       stop_node_nice(Cp1),
       stop_node_nice(Cp3),
  
positive.code:     stop_node_nice(Cp2),
      stop_node_nice(Cp3),
  
      ?line ok = file:delete("dc.boot"),
      ?line ok = file:delete("dc.rel"),
      ?line ok = file:delete("dc.script"),
  
      ok.
  
  
negative.code:     WithSyncTime = config_fun(config_perm2(NodeNames)),
  
      % 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(),
  
      {[ok,ok,ok],[]} = 
          rpc:multicall(Cps, application, load, [app1()]),
      ?UNTIL(is_loaded(app1, Cps)),
      {[ok,ok,ok],[]} = 
          rpc:multicall(Cps, application, start, [app1, permanent]),
      {[ok,ok,ok],[]} = 
          rpc:multicall(Cps, application, load, [app2()]),
  
      test_server:sleep(1000),
      false = is_started(app1, Cp1),
      false = is_started(app1, Cp2),
      false = is_started(app1, Cp3),
  
      %Permit a not started application
      ok = rpc:call(Cp1, application, permit, [app2, true]),
      test_server:sleep(1000),
      false = is_started(app2, Cp1),
      false = is_started(app2, Cp2),
      false = is_started(app2, Cp3),
  
      %Permit a not loaded application
      {error,{not_loaded,app3}} = 
  	rpc:call(Cp1, application, permit, [app3, true]),
      test_server:sleep(1000),
      false = is_started(app3, Cp1),
      false = is_started(app3, Cp2),
      false = is_started(app3, Cp3),
  
      %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]),
      test_server:sleep(1000),
      false = is_started(app2, Cp1),
      false = is_started(app2, Cp2),
      false = is_started(app2, Cp3),
  
      %Unpermit a not loaded application
      {error,{not_loaded,app3}} = 
  	rpc:call(Cp1, application, permit, [app3, false]),
      {[ok,ok,ok],[]} = 
          rpc:multicall(Cps, application, load, [app3()]),
      ?UNTIL(is_loaded(app3, Cps)),
      {[ok,ok,ok],[]} = 
          rpc:multicall(Cps, application, start, [app3, permanent]),
      test_server:sleep(1000),
      false = is_started(app3, Cp1),
      false = is_started(app3, Cp2),
      false = is_started(app3, Cp3),
  
      % 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
      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
      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
      ok = rpc:call(Cp2, application, permit, [app1, true]),
      test_server: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
      stop_node_nice(Cp1),
      ?UNTIL(is_started(app1, Cp2)),
      false = is_started(app2, Cp2),
  
      % 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()]),
      ?UNTIL(is_loaded(app1, Cp1_2)),
      ok = rpc:call(Cp1_2, application, start, [app1, permanent]),
      ok = rpc:call(Cp1_2, application, load, [app2()]),
      ?UNTIL(is_loaded(app2, Cp1_2)),
      ok = rpc:call(Cp1_2, application, start, [app2, permanent]),
      ok = rpc:call(Cp1_2, application, load, [app3()]),
      ?UNTIL(is_loaded(app3, Cp1_2)),
      ok = rpc:call(Cp1_2, application, start, [app3, permanent]),
      false = is_started(app1, Cp1_2),
      false = is_started(app2, Cp1_2),
  
      % 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
      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
      ok = rpc:call(Cp3, application, permit, [app3, false]),
      ok = rpc:call(Cp1_2, application, permit, [app3, false]),
      ?UNTIL(false =:= is_started(app3, Cp1_2)),
      false = is_started(app3, Cp2),
      false = is_started(app3, Cp3),
  
      stop_node_nice(Cp1_2),
      stop_node_nice(Cp2),
  