<div dir="ltr">IMHO, it is mildly incorrect to view this as a problem to solve via the lit.cfg.<div><br></div><div style>Doesn't this indicate that there is also a problem from the user perspective of ASAN? How is this supposed to work for the user? Do they have to set things in their environment to get symbolized traces?</div>
<div style><br></div><div style>If you solve that problem then usually the test suite doesn't have to be changed. Of course, we have tons of things like this for expediency and I have no problem with that.</div><div style>
<br></div><div style> - Daniel</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Mar 12, 2013 at 1:10 AM, Evgeniy Stepanov <span dir="ltr"><<a href="mailto:eugenis@google.com" target="_blank">eugenis@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi ddunbar, samsonov,<br>
<br>
This is needed to get symbolized stack traces when running LLVM tests under (A|M)San.<br>
<br>
I don't like code duplication, but this seems commonplace in lit.cfg's. I also have an identical patch to Clang (test/ and test/Unit/), if this is deemed acceptable.<br>
<br>
<br>
<a href="http://llvm-reviews.chandlerc.com/D529" target="_blank">http://llvm-reviews.chandlerc.com/D529</a><br>
<br>
Files:<br>
  test/Unit/lit.cfg<br>
  test/lit.cfg<br>
<br>
Index: test/Unit/lit.cfg<br>
===================================================================<br>
--- test/Unit/lit.cfg<br>
+++ test/Unit/lit.cfg<br>
@@ -81,3 +81,8 @@<br>
         shlibpath = os.pathsep + shlibpath<br>
     shlibpath = config.shlibdir + shlibpath<br>
     config.environment[config.shlibpath_var] = shlibpath<br>
+<br>
+# Setup paths to llvm-symbolizer for Sanitizer tools.<br>
+llvm_tools_dir = getattr(config, 'llvm_tools_dir', None)<br>
+config.environment['ASAN_SYMBOLIZER_PATH'] = llvm_tools_dir + '/llvm-symbolizer'<br>
+config.environment['MSAN_SYMBOLIZER_PATH'] = llvm_tools_dir + '/llvm-symbolizer'<br>
Index: test/lit.cfg<br>
===================================================================<br>
--- test/lit.cfg<br>
+++ test/lit.cfg<br>
@@ -90,6 +90,11 @@<br>
 config.environment['PYTHON_EXECUTABLE'] = getattr(config, 'python_executable',<br>
                                                   '')<br>
<br>
+# Setup paths to llvm-symbolizer for Sanitizer tools.<br>
+llvm_tools_dir = getattr(config, 'llvm_tools_dir', None)<br>
+config.environment['ASAN_SYMBOLIZER_PATH'] = llvm_tools_dir + '/llvm-symbolizer'<br>
+config.environment['MSAN_SYMBOLIZER_PATH'] = llvm_tools_dir + '/llvm-symbolizer'<br>
+<br>
 ###<br>
<br>
 import os<br>
</blockquote></div><br></div>