Skip to content

[libc++] Mark _XOPEN_SOURCE test as unsupported on FreeBSD #128950

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
Feb 28, 2025

Conversation

ldionne
Copy link
Member

@ldionne ldionne commented Feb 26, 2025

The test otherwise fails on FreeBSD, which wasn't noticed when originally landing the patch that added the test because FreeBSD CI was disabled at that moment.

The test otherwise fails on FreeBSD, which wasn't noticed when originally
landing the patch that added the test because FreeBSD CI was disabled at
that moment.
@ldionne ldionne requested a review from a team as a code owner February 26, 2025 22:31
@llvmbot llvmbot added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label Feb 26, 2025
@llvmbot
Copy link
Member

llvmbot commented Feb 26, 2025

@llvm/pr-subscribers-libcxx

Author: Louis Dionne (ldionne)

Changes

The test otherwise fails on FreeBSD, which wasn't noticed when originally landing the patch that added the test because FreeBSD CI was disabled at that moment.


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

1 Files Affected:

  • (modified) libcxx/test/libcxx/xopen_source.gen.py (+3)
diff --git a/libcxx/test/libcxx/xopen_source.gen.py b/libcxx/test/libcxx/xopen_source.gen.py
index 3f2686483730a..d4a3651181ca7 100644
--- a/libcxx/test/libcxx/xopen_source.gen.py
+++ b/libcxx/test/libcxx/xopen_source.gen.py
@@ -43,6 +43,9 @@
 // recent value of _XOPEN_SOURCE.
 // UNSUPPORTED: LIBCXX-AIX-FIXME
 
+// This test fails on FreeBSD for an unknown reason.
+// UNSUPPORTED: LIBCXX-FREEBSD-FIXME
+
 {lit_header_restrictions.get(header, '')}
 {lit_header_undeprecations.get(header, '')}
 

@ldionne
Copy link
Member Author

ldionne commented Feb 26, 2025

Errors we see without this:

# | In file included from /usr<..>/llvm-project/libcxx-ci/build/generic-cxx26/libcxx/test/libcxx/xopen_source.gen.py/chrono.xopen_source_500.compile.pass.cpp:17:
# | In file included from <..>/llvm-project/libcxx-ci/build/generic-cxx26/libcxx/test-suite-install/include/c++/v1/chrono:1053:
# | In file included from <..>/llvm-project/libcxx-ci/build/generic-cxx26/libcxx/test-suite-install/include/c++/v1/__chrono/exception.h:25:
# | In file included from <..>/llvm-project/libcxx-ci/build/generic-cxx26/libcxx/test-suite-install/include/c++/v1/format:202:
# | In file included from <..>/llvm-project/libcxx-ci/build/generic-cxx26/libcxx/test-suite-install/include/c++/v1/__format/container_adaptor.h:20:
# | In file included from <..>/llvm-project/libcxx-ci/build/generic-cxx26/libcxx/test-suite-install/include/c++/v1/__format/range_default_formatter.h:23:
# | In file included from <..>/llvm-project/libcxx-ci/build/generic-cxx26/libcxx/test-suite-install/include/c++/v1/__format/range_formatter.h:23:
# | In file included from <..>/llvm-project/libcxx-ci/build/generic-cxx26/libcxx/test-suite-install/include/c++/v1/__format/format_context.h:28:
# | <..>/llvm-project/libcxx-ci/build/generic-cxx26/libcxx/test-suite-install/include/c++/v1/__locale:719:28: error: declaration conflicts with target of using declaration already in scope
# |   719 | _LIBCPP_HIDE_FROM_ABI bool isblank(_CharT __c, const locale& __loc) {
# |       |                            ^
# | <..>/llvm-project/libcxx-ci/build/generic-cxx26/libcxx/test-suite-install/include/c++/v1/cctype:115:1: note: target of using declaration
# |   115 | using ::isblank _LIBCPP_USING_IF_EXISTS;
# |       | ^
# | <..>/llvm-project/libcxx-ci/build/generic-cxx26/libcxx/test-suite-install/include/c++/v1/cctype:115:9: note: using declaration
# |   115 | using ::isblank _LIBCPP_USING_IF_EXISTS;
# |       |         ^

and

# | In file included from /usr<..>/llvm-project/libcxx-ci/build/generic-cxx26/libcxx/test/libcxx/xopen_source.gen.py/chrono.xopen_source_500.compile.pass.cpp:17:
# | In file included from <..>/llvm-project/libcxx-ci/build/generic-cxx26/libcxx/test-suite-install/include/c++/v1/chrono:1053:
# | In file included from <..>/llvm-project/libcxx-ci/build/generic-cxx26/libcxx/test-suite-install/include/c++/v1/__chrono/exception.h:25:
# | In file included from <..>/llvm-project/libcxx-ci/build/generic-cxx26/libcxx/test-suite-install/include/c++/v1/format:211:
# | In file included from <..>/llvm-project/libcxx-ci/build/generic-cxx26/libcxx/test-suite-install/include/c++/v1/__format/format_functions.h:29:
# | In file included from <..>/llvm-project/libcxx-ci/build/generic-cxx26/libcxx/test-suite-install/include/c++/v1/__format/formatter_floating_point.h:39:
# | In file included from <..>/llvm-project/libcxx-ci/build/generic-cxx26/libcxx/test-suite-install/include/c++/v1/cmath:331:
# | <..>/llvm-project/libcxx-ci/build/generic-cxx26/libcxx/test-suite-install/include/c++/v1/math.h:395:31: error: use of undeclared identifier 'FP_NAN'
# |   395 |   return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, __x);
# |       |                               ^
# | <..>/llvm-project/libcxx-ci/build/generic-cxx26/libcxx/test-suite-install/include/c++/v1/math.h:395:39: error: use of undeclared identifier 'FP_INFINITE'
# |   395 |   return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, __x);
# |       |                                       ^

@emaste Any clue what's going on?

@H-G-Hristov
Copy link
Contributor

I think I have seen errors like the second one when I have made my attempt at implementing <debugging> on FreeBSD. I have fixed it somehow by including/excluding and shifting around headers.

@ldionne
Copy link
Member Author

ldionne commented Feb 28, 2025

Merging the patch since it did fix the specific failure I wanted to fix on FreeBSD and it makes us closer to a green CI.

@ldionne ldionne merged commit 037cf12 into llvm:main Feb 28, 2025
72 of 79 checks passed
@ldionne ldionne deleted the review/freebsd-xopen-source branch February 28, 2025 14:58
cheezeburglar pushed a commit to cheezeburglar/llvm-project that referenced this pull request Feb 28, 2025
The test otherwise fails on FreeBSD, which wasn't noticed when
originally landing the patch that added the test because FreeBSD
CI was disabled at that moment.
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