Skip to content

[libc++] Un-xfail module tests in picolibc tests #78580

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 18, 2024

Conversation

domin144
Copy link
Contributor

Some of the module tests now pass after picolibc update. #77908

The remaining tests fail and are now set to xfail on picolibc specifically.

Some of the module tests now pass after picolibc update.
llvm#77908

The remaining tests fail and are now set to xfail on picolibc
specifically.
@domin144 domin144 requested a review from a team as a code owner January 18, 2024 13:57
@llvmbot llvmbot added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label Jan 18, 2024
@llvmbot
Copy link
Member

llvmbot commented Jan 18, 2024

@llvm/pr-subscribers-libcxx

Author: Dominik Wójt (domin144)

Changes

Some of the module tests now pass after picolibc update. #77908

The remaining tests fail and are now set to xfail on picolibc specifically.


Full diff: https://github.com/llvm/llvm-project/pull/78580.diff

4 Files Affected:

  • (modified) libcxx/test/libcxx/selftest/modules/std-and-std.compat-module.sh.cpp (+4)
  • (modified) libcxx/test/libcxx/selftest/modules/std.compat-module.sh.cpp (+4)
  • (modified) libcxx/test/std/modules/std.compat.pass.cpp (+4)
  • (modified) libcxx/utils/libcxx/test/features.py (-1)
diff --git a/libcxx/test/libcxx/selftest/modules/std-and-std.compat-module.sh.cpp b/libcxx/test/libcxx/selftest/modules/std-and-std.compat-module.sh.cpp
index d56ebb2961d4ae..81241d7f43f9a1 100644
--- a/libcxx/test/libcxx/selftest/modules/std-and-std.compat-module.sh.cpp
+++ b/libcxx/test/libcxx/selftest/modules/std-and-std.compat-module.sh.cpp
@@ -12,6 +12,10 @@
 
 // XFAIL: has-no-cxx-module-support
 
+// picolibc does not provide the required timespec_get function, and the
+// "using-if-exists" mechanism apparently did not work here.
+// XFAIL: LIBCXX-PICOLIBC-FIXME
+
 // Make sure that the compile flags contain the expected elements.
 // The tests only look for the expected components and not the exact flags.
 // Otherwise changing the location of the module would break this test.
diff --git a/libcxx/test/libcxx/selftest/modules/std.compat-module.sh.cpp b/libcxx/test/libcxx/selftest/modules/std.compat-module.sh.cpp
index e84709853fbca1..b74c2f1a249fcc 100644
--- a/libcxx/test/libcxx/selftest/modules/std.compat-module.sh.cpp
+++ b/libcxx/test/libcxx/selftest/modules/std.compat-module.sh.cpp
@@ -12,6 +12,10 @@
 
 // XFAIL: has-no-cxx-module-support
 
+// picolibc does not provide the required timespec_get function, and the
+// "using-if-exists" mechanism apparently did not work here.
+// XFAIL: LIBCXX-PICOLIBC-FIXME
+
 // Make sure that the compile flags contain the expected elements.
 // The tests only look for the expected components and not the exact flags.
 // Otherwise changing the location of the module would break this test.
diff --git a/libcxx/test/std/modules/std.compat.pass.cpp b/libcxx/test/std/modules/std.compat.pass.cpp
index e840f3c6b629cf..40ea979e273465 100644
--- a/libcxx/test/std/modules/std.compat.pass.cpp
+++ b/libcxx/test/std/modules/std.compat.pass.cpp
@@ -12,6 +12,10 @@
 
 // XFAIL: has-no-cxx-module-support
 
+// picolibc does not provide the required timespec_get function, and the
+// "using-if-exists" mechanism apparently did not work here.
+// XFAIL: LIBCXX-PICOLIBC-FIXME
+
 // A minimal test to validate import works.
 
 // MODULE_DEPENDENCIES: std.compat
diff --git a/libcxx/utils/libcxx/test/features.py b/libcxx/utils/libcxx/test/features.py
index 8c27d8c8106761..1983bc91ab171b 100644
--- a/libcxx/utils/libcxx/test/features.py
+++ b/libcxx/utils/libcxx/test/features.py
@@ -324,7 +324,6 @@ def _getAndroidDeviceApi(cfg):
         # This is not allowed per C11 7.1.2 Standard headers/6
         #  Any declaration of a library function shall have external linkage.
         when=lambda cfg: "__ANDROID__" in compilerMacros(cfg)
-        or "__PICOLIBC__" in compilerMacros(cfg)
         or platform.system().lower().startswith("aix")
         # Avoid building on platforms that don't support modules properly.
         or not hasCompileFlag(cfg, "-Wno-reserved-module-identifier"),

Copy link
Member

@mordante mordante left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing the CI.

I would like not to add LIBCXX-PICOLIBC-FIXME. Since this fixes the CI I'll land it as-is. Could you look at my suggestion is a follow-up patch?

@@ -12,6 +12,10 @@

// XFAIL: has-no-cxx-module-support

// picolibc does not provide the required timespec_get function, and the
// "using-if-exists" mechanism apparently did not work here.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't use using-if-exists in ctime.inc, that might be the problem. Otherwise when timespec_get is the only missing part we could ifdef that in ctime.inc if using-if-exists fails.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a follow up patch #78580

@mordante mordante merged commit 7f05153 into llvm:main Jan 18, 2024
mordante pushed a commit that referenced this pull request Jan 22, 2024
Picolibc does not provide timespec_get function. Adding
"using-if-exists" attribute fixes the modules.

This is a follow up patch for
#78580
blueboxd pushed a commit to blueboxd/libcxx that referenced this pull request Feb 7, 2024
Picolibc does not provide timespec_get function. Adding
"using-if-exists" attribute fixes the modules.

This is a follow up patch for
llvm/llvm-project#78580

NOKEYCHECK=True
GitOrigin-RevId: a859df3b0a099648ec4cd305f22c87ea12ebaac9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants