<div dir="ltr">I believe locale codes are platform specific, so perhaps this ".932" is not present on these systems.  This was always a risk, but there's no other good way to test this.  Given that it's testing a very obscure error case, one option would be to remove the test.  Another would be to find out a correct locale code to use on each of the platforms.</div><br><div class="gmail_quote"><div dir="ltr">On Sun, Aug 6, 2017 at 2:28 AM Tim Hammerquist <<a href="mailto:penryu@gmail.com">penryu@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Zachary, Pavel,<div><br></div><div>I'm working on integrating the VASprintfTest.cpp test and other unittests into the Xcode project and I wonder if I can get some information about the EncodingError test in LLDB's VASprintfTest.cpp.</div><div><br></div><div>It seems to try to store the current locale; set the locale to a new, invalid locale; and then try to output a wide character (asserted to be invalid) before restoring the original locale and closing.</div><div><br></div><div>However, in practice, it seems to be failing to set the new locale (setlocale(3) returns nullptr) and the locale retains the same value it had on entering the test. In this case, any 7- or 8-bit locale will succeed ("C", "*/US-ASCII", "*/ISO8859-1", et al. will fail to render the provided Invalid characters) while wide-char friendly locales ("*/UTF-8") will succeed in representing the "Invalid" wchar_t string, causing the test to fail.</div><div><br></div><div>I've witnessed this behavior ('setlocale(LC_ALL, ".932") => nullptr) in Darwin, Linux, and FreeBSD and want to make sure I'm not misunderstanding something about how this test works. Do I understand this test correctly?</div><div><br></div><div>Thanks for your input!</div><div>-Tim</div><div><br></div></div><div class="gmail_extra"></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 17, 2017 at 7:42 AM, Zachary Turner via lldb-commits <span dir="ltr"><<a href="mailto:lldb-commits@lists.llvm.org" target="_blank">lldb-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>Sorry about that, it's often frustrating to check every single buildbot that was failing because 99% of the time they fail for exactly the same reason, and when one is fixed all of them get fixed.  In this case i used <a href="http://lab.llvm.org:8011/builders/lldb-amd64-ninja-freebsd11/builds/5417" class="m_6616305094455145816m_6098413623352410665gmail_msg" target="_blank">http://lab.llvm.org:8011/builders/lldb-amd64-ninja-freebsd11/builds/5417</a> as evidence that the change was good, but in hindsight this one doesn't run tests, so that was my mistake.<br class="m_6616305094455145816m_6098413623352410665gmail_msg"></div><div><br></div><div>Regarding the tests, i ran all of UtilityTests but not the whole test suite.  Again my mistake, was trying to cut corners and it backfired :(</div><div class="m_6616305094455145816HOEnZb"><div class="m_6616305094455145816h5"><div><br></div><div><br></div><div><br></div><div><div class="gmail_quote m_6616305094455145816m_6098413623352410665gmail_msg"><div class="m_6616305094455145816m_6098413623352410665gmail_msg">On Fri, Feb 17, 2017 at 2:35 AM Pavel Labath <<a href="mailto:labath@google.com" class="m_6616305094455145816m_6098413623352410665gmail_msg" target="_blank">labath@google.com</a>> wrote:<br class="m_6616305094455145816m_6098413623352410665gmail_msg"></div><blockquote class="gmail_quote m_6616305094455145816m_6098413623352410665gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hey Zach,<br class="m_6616305094455145816m_6098413623352410665gmail_msg">
<br class="m_6616305094455145816m_6098413623352410665gmail_msg">
after you think you've fixed the build, could you check back on the<br class="m_6616305094455145816m_6098413623352410665gmail_msg">
buildbot to make sure that it actually fixes things? In this case you<br class="m_6616305094455145816m_6098413623352410665gmail_msg">
would've seen that after the build is fixed, the next thing it runs<br class="m_6616305094455145816m_6098413623352410665gmail_msg">
into is about a dozen test failures.<br class="m_6616305094455145816m_6098413623352410665gmail_msg">
<br class="m_6616305094455145816m_6098413623352410665gmail_msg">
In fact, this breakage was something that would have been already<br class="m_6616305094455145816m_6098413623352410665gmail_msg">
caught by running the unit tests on windows, which leads me to believe<br class="m_6616305094455145816m_6098413623352410665gmail_msg">
you didn't run them before submission.<br class="m_6616305094455145816m_6098413623352410665gmail_msg">
<br class="m_6616305094455145816m_6098413623352410665gmail_msg">
Thanks,<br class="m_6616305094455145816m_6098413623352410665gmail_msg">
pl<br class="m_6616305094455145816m_6098413623352410665gmail_msg">
<br class="m_6616305094455145816m_6098413623352410665gmail_msg">
<br class="m_6616305094455145816m_6098413623352410665gmail_msg">
2017-02-16 20:15 GMT+00:00 Zachary Turner via lldb-commits<br class="m_6616305094455145816m_6098413623352410665gmail_msg">
<<a href="mailto:lldb-commits@lists.llvm.org" class="m_6616305094455145816m_6098413623352410665gmail_msg" target="_blank">lldb-commits@lists.llvm.org</a>>:<br class="m_6616305094455145816m_6098413623352410665gmail_msg">
> Author: zturner<br class="m_6616305094455145816m_6098413623352410665gmail_msg">
> Date: Thu Feb 16 14:15:26 2017<br class="m_6616305094455145816m_6098413623352410665gmail_msg">
> New Revision: 295369<br class="m_6616305094455145816m_6098413623352410665gmail_msg">
><br class="m_6616305094455145816m_6098413623352410665gmail_msg">
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=295369&view=rev" rel="noreferrer" class="m_6616305094455145816m_6098413623352410665gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project?rev=295369&view=rev</a><br class="m_6616305094455145816m_6098413623352410665gmail_msg">
> Log:<br class="m_6616305094455145816m_6098413623352410665gmail_msg">
> Fix build<br class="m_6616305094455145816m_6098413623352410665gmail_msg">
><br class="m_6616305094455145816m_6098413623352410665gmail_msg">
> Modified:<br class="m_6616305094455145816m_6098413623352410665gmail_msg">
>     lldb/trunk/source/Utility/VASprintf.cpp<br class="m_6616305094455145816m_6098413623352410665gmail_msg">
>     lldb/trunk/unittests/Utility/VASprintfTest.cpp<br class="m_6616305094455145816m_6098413623352410665gmail_msg">
><br class="m_6616305094455145816m_6098413623352410665gmail_msg">
> Modified: lldb/trunk/source/Utility/VASprintf.cpp<br class="m_6616305094455145816m_6098413623352410665gmail_msg">
> URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/VASprintf.cpp?rev=295369&r1=295368&r2=295369&view=diff" rel="noreferrer" class="m_6616305094455145816m_6098413623352410665gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/VASprintf.cpp?rev=295369&r1=295368&r2=295369&view=diff</a><br class="m_6616305094455145816m_6098413623352410665gmail_msg">
> ==============================================================================<br class="m_6616305094455145816m_6098413623352410665gmail_msg">
> --- lldb/trunk/source/Utility/VASprintf.cpp (original)<br class="m_6616305094455145816m_6098413623352410665gmail_msg">
> +++ lldb/trunk/source/Utility/VASprintf.cpp Thu Feb 16 14:15:26 2017<br class="m_6616305094455145816m_6098413623352410665gmail_msg">
> @@ -7,7 +7,7 @@<br class="m_6616305094455145816m_6098413623352410665gmail_msg">
>  //<br class="m_6616305094455145816m_6098413623352410665gmail_msg">
>  //===----------------------------------------------------------------------===//<br class="m_6616305094455145816m_6098413623352410665gmail_msg">
><br class="m_6616305094455145816m_6098413623352410665gmail_msg">
> -#include "lldb/Utility/VASprintf.h"<br class="m_6616305094455145816m_6098413623352410665gmail_msg">
> +#include "lldb/Utility/VASPrintf.h"<br class="m_6616305094455145816m_6098413623352410665gmail_msg">
><br class="m_6616305094455145816m_6098413623352410665gmail_msg">
>  #include "llvm/ADT/SmallString.h"<br class="m_6616305094455145816m_6098413623352410665gmail_msg">
><br class="m_6616305094455145816m_6098413623352410665gmail_msg">
><br class="m_6616305094455145816m_6098413623352410665gmail_msg">
> Modified: lldb/trunk/unittests/Utility/VASprintfTest.cpp<br class="m_6616305094455145816m_6098413623352410665gmail_msg">
> URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Utility/VASprintfTest.cpp?rev=295369&r1=295368&r2=295369&view=diff" rel="noreferrer" class="m_6616305094455145816m_6098413623352410665gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Utility/VASprintfTest.cpp?rev=295369&r1=295368&r2=295369&view=diff</a><br class="m_6616305094455145816m_6098413623352410665gmail_msg">
> ==============================================================================<br class="m_6616305094455145816m_6098413623352410665gmail_msg">
> --- lldb/trunk/unittests/Utility/VASprintfTest.cpp (original)<br class="m_6616305094455145816m_6098413623352410665gmail_msg">
> +++ lldb/trunk/unittests/Utility/VASprintfTest.cpp Thu Feb 16 14:15:26 2017<br class="m_6616305094455145816m_6098413623352410665gmail_msg">
> @@ -7,7 +7,7 @@<br class="m_6616305094455145816m_6098413623352410665gmail_msg">
>  //<br class="m_6616305094455145816m_6098413623352410665gmail_msg">
>  //===----------------------------------------------------------------------===//<br class="m_6616305094455145816m_6098413623352410665gmail_msg">
><br class="m_6616305094455145816m_6098413623352410665gmail_msg">
> -#include "lldb/Utility/VASprintf.h"<br class="m_6616305094455145816m_6098413623352410665gmail_msg">
> +#include "lldb/Utility/VASPrintf.h"<br class="m_6616305094455145816m_6098413623352410665gmail_msg">
>  #include "llvm/ADT/SmallString.h"<br class="m_6616305094455145816m_6098413623352410665gmail_msg">
><br class="m_6616305094455145816m_6098413623352410665gmail_msg">
>  #include "gtest/gtest.h"<br class="m_6616305094455145816m_6098413623352410665gmail_msg">
><br class="m_6616305094455145816m_6098413623352410665gmail_msg">
><br class="m_6616305094455145816m_6098413623352410665gmail_msg">
> _______________________________________________<br class="m_6616305094455145816m_6098413623352410665gmail_msg">
> lldb-commits mailing list<br class="m_6616305094455145816m_6098413623352410665gmail_msg">
> <a href="mailto:lldb-commits@lists.llvm.org" class="m_6616305094455145816m_6098413623352410665gmail_msg" target="_blank">lldb-commits@lists.llvm.org</a><br class="m_6616305094455145816m_6098413623352410665gmail_msg">
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits" rel="noreferrer" class="m_6616305094455145816m_6098413623352410665gmail_msg" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits</a><br class="m_6616305094455145816m_6098413623352410665gmail_msg">
</blockquote></div></div>
</div></div><br>_______________________________________________<br>
lldb-commits mailing list<br>
<a href="mailto:lldb-commits@lists.llvm.org" target="_blank">lldb-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div></div><div class="gmail_extra">-- <br><div class="m_6616305094455145816gmail_signature" data-smartmail="gmail_signature">Tim <<a href="mailto:penryu@gmail.com" target="_blank">penryu@gmail.com</a>></div>
</div></blockquote></div>