anchor.diff:  	    {skip, "Only run on unix and win32"}
       end;
   restart(Config) when is_list(Config) ->
  -    ?line {ok, Node} = start_check(loose, heart_test),
  -    ?line rpc:call(Node, init, restart, []),
  +    {ok, Node} = start_check(loose, heart_test),
  +    rpc:call(Node, init, restart, []),
       receive
   	{nodedown, Node} ->
   	    ok
  
positive.code: 	    test_server:fail(node_not_closed)
      end,
      test_server:sleep(5000),
      ?line case net_adm:ping(Node) of
  	      pong ->
  		  erlang:monitor_node(Node, true),
  		  ?line rpc:call(Node, init, reboot, []),
  		  receive
  		      {nodedown, Node} ->
  			  ok
  		  after 2000 ->
  			  test_server:fail(node_not_closed2)
  		  end,
  		  ok;
  	      _ ->
  		  test_server:fail(node_not_rebooted)
  	  end,
      ok.
  
  %% Only tests bad command, correct behaviour is tested in reboot/1.
  set_cmd(suite) -> [];
  set_cmd(Config) when is_list(Config) ->
      ?line {ok, Node} = start_check(slave, heart_test),
      Cmd = wrong_atom,
      ?line {error, {bad_cmd, Cmd}} = rpc:call(Node, heart, set_cmd, [Cmd]),
      Cmd1 = lists:duplicate(2047, $a),
      ?line {error, {bad_cmd, Cmd1}} = rpc:call(Node, heart, set_cmd, [Cmd1]),
      Cmd2 = lists:duplicate(28, $a),
      ?line ok = rpc:call(Node, heart, set_cmd, [Cmd2]),
      Cmd3 = lists:duplicate(2000, $a),
      ?line ok = rpc:call(Node, heart, set_cmd, [Cmd3]),
      stop_node(Node),
      ok.
  
  clear_cmd(suite) -> {req,[{time,15}]};
  clear_cmd(Config) when is_list(Config) ->
      ?line {ok, Node} = start_check(slave, heart_test),
      ?line ok = rpc:call(Node, heart, set_cmd,
  			[atom_to_list(lib:progname()) ++
  			 " -noshell -heart " ++ name(Node) ++ "&"]),
      ?line rpc:call(Node, init, reboot, []),
      receive
  	{nodedown, Node} ->
  	    ok
  
negative.code: %%% Argument is the argument(s) to send through erl -s
  %%%
  start_node_run(Name, Env, Function, Argument) -> 
      PA = filename:dirname(code:which(?MODULE)),
      Params = "-heart -env " ++ env_conv(Env) ++ " -pa " ++ PA ++
  	" -s " ++
  	atom_conv(?MODULE) ++ " " ++ atom_conv(Function) ++ " " ++
  	atom_conv(Argument),
      start_node(Name, Params).
  
  start_node(Name, Param) ->
      test_server:start_node(Name, slave, [{args, Param}]).
  