@@ -53,20 +53,27 @@ def do_test(self):
5353 runtimes .append (os .path .join (libspec .GetDirectory (), libspec .GetFilename ()))
5454 self .registerSharedLibrariesWithTarget (target , runtimes )
5555
56- # Unfortunatley the runtime itself isn't 100% reliable in reporting TSAN errors.
57- process = None
58- stop_reason = lldb . eStopReasonInvalid
56+ # Unfortunately the runtime itself isn't 100% reliable in reporting TSAN errors.
57+ failure_reasons = []
58+ stop_reason = None
5959 for retry in range (5 ):
60- process = target .LaunchSimple (None , None , self .get_process_working_directory ())
61- if not process :
60+ error = lldb .SBError ()
61+ info = lldb .SBLaunchInfo ([exe_name ])
62+ info .SetWorkingDirectory (self .get_process_working_directory ())
63+ process = target .Launch (info , error )
64+ if not error .success :
65+ failure_reasons .append (f"Failed to bring up process, error: { error .value } " )
6266 continue
67+
6368 stop_reason = process .GetSelectedThread ().GetStopReason ()
6469 if stop_reason == lldb .eStopReasonInstrumentation :
6570 break
71+ failure_reasons .append (f"Invalid stop_reason: { stop_reason } " )
6672
6773 self .assertEqual (
68- process .GetSelectedThread ().GetStopReason (),
69- lldb .eStopReasonInstrumentation )
74+ stop_reason ,
75+ lldb .eStopReasonInstrumentation ,
76+ f"Failed with { len (failure_reasons )} attempts with reasons: { failure_reasons } " )
7077
7178 # the stop reason of the thread should be a TSan report.
7279 self .expect ("thread list" , "A Swift access race should be detected" ,
0 commit comments