anchor.diff:  %% changes too much during its course, or if there are timing problems
   %% with the alarm_handler receiving the alarms too late
   %%----------------------------------------------------------------------
  -alarm(suite) ->
  -    [];
  -alarm(doc) ->
  -    ["Test that alarms are set and cleared"];
  +alarm(suite) -> [];
  +alarm(doc) -> ["Test that alarms are set and cleared"];
   alarm(Config) when is_list(Config) ->
   
       %% Find out how many disks exceed the threshold
       %% and make sure the corresponding number of alarms is set
  -    ?line Threshold1 = disksup:get_almost_full_threshold(), % 80
  -    ?line Data1 = disksup:get_disk_data(),
  -    ?line Over1 = over_threshold(Data1, Threshold1),
  -    ?line Alarms1 = get_alarms(),
  +    Threshold1 = disksup:get_almost_full_threshold(), % 80
  +    Data1 = disksup:get_disk_data(),
  +    Over1 = over_threshold(Data1, Threshold1),
  +    Alarms1 = get_alarms(),
       if
   	Over1==length(Alarms1) ->
  -	    ?line true;
  +	    true;
   	true ->
   	    dump_info(),
  -	    ?line ?t:fail({bad_alarms, Threshold1, Data1, Alarms1})
  +	    ?t:fail({bad_alarms, Threshold1, Data1, Alarms1})
       end,
   
       %% Try to find a disk with space usage below Threshold1,
  
positive.code: 	    {skip, {os_pid_not_found, Str}}
      end.
  
  terminate(suite) ->
      [];
  terminate(Config) when is_list(Config) ->
      ?line ok = application:set_env(os_mon, start_disksup, false),
      ?line ok = supervisor:terminate_child(os_mon_sup, disksup),
      ok.
  
  unavailable(suite) ->
      [];
  unavailable(doc) ->
      ["Test correct behaviour when service is unavailable"];
  unavailable(Config) when is_list(Config) ->
  
      %% Make sure all API functions return their dummy values
      ?line [{"none",0,0}] = disksup:get_disk_data(),
      ?line 1800000 = disksup:get_check_interval(),
      ?line ok = disksup:set_check_interval(5),
      ?line 80 = disksup:get_almost_full_threshold(),
      ?line ok = disksup:set_almost_full_threshold(0.9),
  
      ok.
  
  restart(suite) ->
      [];
  restart(Config) when is_list(Config) ->
      ?line ok = application:set_env(os_mon, start_disksup, true),
      ?line {ok, _Pid} = supervisor:restart_child(os_mon_sup, disksup),
      ok.
  
  otp_5910(suite) ->
      [];
  otp_5910(doc) ->
      ["Test that alarms are cleared if disksup crashes or "
       "if OS_Mon is stopped"];
  otp_5910(Config) when is_list(Config) ->
  
      %% Make sure disksup sets at least one alarm
      ?line Data = disksup:get_disk_data(),
      ?line Threshold0 = disksup:get_almost_full_threshold(),
      ?line Threshold = case over_threshold(Data, Threshold0) of
  			  0 ->
  			      [{_Id,_Kbyte,Cap}|_] = Data,
  			      ?line ok = disksup:set_almost_full_threshold((Cap-1)/100),
  			      Cap-1;
  			  _N ->
  			      Threshold0
  		      end,
      ?line ok = application:set_env(os_mon,
  				   disk_almost_full_threshold,
  				   Threshold/100),
      ?line disksup ! timeout, % force a disk check
      ?line Data2 = disksup:get_disk_data(),
      ?line Over = over_threshold(Data2, Threshold),
      ?line Alarms = get_alarms(),
      if
  	Over==0 ->
  	    ?line ?t:fail({threshold_too_low, Data2, Threshold});
  	Over==length(Alarms) ->
  	    ok;
  	true ->
  	    dump_info(),
  	    ?line ?t:fail({bad_alarms, Threshold, Data2, Alarms})
      end,
  
      %% Kill disksup
  
negative.code:     end,
  
      %% get_check_interval()
      1800000 = disksup:get_check_interval(),
  
      %% set_check_interval(Minutes)
      ok = disksup:set_check_interval(20),
      1200000 = disksup:get_check_interval(),
      {'EXIT',{badarg,_}} = (catch disksup:set_check_interval(0.5)),
      1200000 = disksup:get_check_interval(),
      ok = disksup:set_check_interval(30),
  
      %% get_almost_full_threshold()
      80 = disksup:get_almost_full_threshold(),
  
      %% set_almost_full_threshold(Float)
      ok = disksup:set_almost_full_threshold(0.90),
      90 = disksup:get_almost_full_threshold(),
      {'EXIT',{badarg,_}} =
  	(catch disksup:set_almost_full_threshold(-0.5)),
      90 = disksup:get_almost_full_threshold(),
      ok = disksup:set_almost_full_threshold(0.80),
  
      ok.
  
  config(suite) -> [];
  config(doc) -> ["Test configuration"];
  config(Config) when is_list(Config) ->
  
      %% Change configuration parameters and make sure change is reflected
      %% when disksup is restarted
      ok = application:set_env(os_mon, disk_space_check_interval, 29),
      ok = application:set_env(os_mon, disk_almost_full_threshold, 0.81),
  
      ok = supervisor:terminate_child(os_mon_sup, disksup),
      {ok, _Child1} = supervisor:restart_child(os_mon_sup, disksup),
  
      1740000 = disksup:get_check_interval(),
      81 = disksup:get_almost_full_threshold(),
  
      %% Also try this with bad parameter values, should be ignored
      ok =
  	application:set_env(os_mon, disk_space_check_interval, 0.5),
      ok =
  	application:set_env(os_mon, disk_almost_full_threshold, -0.81),
  
      ok = supervisor:terminate_child(os_mon_sup, disksup),
      {ok, _Child2} = supervisor:restart_child(os_mon_sup, disksup),
  
      1800000 = disksup:get_check_interval(),
      80 = disksup:get_almost_full_threshold(),
  
      %% Reset configuration parameters
      ok = application:set_env(os_mon, disk_space_check_interval, 30),
      ok = application:set_env(os_mon, disk_almost_full_threshold, 0.80),
      ok.
  
  %%----------------------------------------------------------------------
  