<div dir="ltr">Eric,<div><br></div><div>Some tests appear to fail if the path to the tests' current directory has some symlinks in it.</div><div>In my case source and build tree are in directory 'work' that's symlinked to from my home directory:</div><div>/usr/local/home/tra/work -> /work/tra<br></div><div><br></div><div>This causes multiple failures in libcxx tests. One example:</div><div><br></div><div>projects/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.rename/rename.pass.cpp:121<br></div><div><div>121<span class="gmail-Apple-tab-span" style="white-space:pre"> </span> TEST_CHECK(read_symlink(bad_sym_dest) == dne);</div></div><div><br></div><div>dne: </div><div> /usr/local/home/tra/work/llvm/build/gpu/debug/projects/libcxx/test/filesystem/Output/dynamic_env/test.529143/dne</div><div>bad_sym_dest: </div><div> /usr/local/home/tra/work/llvm/build/gpu/debug/projects/libcxx/test/filesystem/Output/dynamic_env/test.529143/bad_sym2</div><div><br></div><div>These are the paths that traverse the 'work' symlink in my home directory. However, the symlink that we're reading contains physical path to the directory. While it does link to the right place, it's not the path the test expects. </div><div><br></div><div>#readlink /usr/local/home/tra/work/llvm/build/gpu/debug/projects/libcxx/test/filesystem/Output/dynamic_env/test.529143/bad_sym2</div><div>/work/tra/llvm/build/gpu/debug/projects/libcxx/test/filesystem/Output/dynamic_env/test.529143/dne</div><div><br></div><div>I think we need to normalize paths before we compare them.</div><div><br></div><div>--Artem</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jun 18, 2016 at 12:03 PM, Eric Fiselier via cfe-commits <span dir="ltr"><<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-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"><div dir="ltr"><span class="">> <span style="font-size:12.8px">I assume the correct way to fix this is to disable -Wcovered-switch-default while compiling libcxx/src/experimental/</span><span style="font-size:12.8px">filesystem/operations.cpp</span><br style="font-size:12.8px"><div><span style="font-size:12.8px"><br></span></div></span><div><span style="font-size:12.8px">Agreed. Disabled in r273092.</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Thanks for your patience with this latest change,</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">/Eric</span></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jun 18, 2016 at 12:54 PM, Adrian Prantl <span dir="ltr"><<a href="mailto:aprantl@apple.com" target="_blank">aprantl@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello Eric,<br>
<br>
this commit causes new warnings on our bots:<br>
<br>
clang/src/projects/libcxx/include/fstream:816:5: warning: default label in switch which covers all enumeration values [-Wcovered-switch-default]<br>
default:<br>
<br>
The problem is with this defensive default statement in fstream:<br>
<br>
<br>
template <class _CharT, class _Traits><br>
0792 typename basic_filebuf<_CharT, _Traits>::pos_type<br>
0793 basic_filebuf<_CharT, _Traits>::seekoff(off_type __off, ios_base::seekdir __way,<br>
0794 ios_base::openmode)<br>
0795 {<br>
0796 #ifndef _LIBCPP_NO_EXCEPTIONS<br>
0797 if (!__cv_)<br>
0798 throw bad_cast();<br>
0799 #endif<br>
0800 int __width = __cv_->encoding();<br>
0801 if (__file_ == 0 || (__width <= 0 && __off != 0) || sync())<br>
0802 return pos_type(off_type(-1));<br>
0803 // __width > 0 || __off == 0<br>
0804 int __whence;<br>
0805 switch (__way)<br>
0806 {<br>
0807 case ios_base::beg:<br>
0808 __whence = SEEK_SET;<br>
0809 break;<br>
0810 case ios_base::cur:<br>
0811 __whence = SEEK_CUR;<br>
0812 break;<br>
0813 case ios_base::end:<br>
0814 __whence = SEEK_END;<br>
0815 break;<br>
0816 default:<br>
0817 return pos_type(off_type(-1));<br>
0818 }<br>
<br>
<br>
I assume the correct way to fix this is to disable -Wcovered-switch-default while compiling libcxx/src/experimental/filesystem/operations.cpp<br>
<br>
Could you please investigate?<br>
<br>
thanks,<br>
Adrian</blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">--Artem Belevich</div></div>
</div>