[Lldb-commits] [PATCH] D88975: [LLDB] On Windows, fix tests

Adrian McCarthy via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Oct 7 11:25:10 PDT 2020


amccarth added a comment.

It's interesting that I haven't encountered some of these errors.  There are five _other_ lldb tests that do fail for me.  I have a fix in the works for some of those.

I agree with @labath that including error message patterns in various languages isn't scalable. Since dotest,py is starting up the processes under test, perhaps there's a way to force it to use a particular locale.  Besides the language of system error messages, locales can change the format of numbers, dates, etc.

Unfortunately, I don't think it's as simple as an environment variable.  I expect this is driven by the user's (or system default) locales settings as tracked by Windows.  That's distinct from the C runtime concept of locales.

Maybe dotest.py could change its own Windows locale setting and the processes it spawns would inherit that.  I don't know if that would work, but I don't see a good alternative.



================
Comment at: lldb/unittests/Utility/StatusTest.cpp:80
+  if (wcscmp(L"en-US", name) != 0)
+    return;
+
----------------
Rather than an early return, perhaps the code should still be exercised, but the language-specific EXPECTs could be skipped.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D88975/new/

https://reviews.llvm.org/D88975



More information about the lldb-commits mailing list