<div dir="ltr">On 30 January 2014 02:10, David Chisnall <span dir="ltr"><<a href="mailto:David.Chisnall@cl.cam.ac.uk" target="_blank">David.Chisnall@cl.cam.ac.uk</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 30 Jan 2014, at 00:04, Nick Lewycky <<a href="mailto:nlewycky@google.com">nlewycky@google.com</a>> wrote:<br>


<br>
> This is also what many clang tests do, where TUs get parsed using the host triple. If we keep target datalayout out of the test files and fill it in with the host's information, then our test coverage expands as our buildbot diversity grows, which is a neat property.<br>


<br>
</div>Unfortunately, reproducibility suffers.  You commit a change, a test fails on two buildbots but passes on all of the others and on your local system.  Now what do you do?</blockquote><div><br></div><div>There's two issues here. One is what to do if we encounter a .ll/.bc with no target data. We're obliged to support llvm 3.0 bitcode files, so we need to have an answer to this question.</div>

<div><br></div><div>Second is what to do in our test suite. If the answer to the first question is "make it use the host target data" then the second part is a choice either to leave the tests with no explicit layout and thereby use the host target, or to require that tests in the testsuite specify their datalayout. The tradeoff is that in one case we get more coverage across different machines, and in the other case we get better reproducibility, which is important for a regression suite or for a new user to verify that their build of llvm is valid.</div>

<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">  I've already hit this problem in clang, with host-defined tool search paths leaking into the tests and causing them to fail on Windows only.  It's hard to fix a bug that causes a buildbot failure if you can't reproduce it.  At the very least, the target / data layout should be in the failure message that the test suite generates in case of failure so that you can reproduce it locally if a buildbot reports failure.<br>

</blockquote><div><br></div><div>Exactly. As long as it's easy to grab the target datalayout from a buildbot, we can slap it into our .ll file and reproduce the failure.</div><div><br></div><div>I can see both sides, and I know my preference, but I'd like to form consensus.</div>

<div><br></div><div>Nick</div></div></div></div>