anchor.diff:  			This(This, receive_next(), N+1)
   		end
   	end,
  -    ?line Dive = 
  +    Dive =
   	fun (This, ?CTT(P,{?MODULE,loop,[{hej,hopp},[a,b,c],4.5,N]}), N)
   	    when P == Pid->
   		if N == 0 ->
  
positive.code: 			This(This, receive_next(), N-1)
  		end
  	end,
      ?line apply_slave(?MODULE,loop,[{hej,hopp},[a,b,c],4.5,Num]),
  %     ?line apply_slave_async(?MODULE,loop,[{hej,hopp},[a,b,c],4.5,Num]),
  %     ?line List = collect(test_server:seconds(5)),
      ?line ok = Dive(Dive, receive_next(), Num),
      ?line ?NM,
      ok.
  
  %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  
  info_test() ->
      ?line setup(),
      ?line Prog = [{['$1'],[{is_integer,'$1'}],[{message, false}]},
  		  {'_',[],[]}],
      ?line Self = self(),
      ?line GoOn = make_ref(),
      
      ?line Pid = 
  	spawn_link(
  	  fun () ->
  		  erlang:trace_pattern({?MODULE,exported_wrap,1}, 
  				       Prog, [{meta, Self}]),
  		  Self ! {self(), GoOn}
  	  end),
      ?line receive {Pid, GoOn} -> ok end,
      ?line {traced,false} = erlang:trace_info({?MODULE,exported_wrap,1}, traced),
      ?line {match_spec, false} = 
  	erlang:trace_info({?MODULE,exported_wrap,1}, match_spec),
      ?line {meta, Self} = erlang:trace_info({?MODULE,exported_wrap,1}, meta),
      ?line {meta_match_spec, MMS} = 
  	erlang:trace_info({?MODULE,exported_wrap,1}, meta_match_spec),
      ?line case MMS of
  	      Prog ->
  		  ok;
  	      Wrong ->
  		  exit({bad_result, {erlang,trace_info,
  				     [{?MODULE,exported_wrap,1},
  				      meta_match_spec]},
  			{expected, Prog}, {got, Wrong}})
  	  end,
      ?line erlang:garbage_collect(self()),
      ?line receive
  	  after 1 ->
  		  ok
  	  end,
      ?line io:format("~p~n",[MMS]),
      ?line {meta_match_spec,MMS2} = 
  	erlang:trace_info({?MODULE,exported_wrap,1}, meta_match_spec),
      ?line io:format("~p~n",[MMS2]),
      ?line case MMS2 of
  	      Prog ->
  		  ok;
  	      Wrong2 ->
  		  exit({bad_result, {erlang,trace_info,
  				     [{?MODULE,exported_wrap,1},
  				      meta_match_spec]},
  			{expected, Prog}, {got, Wrong2}})
  	  end,
      ?line {all, [_|_]=L} = erlang:trace_info({?MODULE,exported_wrap,1}, all),
      ?line {value, {meta, Self}} = 
  	lists:keysearch(meta, 1, L),
      ?line {value, {meta_match_spec, MMS}} = 
  	lists:keysearch(meta_match_spec, 1, L),
      
      ?line erlang:trace_pattern({?MODULE,exported_wrap,1}, true, [meta]),
      ?line {meta_match_spec, []} = 
  	erlang:trace_info({?MODULE,exported_wrap,1}, meta_match_spec),
      
      ?line erlang:trace_pattern({?MODULE,exported_wrap,1}, false, [meta]),
      ?line {meta, false} = erlang:trace_info({?MODULE,exported_wrap,1}, meta),
      ?line {meta_match_spec, false} = 
  	erlang:trace_info({?MODULE,exported_wrap,1}, meta_match_spec),
      ?line {all, false} = erlang:trace_info({?MODULE,exported_wrap,1}, all),
      
      ?line shutdown(),
      ?line ?NM,
      ok.
  
  %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  
  tracer_test() ->
      ?line Slave = setup(),
      ?line Self = self(),
      
      ?line MatchSpec = [{'_',[],[{return_trace}]}],
      ?line Tracer1 = spawn_link(fun () -> relay_n(3, Self) end),
      ?line Setter = 
  	spawn_link(
  	  fun () ->
  		  erlang:trace_pattern({?MODULE,receiver,1},
  				       MatchSpec,
  				       [{meta,Tracer1}]),
  		  erlang:trace_pattern({erlang,phash2,2},
  				       MatchSpec,
  				       [{meta,Tracer1}]),
  		  Self ! {self(), done}
  	  end),
      ?line receive {Setter, done} -> ok end,
      ?line Ref = make_ref(),
      ?line apply_slave_async(?MODULE, receiver, [Ref]),
      ?line {Tracer1,?CTT(Slave,{?MODULE,receiver,[Ref]})} = receive_next(100),
      ?line {Tracer1,?CTT(Slave,{erlang,phash2,[1,1]})} = receive_next(100),
      ?line {Tracer1,?RFT(Slave,{erlang,phash2,2},0)} = receive_next(100),
      %% Initiate a return_trace that will fail since the tracer just stopped
      ?line Slave ! Ref,
      ?line receive_no_next(100),
      %% The breakpoint has not been hit since the tracer stopped
      ?line {meta,Tracer1} = 
  	erlang:trace_info({?MODULE,receiver,1}, meta),
      ?line {meta_match_spec, MatchSpec} = 
  	erlang:trace_info({?MODULE,receiver,1}, meta_match_spec),
      ?line {meta,Tracer1} = 
  	erlang:trace_info({erlang,phash2,2}, meta),
      ?line {meta_match_spec, MatchSpec} = 
  	erlang:trace_info({erlang,phash2,2}, meta_match_spec),
      %% Initiate trace messages that will fail
      ?line Ref2 = make_ref(),
      ?line apply_slave_async(?MODULE, receiver, [Ref2]),
      ?line Slave ! Ref2,
      ?line receive_no_next(100),
      ?line {meta,[]} = 
  	erlang:trace_info({?MODULE,receiver,1}, meta),
      ?line {meta_match_spec, MatchSpec} = 
  	erlang:trace_info({?MODULE,receiver,1}, meta_match_spec),
      ?line {meta,[]} =
  	erlang:trace_info({erlang,phash2,2}, meta),
      ?line {meta_match_spec, MatchSpec} = 
  	erlang:trace_info({erlang,phash2,2}, meta_match_spec),
      %% Change tracer
      ?line Tracer2 = spawn_link(fun () -> relay_n(4, Self) end),
      ?line erlang:trace_pattern({?MODULE,receiver,1}, 
  			       MatchSpec, 
  			       [{meta,Tracer2}]),
      ?line erlang:trace_pattern({erlang,phash2,2},
  			       MatchSpec,
  			       [{meta,Tracer2}]),
      ?line Ref3 = make_ref(),
      ?line apply_slave_async(?MODULE, receiver, [Ref3]),
      ?line {Tracer2,?CTT(Slave,{?MODULE,receiver,[Ref3]})} = receive_next(),
      ?line {Tracer2,?CTT(Slave,{erlang,phash2,[1,1]})} = receive_next(),
      ?line {Tracer2,?RFT(Slave,{erlang,phash2,2},0)} = receive_next(),
      %% Change tracer between call trace and return trace
      ?line Tracer3 = spawn_link(fun () -> relay_n(4, Self) end),
      ?line erlang:trace_pattern({?MODULE,receiver,1}, 
  			       MatchSpec, 
  			       [{meta,Tracer3}]),
      ?line erlang:trace_pattern({erlang,phash2,2},
  			       MatchSpec,
  			       [{meta,Tracer3}]),
      ?line Slave ! Ref3, 
      %% The return trace should still come from Tracer2
      ?line {Tracer2,?RFT(Slave,{?MODULE,receiver,1},Ref3)} = receive_next(),
      ?line Ref4 = make_ref(),
      %% Now should Tracer3 be used
      ?line apply_slave_async(?MODULE, receiver, [Ref4]),
      ?line Slave ! Ref4,
      ?line {Tracer3,?CTT(Slave,{?MODULE,receiver,[Ref4]})} = receive_next(),
      ?line {Tracer3,?CTT(Slave,{erlang,phash2,[1,1]})} = receive_next(),
      ?line {Tracer3,?RFT(Slave,{erlang,phash2,2},0)} = receive_next(),
      ?line {Tracer3,?RFT(Slave,{?MODULE,receiver,1},Ref4)} = receive_next(),
      %% The breakpoint has not been hit since the tracer stopped
      ?line {meta,Tracer3} = 
  	erlang:trace_info({?MODULE,receiver,1}, meta),
      ?line {meta_match_spec, MatchSpec} = 
  	erlang:trace_info({?MODULE,receiver,1}, meta_match_spec),
      ?line {meta,Tracer3} = 
  	erlang:trace_info({erlang,phash2,2}, meta),
      ?line {meta_match_spec, MatchSpec} = 
  	erlang:trace_info({erlang,phash2,2}, meta_match_spec),
      
      ?line shutdown(),
      ?line ?NM,
      ok.
  
  %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  
  combo_test() ->
      ?line Slave = setup(),
      ?line Self = self(),
      
      ?line MatchSpec = [{'_',[],[{return_trace}]}],
      ?line Flags = lists:sort([call, return_to]),
      ?line LocalTracer = spawn_link(fun () -> relay_n(6, Self) end),
      ?line MetaTracer = spawn_link(fun () -> relay_n(4, Self) end),
      ?line 1 = erlang:trace_pattern({?MODULE,receiver,1}, 
  				   MatchSpec,
  				   [local,{meta,MetaTracer}]),
      ?line 1 = erlang:trace_pattern({erlang,phash2,2}, 
  				   MatchSpec,
  				   [local,{meta,MetaTracer}]),
      ?line 1 = erlang:trace(Slave, true, 
  			   [{tracer,LocalTracer} | Flags]),
      %%
      ?line {all, TraceInfo1} = 
  	erlang:trace_info({?MODULE,receiver,1}, all),
      ?line {meta,MetaTracer} = 
  	erlang:trace_info({?MODULE,receiver,1}, meta),
      ?line {value,{meta,MetaTracer}} = 
  	lists:keysearch(meta, 1, TraceInfo1),
      ?line {meta_match_spec,MatchSpec} = 
  	erlang:trace_info({?MODULE,receiver,1}, meta_match_spec),
      ?line {value,{meta_match_spec,MatchSpec}} = 
  	lists:keysearch(meta_match_spec, 1, TraceInfo1),
      ?line {traced,local} = 
  	erlang:trace_info({?MODULE,receiver,1}, traced),
      ?line {value,{traced,local}} = 
  	lists:keysearch(traced, 1, TraceInfo1),
      ?line {match_spec,MatchSpec} = 
  	erlang:trace_info({?MODULE,receiver,1}, match_spec),
      ?line {value,{match_spec,MatchSpec}} = 
  	lists:keysearch(match_spec, 1, TraceInfo1),
      %%
      ?line {all, TraceInfo2} = 
  	erlang:trace_info({erlang,phash2,2}, all),
      ?line {meta,MetaTracer} = 
  	erlang:trace_info({erlang,phash2,2}, meta),
      ?line {value,{meta,MetaTracer}} = 
  	lists:keysearch(meta, 1, TraceInfo2),
      ?line {meta_match_spec,MatchSpec} = 
  	erlang:trace_info({erlang,phash2,2}, meta_match_spec),
      ?line {value,{meta_match_spec,MatchSpec}} = 
  	lists:keysearch(meta_match_spec, 1, TraceInfo2),
      ?line {traced,local} = 
  	erlang:trace_info({erlang,phash2,2}, traced),
      ?line {value,{traced,local}} = 
  	lists:keysearch(traced, 1, TraceInfo2),
      ?line {match_spec,MatchSpec} = 
  	erlang:trace_info({erlang,phash2,2}, match_spec),
      ?line {value,{match_spec,MatchSpec}} = 
  	lists:keysearch(match_spec, 1, TraceInfo2),
      %%
      ?line {flags,Flags1} = erlang:trace_info(Slave, flags),
      ?line Flags = lists:sort(Flags1),
      ?line {tracer,LocalTracer} = erlang:trace_info(Slave, tracer),
      %%
      ?line Ref = make_ref(),
      ?line apply_slave_async(?MODULE, receiver, [Ref]),
      ?line Slave ! Ref,
      ?line ?CTT(Slave,{?MODULE,receiver,[Ref]}) = receive_next_bytag(MetaTracer),
      ?line ?CTT(Slave,{erlang,phash2,[1,1]}) = receive_next_bytag(MetaTracer),
      ?line ?RFT(Slave,{erlang,phash2,2},0) = receive_next_bytag(MetaTracer),
      ?line ?RFT(Slave,{?MODULE,receiver,1},Ref) = receive_next_bytag(MetaTracer),
      ?line ?CT(Slave,{?MODULE,receiver,[Ref]}) = receive_next_bytag(LocalTracer),
      ?line ?CT(Slave,{erlang,phash2,[1,1]}) = receive_next_bytag(LocalTracer),
      ?line case {receive_next_bytag(LocalTracer),
  		receive_next_bytag(LocalTracer)} of
  	      {?RF(Slave,{erlang,phash2,2},0),
  	       ?RT(Slave,{?MODULE,receiver,1})} ->
  		  ?line ok;
  	      {?RT(Slave,{?MODULE,receiver,1}),
  	       ?RF(Slave,{erlang,phash2,2},0)} ->
  		?line ok;
  	      Error1 -> ?t:fail({unexpected_message, Error1})
  	end,
      ?line case {receive_next_bytag(LocalTracer),
  		receive_next_bytag(LocalTracer)} of
  	      {?RF(Slave,{?MODULE,receiver,1},Ref),
  	       ?RT(Slave,{?MODULE,slave,1})} ->
  		  ?line ok;
  	      {?RT(Slave,{?MODULE,slave,1}),
  	       ?RF(Slave,{?MODULE,receiver,1},Ref)} ->
  		  ?line ok;
  	      Error2 -> ?t:fail({unexpected_message, Error2})
  	  end,
      
      ?line shutdown(),
      ?line ?NM,
      ok.
  
  %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  
negative.code: %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  
  stack_grow_test() ->    
      Pid = setup(),
      1 = erlang:trace_pattern({?MODULE,loop,4},
  				   [{'_',[],[{return_trace}]}],[meta]),
      Num = 1 bsl 15,
      Surface =
  	fun (This, ?RFT(P,{?MODULE,loop,4},N), N) when P == Pid->
  		if N == Num ->
  			?NM,
  