<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Apr 29, 2015 at 11:31 AM, Teresa Johnson <span dir="ltr"><<a href="mailto:tejohnson@google.com" target="_blank">tejohnson@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Wed, Apr 29, 2015 at 11:19 AM, David Blaikie <<a href="mailto:dblaikie@gmail.com">dblaikie@gmail.com</a>> wrote:<br>
><br>
><br>
> On Wed, Apr 29, 2015 at 10:55 AM, Teresa Johnson <<a href="mailto:tejohnson@google.com">tejohnson@google.com</a>><br>
> wrote:<br>
>><br>
>> On Wed, Apr 29, 2015 at 10:05 AM, David Blaikie <<a href="mailto:dblaikie@gmail.com">dblaikie@gmail.com</a>><br>
>> wrote:<br>
>> ><br>
>> ><br>
>> > On Wed, Apr 29, 2015 at 9:48 AM, Teresa Johnson <<a href="mailto:tejohnson@google.com">tejohnson@google.com</a>><br>
>> > wrote:<br>
>> >><br>
>> >> Ok, thanks for the suggestion. I will rework the tests to do that.<br>
>> ><br>
>> ><br>
>> > In case you haven't found it already, %T in the lit syntax gives you a<br>
>> > uniquely named directory for the test<br>
>><br>
>> Actually %T is just the base directory where all the<br>
>> compiler-rt/profile tests are run, not unique per .c test.<br>
><br>
><br>
> Ah, sorry for the misleading advice - thanks for the correction.<br>
><br>
>><br>
>> I fixed the<br>
>> tests by creating a "%t.d" directory and cd'ing into it and generating<br>
>> all output locally in that directory.<br>
><br>
><br>
> A quick "grep -r "RUN.*mkdir" certainly shows a few tests doing quite<br>
> similar things (most use -p, which I see you've done too).<br>
><br>
> You'll probably also need REQUIRES: shell in this test to ensure it doesn't<br>
> run in environments that don't have a full bash-like shell available (such<br>
> as Windows). Check the other tests that use mkdir to see that sort of thing.<br>
<br>
</span>Some have the "REQUIRES: shell" (e.g.<br>
tools/clang/test/VFS/include-virtual-from-real.c) and some don't (e.g.<br>
./tools/clang/test/Analysis/html-diags.c). I looked around for<br>
documentation on when "REQUIRES: shell" is needed but couldn't find<br>
anything specific. The latter test (html-diags.c), which doesn't have<br>
the REQUIRES also does mkdir -p, cd, rm -rf", which are the same<br>
shell-like operations my tests are doing. The former<br>
(include-virtual-from-real.c) is doing some additional shell-like<br>
operations such as sed and echo, which I am not doing. </blockquote><div><br>Sounds plausible then.<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Is there a list<br>
of operations safe to do without adding the "REQUIRES: shell"?<br></blockquote><div><br>Not that I know of. Usually a bit of "oh, this fails on a windows buildbot -> slap REQUIRES: shell on it" (maybe other people know more). But as you've seen tests that don't seem to require it and do the same things your test does - just go with it & if buildbots fail we'll figure it out then.<br><br>- David<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Thanks,<br>
Teresa<br>
<div class="HOEnZb"><div class="h5"><br>
><br>
>><br>
>><br>
>> Patch uploaded here, PTAL:<br>
>> <a href="http://reviews.llvm.org/D9349" target="_blank">http://reviews.llvm.org/D9349</a><br>
>><br>
>> Thanks,<br>
>> Teresa<br>
>><br>
>> ><br>
>> >><br>
>> >> Teresa<br>
>> >><br>
>> >> On Wed, Apr 29, 2015 at 9:47 AM, Eric Christopher <<a href="mailto:echristo@gmail.com">echristo@gmail.com</a>><br>
>> >> wrote:<br>
>> >> ><br>
>> >> ><br>
>> >> > On Wed, Apr 29, 2015 at 9:36 AM Justin Bogner <<a href="mailto:mail@justinbogner.com">mail@justinbogner.com</a>><br>
>> >> > wrote:<br>
>> >> >><br>
>> >> >> Teresa Johnson <<a href="mailto:tejohnson@google.com">tejohnson@google.com</a>> writes:<br>
>> >> >> > On Wed, Apr 29, 2015 at 6:27 AM, Renato Golin<br>
>> >> >> > <<a href="mailto:renato.golin@linaro.org">renato.golin@linaro.org</a>><br>
>> >> >> > wrote:<br>
>> >> >> >> On 29 April 2015 at 14:16, Teresa Johnson <<a href="mailto:tejohnson@google.com">tejohnson@google.com</a>><br>
>> >> >> >> wrote:<br>
>> >> >> >>> Two of the compiler-rt/profile tests I added are checking for<br>
>> >> >> >>> similar<br>
>> >> >> >>> behavior with resetting the filename to the default. I wonder if<br>
>> >> >> >>> they<br>
>> >> >> >>> are running in parallel and clobbering each other since the<br>
>> >> >> >>> profile<br>
>> >> >> >>> output names are not unique after the reset.<br>
>> >> >> >><br>
>> >> >> >> Hi Teresa,<br>
>> >> >> >><br>
>> >> >> >> This would explain the intermittent failures. Maybe making the<br>
>> >> >> >> names<br>
>> >> >> >> unique would fix the issues, would that be an easy change?<br>
>> >> >> ><br>
>> >> >> > After thinking about it I believe this is what is most likely<br>
>> >> >> > happening, and that these two new tests I added will need to be<br>
>> >> >> > reverted:<br>
>> >> >> ><br>
>> >> >> ><br>
>> >> >> ><br>
>> >> >> ><br>
>> >> >> > compiler-rt/trunk/test/profile/instrprof-override-filename-then-reset-default.c<br>
>> >> >> ><br>
>> >> >> ><br>
>> >> >> ><br>
>> >> >> > compiler-rt/trunk/test/profile/instrprof-set-filename-then-reset-default.c<br>
>> >> >> ><br>
>> >> >> > since they aren't writing to unique output names. These are 2 of<br>
>> >> >> > the<br>
>> >> >> > 4<br>
>> >> >> > tests added in r236056 (the other two are fine).<br>
>> >> >> ><br>
>> >> >> > They can't be changed to write to a unique name since those tests<br>
>> >> >> > were<br>
>> >> >> > specifically testing that the profile output name gets reset to<br>
>> >> >> > the<br>
>> >> >> > default when null is passed to the profile filename setting<br>
>> >> >> > interfaces. The other profile tests use unique names.<br>
>> >> >><br>
>> >> >> Could we have these tests `cd` into a uniquely named directory or<br>
>> >> >> something? Maybe that's more complicated than its worth.<br>
>> >> >><br>
>> >> ><br>
>> >> > That's what we've done in the past and seems a reasonable idea.<br>
>> >> ><br>
>> >> > -eric<br>
>> >> ><br>
>> >> >><br>
>> >> >> > Since I don't have write access yet, can someone revert those two<br>
>> >> >> > files for me?<br>
>> >> >> ><br>
>> >> >> > Thanks,<br>
>> >> >> > Teresa<br>
>> >> >> >><br>
>> >> >> >> cheers,<br>
>> >> >> >> --renato<br>
>> >> >> _______________________________________________<br>
>> >> >> LLVM Developers mailing list<br>
>> >> >> <a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
>> >> >> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
>> >><br>
>> >><br>
>> >><br>
>> >> --<br>
>> >> Teresa Johnson | Software Engineer | <a href="mailto:tejohnson@google.com">tejohnson@google.com</a> |<br>
>> >> <a href="tel:408-460-2413" value="+14084602413">408-460-2413</a><br>
>> >> _______________________________________________<br>
>> >> LLVM Developers mailing list<br>
>> >> <a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
>> >> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
>> ><br>
>> ><br>
>><br>
>><br>
>><br>
>> --<br>
>> Teresa Johnson | Software Engineer | <a href="mailto:tejohnson@google.com">tejohnson@google.com</a> | <a href="tel:408-460-2413" value="+14084602413">408-460-2413</a><br>
><br>
><br>
<br>
<br>
<br>
--<br>
Teresa Johnson | Software Engineer | <a href="mailto:tejohnson@google.com">tejohnson@google.com</a> | <a href="tel:408-460-2413" value="+14084602413">408-460-2413</a><br>
</div></div></blockquote></div><br></div></div>