[libcxx-commits] [libcxx] 9286a82 - [libcxx] [test] XFAIL the get/put long_double_ru_RU tests on Glibc < 2.27
Martin Storsjö via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Mar 9 00:18:16 PST 2022
Author: Martin Storsjö
Date: 2022-03-09T10:17:20+02:00
New Revision: 9286a8238b948471a99834aaf4ea1316621f415f
URL: https://github.com/llvm/llvm-project/commit/9286a8238b948471a99834aaf4ea1316621f415f
DIFF: https://github.com/llvm/llvm-project/commit/9286a8238b948471a99834aaf4ea1316621f415f.diff
LOG: [libcxx] [test] XFAIL the get/put long_double_ru_RU tests on Glibc < 2.27
Those older versions used a different monetary decimal separator.
To avoid unnecessary churn to support that, just XFAIL the test
on those older versions. (Up until
df1e43c496b43e998f66c610b0e15a0951f316b3, the whole test was XFAILed
on all versions of glibc.)
Differential Revision: https://reviews.llvm.org/D120979
Added:
Modified:
libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_ru_RU.pass.cpp
libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_ru_RU.pass.cpp
libcxx/utils/libcxx/test/features.py
Removed:
################################################################################
diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_ru_RU.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_ru_RU.pass.cpp
index d9c916e47b77a..e680f2ea8816a 100644
--- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_ru_RU.pass.cpp
+++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_ru_RU.pass.cpp
@@ -11,6 +11,8 @@
// REQUIRES: locale.ru_RU.UTF-8
+// XFAIL: glibc-old-ru_RU-decimal-point
+
// <locale>
// class money_get<charT, InputIterator>
diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_ru_RU.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_ru_RU.pass.cpp
index ae5071907aca4..4aea1016e735b 100644
--- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_ru_RU.pass.cpp
+++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_ru_RU.pass.cpp
@@ -11,6 +11,8 @@
// REQUIRES: locale.ru_RU.UTF-8
+// XFAIL: glibc-old-ru_RU-decimal-point
+
// <locale>
// class money_put<charT, OutputIterator>
diff --git a/libcxx/utils/libcxx/test/features.py b/libcxx/utils/libcxx/test/features.py
index a27647b05d625..13d2765ebe3eb 100644
--- a/libcxx/utils/libcxx/test/features.py
+++ b/libcxx/utils/libcxx/test/features.py
@@ -105,6 +105,18 @@ def _hasSuitableClangTidy(cfg):
}
""")),
+ # Check for Glibc < 2.27, where the ru_RU.UTF-8 locale had
+ # mon_decimal_point == ".", which our tests don't handle.
+ Feature(name='glibc-old-ru_RU-decimal-point',
+ when=lambda cfg: not '_LIBCPP_HAS_NO_LOCALIZATION' in compilerMacros(cfg) and not programSucceeds(cfg, """
+ #include <locale.h>
+ #include <string.h>
+ int main(int, char**) {
+ setlocale(LC_ALL, "ru_RU.UTF-8");
+ return strcmp(localeconv()->mon_decimal_point, ",");
+ }
+ """)),
+
# Whether Bash can run on the executor.
# This is not always the case, for example when running on embedded systems.
#
More information about the libcxx-commits
mailing list