[libcxx-commits] [libcxx] acf2000 - [libcxx] [test] Fix one failing part of dsl.sh.py on Windows.

Martin Storsjö via libcxx-commits libcxx-commits at lists.llvm.org
Sun Feb 27 12:08:34 PST 2022


Author: Martin Storsjö
Date: 2022-02-27T22:06:18+02:00
New Revision: acf20001a01119ce02d5f2b0282e5a7c966ca12c

URL: https://github.com/llvm/llvm-project/commit/acf20001a01119ce02d5f2b0282e5a7c966ca12c
DIFF: https://github.com/llvm/llvm-project/commit/acf20001a01119ce02d5f2b0282e5a7c966ca12c.diff

LOG: [libcxx] [test] Fix one failing part of dsl.sh.py on Windows.

Windows UCRT has got a bug in older versions (present in CI), where
it successfully does set a locale named
`for_sure_this_is_not_an_existing_locale`. By adjusting the tested
locale name to `forsurethisisnotanexistinglocale`, that test works
as expected, failing to set the locale.

The bug is reported upstream at
https://developercommunity.visualstudio.com/t/setlocale-succeeds-for-bogus-locale-names-in-older/1652241,
but as it already is working correctly in newer versions, no action
was prompted there.

We could of course add a bug detection in features.py like other
existing `broken-*` features, but that would seem kinda
pointless as it would be doing exactly what this test does.
Instead just adjust the tested dummy locale name.

This bit was approved to be committed on its own, in
https://reviews.llvm.org/D120546 (which is left open to follow up on
review of the rest of that patch).

Added: 
    

Modified: 
    libcxx/test/libcxx/selftest/dsl/dsl.sh.py

Removed: 
    


################################################################################
diff  --git a/libcxx/test/libcxx/selftest/dsl/dsl.sh.py b/libcxx/test/libcxx/selftest/dsl/dsl.sh.py
index f4c48549a7c2d..d11b2382ad7ae 100644
--- a/libcxx/test/libcxx/selftest/dsl/dsl.sh.py
+++ b/libcxx/test/libcxx/selftest/dsl/dsl.sh.py
@@ -251,7 +251,7 @@ def test_doesnt_explode(self):
             self.fail("checking for hasLocale should not explode")
 
     def test_nonexistent_locale(self):
-        self.assertFalse(dsl.hasAnyLocale(self.config, ['for_sure_this_is_not_an_existing_locale']))
+        self.assertFalse(dsl.hasAnyLocale(self.config, ['forsurethisisnotanexistinglocale']))
 
     def test_localization_program_doesnt_compile(self):
         compilerIndex = findIndex(self.config.substitutions, lambda x: x[0] == '%{cxx}')


        


More information about the libcxx-commits mailing list