anchor.diff:  			      {failfun, fun ssh_test_lib:failfun/2},
   			      {user_passwords,
   			       [{?USER, ?PASSWD}]}]),
  -    [{{server,ssh_system_sup, HostIP, Port, ?DEFAULT_PROFILE},
  -      Daemon, supervisor,
  -      [ssh_system_sup]}] = 
  -	supervisor:which_children(sshd_sup),
  +
  +    ?wait_match([{{server,ssh_system_sup, HostIP, Port, ?DEFAULT_PROFILE},
  +		  Daemon, supervisor,
  +		  [ssh_system_sup]}],
  +		supervisor:which_children(sshd_sup),
  +		Daemon),
       check_sshd_system_tree(Daemon, Config),
       ssh:stop_daemon(HostIP, Port),
       ct:sleep(?WAIT_FOR_SHUTDOWN),
  -    [] = supervisor:which_children(sshd_sup).
  +    ?wait_match([], supervisor:which_children(sshd_sup)).
   
   sshd_subtree_profile() ->
       [{doc, "Make sure the sshd subtree using profile option is correct"}].	
  
positive.code: 				  {user_passwords,
  				   [{?USER, ?PASSWD}]},
  				  {profile, Profile}]),
      [{{server,ssh_system_sup, HostIP,Port,Profile},
        Daemon, supervisor,
        [ssh_system_sup]}] = 
  	supervisor:which_children(sshd_sup),
      check_sshd_system_tree(Daemon, Config),
      ssh:stop_daemon(HostIP, Port, Profile),
      ct:sleep(?WAIT_FOR_SHUTDOWN),
      [] = supervisor:which_children(sshd_sup).
  
  
  check_sshd_system_tree(Daemon, Config) -> 
  
negative.code: 
  suite() ->
      [{ct_hooks,[ts_install_cth]},
       {timetrap,{seconds,100}}].
  
  all() -> 
      [default_tree, sshc_subtree, sshd_subtree, sshd_subtree_profile].
  