<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 10, 2016 at 2:46 AM, Daniel Sanders <span dir="ltr"><<a href="mailto:Daniel.Sanders@imgtec.com" target="_blank">Daniel.Sanders@imgtec.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-GB" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">It works well enough for the 3.8 release. It marks the test unsupported for all supported targets if any of them is mips64. This means it will incorrectly mark mips (32-bit)
 unsupported as well but this is ok because the whole of msan is unsupported for mips (32-bit) at the moment.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">I'll commit the '</span>UNSUPPORTED:mips64-supported-target' to the branch since that seems like the obvious thing to do and is a safer bet than merging this and D17045 this
 late in the release process.</p></div></div></blockquote><div><br></div><div>Sounds good, thanks!</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-GB" link="blue" vlink="purple"><div><p class="MsoNormal"><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">Thanks<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><u></u> <u></u></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Alexey Samsonov [mailto:<a href="mailto:vonosmas@gmail.com" target="_blank">vonosmas@gmail.com</a>]
<br>
<b>Sent:</b> 10 February 2016 01:01<br>
<b>To:</b> Daniel Sanders<br>
<b>Cc:</b> <a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>; Hans Wennborg<br>
<b>Subject:</b> Re: [compiler-rt] r260230 - [msan] Run the tests for each supported arch and suffix each one to distinguish them.<u></u><u></u></span></p>
</div>
</div><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">I'm curious if you can use a simpler workaround to disable this test in the release branch: will adding<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">UNSUPPORTED:mips64-supported-target<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">work there?<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<p class="MsoNormal">(I agree that <a href="http://reviews.llvm.org/D17045" target="_blank">http://reviews.llvm.org/D17045</a> is cleaner fix).<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On Tue, Feb 9, 2016 at 3:15 PM, Daniel Sanders <<a href="mailto:Daniel.Sanders@imgtec.com" target="_blank">Daniel.Sanders@imgtec.com</a>> wrote:<u></u><u></u></p>
<p class="MsoNormal">Hi,<br>
<br>
Is it ok to merge this to the 3.8 release? It turns out I need part of it (specifically the ${arch} variable from the loop) to fix the hanging test on our big-endian target (see
<a href="http://reviews.llvm.org/D17045" target="_blank">http://reviews.llvm.org/D17045</a>).<br>
<br>
________________________________________<br>
From: llvm-commits [<a href="mailto:llvm-commits-bounces@lists.llvm.org" target="_blank">llvm-commits-bounces@lists.llvm.org</a>] on behalf of Daniel Sanders via llvm-commits [<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>]<br>
Sent: 09 February 2016 16:18<br>
To: <a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
Subject: [compiler-rt] r260230 - [msan] Run the tests for each supported arch and suffix each one to distinguish them.<u></u><u></u></p>
<div>
<div>
<p class="MsoNormal"><br>
Author: dsanders<br>
Date: Tue Feb  9 10:18:15 2016<br>
New Revision: 260230<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=260230&view=rev" target="_blank">
http://llvm.org/viewvc/llvm-project?rev=260230&view=rev</a><br>
Log:<br>
[msan] Run the tests for each supported arch and suffix each one to distinguish them.<br>
<br>
Summary:<br>
Previously, the tests only ran for the 64-bit equivalent of the default target<br>
(see -m64).<br>
Given the supported architecture list only contains 64-bit targets, this happens<br>
to work out the same as the supported targets in most cases but may matter for<br>
X86_64/X86_64h on Darwin.<br>
<br>
For other targets, the practical effect is that the test names contain the<br>
architecture. This resolves some confusion when msan tests fail since their<br>
name no longer implies that they are trying to test the default target.<br>
<br>
Reviewers: samsonov<br>
<br>
Subscribers: tberghammer, danalbert, srhines, llvm-commits<br>
<br>
Differential Revision: <a href="http://reviews.llvm.org/D16855" target="_blank">http://reviews.llvm.org/D16855</a><br>
<br>
Modified:<br>
    compiler-rt/trunk/test/msan/CMakeLists.txt<br>
    compiler-rt/trunk/test/msan/lit.cfg<br>
    compiler-rt/trunk/test/msan/<a href="http://lit.site.cfg.in" target="_blank">lit.site.cfg.in</a><br>
<br>
Modified: compiler-rt/trunk/test/msan/CMakeLists.txt<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/msan/CMakeLists.txt?rev=260230&r1=260229&r2=260230&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/msan/CMakeLists.txt?rev=260230&r1=260229&r2=260230&view=diff</a><br>
==============================================================================<br>
--- compiler-rt/trunk/test/msan/CMakeLists.txt (original)<br>
+++ compiler-rt/trunk/test/msan/CMakeLists.txt Tue Feb  9 10:18:15 2016<br>
@@ -1,8 +1,32 @@<br>
 set(MSAN_LIT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})<br>
<br>
-configure_lit_site_cfg(<br>
-  ${CMAKE_CURRENT_SOURCE_DIR}/<a href="http://lit.site.cfg.in" target="_blank">lit.site.cfg.in</a><br>
-  ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg)<br>
+set(MSAN_TESTSUITES)<br>
+<br>
+set(MSAN_TEST_ARCH ${MSAN_SUPPORTED_ARCH})<br>
+if(APPLE)<br>
+  darwin_filter_host_archs(MSAN_SUPPORTED_ARCH MSAN_TEST_ARCH)<br>
+endif()<br>
+<br>
+foreach(arch ${MSAN_TEST_ARCH})<br>
+  string(TOLOWER "-${arch}" MSAN_TEST_CONFIG_SUFFIX)<br>
+  if(ANDROID OR ${arch} MATCHES "arm|aarch64")<br>
+    # This is only true if we are cross-compiling.<br>
+    # Build all tests with host compiler and use host tools.<br>
+    set(MSAN_TEST_TARGET_CC ${COMPILER_RT_TEST_COMPILER})<br>
+    set(MSAN_TEST_TARGET_CFLAGS ${COMPILER_RT_TEST_COMPILER_CFLAGS})<br>
+  else()<br>
+    get_target_flags_for_arch(${arch} MSAN_TEST_TARGET_CFLAGS)<br>
+    string(REPLACE ";" " " MSAN_TEST_TARGET_CFLAGS "${MSAN_TEST_TARGET_CFLAGS}")<br>
+  endif()<br>
+<br>
+  string(TOUPPER ${arch} ARCH_UPPER_CASE)<br>
+  set(CONFIG_NAME ${ARCH_UPPER_CASE}Config)<br>
+<br>
+  configure_lit_site_cfg(<br>
+    ${CMAKE_CURRENT_SOURCE_DIR}/<a href="http://lit.site.cfg.in" target="_blank">lit.site.cfg.in</a><br>
+    ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}/lit.site.cfg)<br>
+  list(APPEND MSAN_TESTSUITES ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME})<br>
+endforeach()<br>
<br>
 set(MSAN_TEST_DEPS ${SANITIZER_COMMON_LIT_TEST_DEPS})<br>
 if(NOT COMPILER_RT_STANDALONE_BUILD)<br>
@@ -17,7 +41,7 @@ if(COMPILER_RT_INCLUDE_TESTS AND COMPILE<br>
 endif()<br>
<br>
 add_lit_testsuite(check-msan "Running the MemorySanitizer tests"<br>
-  ${CMAKE_CURRENT_BINARY_DIR}<br>
+  ${MSAN_TESTSUITES}<br>
   DEPENDS ${MSAN_TEST_DEPS}<br>
   )<br>
 set_target_properties(check-msan PROPERTIES FOLDER "MSan tests")<br>
<br>
Modified: compiler-rt/trunk/test/msan/lit.cfg<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/msan/lit.cfg?rev=260230&r1=260229&r2=260230&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/msan/lit.cfg?rev=260230&r1=260229&r2=260230&view=diff</a><br>
==============================================================================<br>
--- compiler-rt/trunk/test/msan/lit.cfg (original)<br>
+++ compiler-rt/trunk/test/msan/lit.cfg Tue Feb  9 10:18:15 2016<br>
@@ -3,17 +3,18 @@<br>
 import os<br>
<br>
 # Setup config name.<br>
-<a href="http://config.name" target="_blank">config.name</a> = 'MemorySanitizer'<br>
+<a href="http://config.name" target="_blank">config.name</a> = 'MemorySanitizer' + config.name_suffix<br>
<br>
 # Setup source root.<br>
 config.test_source_root = os.path.dirname(__file__)<br>
<br>
 # Setup default compiler flags used with -fsanitize=memory option.<br>
-clang_msan_cflags = ["-fsanitize=memory",<br>
-                     "-mno-omit-leaf-frame-pointer",<br>
-                     "-fno-omit-frame-pointer",<br>
-                     "-fno-optimize-sibling-calls",<br>
-                     "-m64"] + config.debug_info_flags<br>
+clang_msan_cflags = (["-fsanitize=memory",<br>
+                      "-mno-omit-leaf-frame-pointer",<br>
+                      "-fno-omit-frame-pointer",<br>
+                      "-fno-optimize-sibling-calls"] +<br>
+                      [config.target_cflags] +<br>
+                      config.debug_info_flags)<br>
 # Some Msan tests leverage backtrace() which requires libexecinfo on FreeBSD.<br>
 if config.host_os == 'FreeBSD':<br>
   clang_msan_cflags += ["-lexecinfo"]<br>
<br>
Modified: compiler-rt/trunk/test/msan/<a href="http://lit.site.cfg.in" target="_blank">lit.site.cfg.in</a><br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/msan/lit.site.cfg.in?rev=260230&r1=260229&r2=260230&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/msan/lit.site.cfg.in?rev=260230&r1=260229&r2=260230&view=diff</a><br>
==============================================================================<br>
--- compiler-rt/trunk/test/msan/<a href="http://lit.site.cfg.in" target="_blank">lit.site.cfg.in</a> (original)<br>
+++ compiler-rt/trunk/test/msan/<a href="http://lit.site.cfg.in" target="_blank">lit.site.cfg.in</a> Tue Feb  9 10:18:15 2016<br>
@@ -1,5 +1,11 @@<br>
+## Autogenerated by LLVM/Clang configuration.<br>
+# Do not edit!<br>
+<br>
 # Load common config for all compiler-rt lit tests.<br>
 lit_config.load_config(config, "@COMPILER_RT_BINARY_DIR@/test/lit.common.configured")<br>
<br>
+# Tool-specific config options.<br>
+config.name_suffix = "@MSAN_TEST_CONFIG_SUFFIX@"<br>
+config.target_cflags = "@MSAN_TEST_TARGET_CFLAGS@"<br>
 # Load tool-specific config that would do the real work.<br>
 lit_config.load_config(config, "@MSAN_LIT_SOURCE_DIR@/lit.cfg")<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><u></u><u></u></p>
</div>
</div>
</div>
<p class="MsoNormal"><br>
<br clear="all">
<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<p class="MsoNormal">-- <u></u><u></u></p>
<div>
<div>
<p class="MsoNormal">Alexey Samsonov<br>
<a href="mailto:vonosmas@gmail.com" target="_blank">vonosmas@gmail.com</a><u></u><u></u></p>
</div>
</div>
</div>
</div></div></div>
</div>
</div>

</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Alexey Samsonov<br><a href="mailto:vonosmas@gmail.com" target="_blank">vonosmas@gmail.com</a></div></div>
</div></div>