From acf20001a01119ce02d5f2b0282e5a7c966ca12c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Mon, 10 Jan 2022 23:08:19 +0000 Subject: [PATCH] [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). --- libcxx/test/libcxx/selftest/dsl/dsl.sh.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcxx/test/libcxx/selftest/dsl/dsl.sh.py b/libcxx/test/libcxx/selftest/dsl/dsl.sh.py index f4c48549a7c2..d11b2382ad7a 100644 --- a/libcxx/test/libcxx/selftest/dsl/dsl.sh.py +++ b/libcxx/test/libcxx/selftest/dsl/dsl.sh.py @@ -251,7 +251,7 @@ class TestHasLocale(SetupConfigs): 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}')