<div dir="ltr">If you look at the test output, you can see there are other issues here:<div><a href="http://lab.llvm.org:8011/builders/clang-x86-windows-msvc2015/builds/227/steps/ninja%20check%201/logs/FAIL%3A%20LLVM%3A%3Anative_separators.c">http://lab.llvm.org:8011/builders/clang-x86-windows-msvc2015/builds/227/steps/ninja%20check%201/logs/FAIL%3A%20LLVM%3A%3Anative_separators.c</a><br></div><div><br></div><div>$ ...</div><div><div># command stderr:</div><div>error: /tmp/native_separators.c: no such file or directory</div><div>warning: The file '/tmp/native_separators.c' isn't covered.</div><div><br></div><div>$ ...</div><div># command stderr:</div><div>error: ../C:/b/slave/clang-x86-windows-msvc2015/clang-x86-windows-msvc2015/stage1/./bin\llvm-config.EXE/../C:/b/slave/clang-x86-windows-msvc2015/clang-x86-windows-msvc2015/stage1/./bin\llvm-cov.EXE/native_separators.c: invalid argument</div><div>warning: The file '/tmp/native_separators.c' isn't covered.</div></div><div><br></div><div>I think you should add quotes into the llvm-config and llvm-cov parts of that command to avoid the expansion from the directory name to the path to the tool, like /llvm-"config"/ and /llvm-"cov"/. The shell will interpret those strings correctly.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Sep 9, 2016 at 10:51 AM, Vedant Kumar via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks Maggie! The patch looks good, committed as r281062.<br>
<br>
Yaron, you're seeing the assertion failure because the html coverage renderer<br>
expects the covmapping file to be younger than the source files it displays.<br>
The covmapping file encodes source region information which the renderer<br>
depends on. When you changed the length of the "TEXT-INDEX" line, the renderer<br>
got upset and claimed it couldn't figure out how to display that line.<br>
<br>
Maybe it's time to remove the asserts... In Release mode, the renderer behaves<br>
gracefully when these assertions fail.<br>
<br>
vedant<br>
<div><div class="h5"><br>
> On Sep 9, 2016, at 4:43 AM, Ying Yi <<a href="mailto:maggieyi666@gmail.com">maggieyi666@gmail.com</a>> wrote:<br>
><br>
> Hi,<br>
><br>
> Since the test only runs on Windows machine and the native separator on Windows is ‘\’, we shouldn’t change the test. I attached a patch that fixes the issue.<br>
><br>
> @Vedant, could you please review the patch? Please feel free to commit the patch if you are happy with it.<br>
><br>
> Thanks,<br>
><br>
> On Fri, Sep 9, 2016 at 10:46 AM, Yaron Keren <<a href="mailto:yaron.keren@gmail.com">yaron.keren@gmail.com</a>> wrote:<br>
> Hi,<br>
><br>
> this still fails due to wrong path seperator. I tried to apply the usual fix:<br>
><br>
> // TEXT-INDEX: {{/|\\}}tmp{{/|\\}}native_<wbr>separators.c<br>
><br>
> but then an assert fails<br>
><br>
><br>
> $ "C:/llvm-clean/msvc/<wbr>RelWithDebInfo/bin\FileCheck.<wbr>EXE" "-check-prefixes=TEXT-INDEX" "-input-file=C:\llvm-clean\<wbr>msvc\test\tools\llvm-cov\<wbr>Output\native_separators.c.<wbr>tmp.dir/index.txt" "C:\llvm-clean\test\tools\<wbr>llvm-cov\native_separators.c" $ "C:/llvm-clean/msvc/<wbr>RelWithDebInfo/bin\llvm-cov.<wbr>EXE" "show" "-format=html" "C:\llvm-clean\test\tools\<wbr>llvm-cov/Inputs/native_<wbr>separators.covmapping" "-instr-profile=C:\llvm-clean\<wbr>msvc\test\tools\llvm-cov\<wbr>Output\native_separators.c.<wbr>tmp.profdata" "-filename-equivalence" "../C:/llvm-clean/msvc/<wbr>RelWithDebInfo/bin\llvm-<wbr>config.EXE/../C:/llvm-clean/<wbr>msvc/RelWithDebInfo/bin\llvm-<wbr>cov.EXE/native_separators.c" "-o" "C:\llvm-clean\msvc\test\<wbr>tools\llvm-cov\Output\native_<wbr>separators.c.tmp.dir"<br>
> # command stderr:<br>
> error: ../C:/llvm-clean/msvc/<wbr>RelWithDebInfo/bin\llvm-<wbr>config.EXE/../C:/llvm-clean/<wbr>msvc/RelWithDebInfo/bin\llvm-<wbr>cov.EXE/native_separators.c: invalid argument<br>
> warning: The file '/tmp/native_separators.c' isn't covered.<br>
><br>
> $ "C:/llvm-clean/msvc/<wbr>RelWithDebInfo/bin\FileCheck.<wbr>EXE" "-check-prefixes=HTML-INDEX" "-input-file=C:\llvm-clean\<wbr>msvc\test\tools\llvm-cov\<wbr>Output\native_separators.c.<wbr>tmp.dir/index.html" "C:\llvm-clean\test\tools\<wbr>llvm-cov\native_separators.c"<br>
><br>
> $ "C:/llvm-clean/msvc/<wbr>RelWithDebInfo/bin\llvm-cov.<wbr>EXE" "show" "-format=html" "C:\llvm-clean\test\tools\<wbr>llvm-cov/Inputs/native_<wbr>separators.covmapping" "-instr-profile=C:\llvm-clean\<wbr>msvc\test\tools\llvm-cov\<wbr>Output\native_separators.c.<wbr>tmp.profdata" "-filename-equivalence" "C:\llvm-clean\test\tools\<wbr>llvm-cov\native_separators.c" "-o" "C:\llvm-clean\msvc\test\<wbr>tools\llvm-cov\Output\native_<wbr>separators.c.tmp.dir"<br>
> # command stderr:<br>
> Assertion failed: Start + Len <= Line.size() && "Snippet extends past the EOL", file C:\llvm-clean\tools\llvm-cov\<wbr>SourceCoverageViewHTML.cpp, line 476<br>
><br>
><br>
><br>
> as Ying wrote, if the line<br>
><br>
> // RUN: FileCheck -check-prefixes=TEXT-INDEX -input-file=%t.dir/index.txt %s<br>
><br>
> is removed the test passes.<br>
><br>
> Yaron<br>
><br>
><br>
><br>
> 2016-09-09 12:43 GMT+03:00 Ying Yi via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>>:<br>
> Hi Vedant,<br>
><br>
><br>
><br>
> >Could you help test this out? I don't have a Windows machine available.<br>
><br>
> Of course. The test still fails but for a different reason. It currently fails when running the following test:<br>
><br>
><br>
><br>
> // RUN: llvm-cov show %S/Inputs/native_separators.<wbr>covmapping -instr-profile=%t.profdata -o %t.dir<br>
><br>
> // RUN: FileCheck -check-prefixes=TEXT-INDEX -input-file=%t.dir/index.txt %s<br>
><br>
> // TEXT-INDEX: \tmp\native_separators.c<br>
><br>
><br>
><br>
> The test expects that the native separators are used in the source files list in both text and html index pages.<br>
><br>
> With the latest llvm-cov, only the source file list in the index.html file uses the native separators. The index.txt file does not use the native separators in the source file list.<br>
><br>
><br>
><br>
> If I remove the single test above, the rest of the native_separators.c tests pass.<br>
><br>
><br>
><br>
> Please let me know if you need any further information.<br>
><br>
><br>
><br>
> Regard,<br>
><br>
> Maggie<br>
><br>
><br>
> On Fri, Sep 9, 2016 at 2:43 AM, Vedant Kumar <<a href="mailto:vsk@apple.com">vsk@apple.com</a>> wrote:<br>
> Hi Maggie,<br>
><br>
> Sorry for breaking this test!<br>
><br>
> Could you help test this out? I don't have a Windows machine available.<br>
><br>
> thanks!<br>
> vedant<br>
><br>
> > On Sep 8, 2016, at 6:32 PM, Vedant Kumar via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br>
> ><br>
> > Author: vedantk<br>
> > Date: Thu Sep  8 20:32:47 2016<br>
> > New Revision: 281008<br>
> ><br>
> > URL: <a href="http://llvm.org/viewvc/llvm-project?rev=281008&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project?rev=281008&view=rev</a><br>
> > Log:<br>
> > [llvm-cov] Speculate fix for a Windows-only test (NFC)<br>
> ><br>
> > This test should have broken after r280896. Fix up the test case<br>
> > speculatively, since I don't have a way to test it.<br>
> ><br>
> > I wonder why I didn't get any angry bot emails about this. Maybe none of<br>
> > the win32 bots test llvm-cov? That could explain it, since the test says<br>
> > it 'REQUIRES: system-windows', which is restricted to win32 hosts.<br>
> ><br>
> > Also: why is 'system-windows' not defined for non-win32 Windows bots?<br>
> ><br>
> > Modified:<br>
> >    llvm/trunk/test/tools/llvm-<wbr>cov/native_separators.c<br>
> ><br>
> > Modified: llvm/trunk/test/tools/llvm-<wbr>cov/native_separators.c<br>
> > URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-cov/native_separators.c?rev=281008&r1=281007&r2=281008&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/llvm/trunk/test/tools/<wbr>llvm-cov/native_separators.c?<wbr>rev=281008&r1=281007&r2=<wbr>281008&view=diff</a><br>
> > ==============================<wbr>==============================<wbr>==================<br>
> > --- llvm/trunk/test/tools/llvm-<wbr>cov/native_separators.c (original)<br>
> > +++ llvm/trunk/test/tools/llvm-<wbr>cov/native_separators.c Thu Sep  8 20:32:47 2016<br>
> > @@ -15,15 +15,13 @@<br>
> ><br>
> > // TEXT-INDEX: \tmp\native_separators.c<br>
> > // HTML-INDEX: >tmp\native_separators.c</a><br>
> > -// HTML: <pre>Source: \tmp\native_separators.c</pre><br>
> > -// HTML: tools\llvm-cov\Inputs\native_<wbr>separators.covmapping</pre><br>
> > +// HTML: <pre>Source: \tmp\native_separators.c (Binary: native_separators.covmapping)<<wbr>/pre><br>
> ><br>
> > int main() {}<br>
> ><br>
> > // RUN: llvm-cov show %S/Inputs/native_separators.<wbr>covmapping -instr-profile=%t.profdata -filename-equivalence %s -o %t.dir<br>
> > // RUN: FileCheck -check-prefixes=TEXT -input-file=%t.dir/coverage/<wbr>tmp/native_separators.c.txt %s<br>
> > -// TEXT: {{^}}Source: \tmp\native_separators.c:{{$}}<br>
> > -// TEXT: {{^}}Binary: {{.*}}tools\llvm-cov\Inputs\<wbr>native_separators.covmapping:{<wbr>{$}}<br>
> > +// TEXT: Source: \tmp\native_separators.c (Binary: native_separators.covmapping)<br>
> ><br>
> > // Re-purpose this file to test that "Go to first unexecuted line" feature.<br>
> ><br>
> ><br>
> ><br>
> > ______________________________<wbr>_________________<br>
> > llvm-commits mailing list<br>
> > <a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
> > <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-commits</a><br>
><br>
><br>
><br>
><br>
> --<br>
> Ying Yi<br>
> SN Systems - Sony Interactive Entertainment<br>
><br>
> ______________________________<wbr>_________________<br>
> llvm-commits mailing list<br>
> <a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-commits</a><br>
><br>
><br>
><br>
><br>
><br>
> --<br>
> Ying Yi<br>
> SN Systems - Sony Interactive Entertainment<br>
</div></div>> <native.patch><br>
<div class="HOEnZb"><div class="h5"><br>
______________________________<wbr>_________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-commits</a><br>
</div></div></blockquote></div><br></div>