Skip to content

[libc++][test] extend XFAIL clauses to cover Amazon Linux too #129377

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
Mar 3, 2025

Conversation

pawosm-arm
Copy link
Contributor

The default triple of Amazon Linux on AArch64 is aarch64-amazon-linux, see issue highlighded by PR #109263, somewhat serious linker issues are encountered if any other triple is being used.

Unfortunately, this makes XFAIL lines like
XFAIL: target=aarch64{{.*}}-linux-gnu ineffective, making it impossible to complete all of the check-cxx on Amazon Linux without failing.

@pawosm-arm pawosm-arm requested a review from a team as a code owner March 1, 2025 10:50
@llvmbot llvmbot added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label Mar 1, 2025
@llvmbot
Copy link
Member

llvmbot commented Mar 1, 2025

@llvm/pr-subscribers-libcxx

Author: Paul Osmialowski (pawosm-arm)

Changes

The default triple of Amazon Linux on AArch64 is aarch64-amazon-linux, see issue highlighded by PR #109263, somewhat serious linker issues are encountered if any other triple is being used.

Unfortunately, this makes XFAIL lines like
XFAIL: target=aarch64{{.*}}-linux-gnu ineffective, making it impossible to complete all of the check-cxx on Amazon Linux without failing.


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

10 Files Affected:

  • (modified) libcxx/test/std/input.output/iostream.format/std.manip/setfill_wchar_max.pass.cpp (+1)
  • (modified) libcxx/test/std/re/re.alg/re.alg.match/awk.locale.pass.cpp (+1-1)
  • (modified) libcxx/test/std/re/re.alg/re.alg.match/basic.locale.pass.cpp (+1-1)
  • (modified) libcxx/test/std/re/re.alg/re.alg.match/ecma.locale.pass.cpp (+1-1)
  • (modified) libcxx/test/std/re/re.alg/re.alg.match/extended.locale.pass.cpp (+1-1)
  • (modified) libcxx/test/std/re/re.alg/re.alg.search/awk.locale.pass.cpp (+1-1)
  • (modified) libcxx/test/std/re/re.alg/re.alg.search/basic.locale.pass.cpp (+1-1)
  • (modified) libcxx/test/std/re/re.alg/re.alg.search/ecma.locale.pass.cpp (+1-1)
  • (modified) libcxx/test/std/re/re.alg/re.alg.search/extended.locale.pass.cpp (+1-1)
  • (modified) libcxx/test/std/re/re.traits/lookup_collatename.pass.cpp (+1-1)
diff --git a/libcxx/test/std/input.output/iostream.format/std.manip/setfill_wchar_max.pass.cpp b/libcxx/test/std/input.output/iostream.format/std.manip/setfill_wchar_max.pass.cpp
index 9d4126153cc23..b24c0b90d86f1 100644
--- a/libcxx/test/std/input.output/iostream.format/std.manip/setfill_wchar_max.pass.cpp
+++ b/libcxx/test/std/input.output/iostream.format/std.manip/setfill_wchar_max.pass.cpp
@@ -17,6 +17,7 @@
 // XFAIL: target={{.*}}-windows{{.*}} && libcpp-abi-version=1
 // XFAIL: target=armv{{7|8}}{{l?}}{{.*}}-linux-gnueabihf && libcpp-abi-version=1
 // XFAIL: target=aarch64{{.*}}-linux-gnu && libcpp-abi-version=1
+// XFAIL: target=aarch64{{.*}}-amazon-linux && libcpp-abi-version=1
 
 #include <iomanip>
 #include <ostream>
diff --git a/libcxx/test/std/re/re.alg/re.alg.match/awk.locale.pass.cpp b/libcxx/test/std/re/re.alg/re.alg.match/awk.locale.pass.cpp
index 57b8c13aa3c14..9cc928e71d2fb 100644
--- a/libcxx/test/std/re/re.alg/re.alg.match/awk.locale.pass.cpp
+++ b/libcxx/test/std/re/re.alg/re.alg.match/awk.locale.pass.cpp
@@ -18,7 +18,7 @@
 
 // TODO: investigation needed
 // TODO(netbsd): incomplete support for locales
-// XFAIL: target={{.*}}-linux-gnu{{.*}}, netbsd, freebsd
+// XFAIL: target={{.*}}-linux-gnu{{.*}}, {{.*}}-amazon-linux{{.*}}, netbsd, freebsd
 // REQUIRES: locale.cs_CZ.ISO8859-2
 
 #include <regex>
diff --git a/libcxx/test/std/re/re.alg/re.alg.match/basic.locale.pass.cpp b/libcxx/test/std/re/re.alg/re.alg.match/basic.locale.pass.cpp
index 430d35fe739e5..fab56e9b98d53 100644
--- a/libcxx/test/std/re/re.alg/re.alg.match/basic.locale.pass.cpp
+++ b/libcxx/test/std/re/re.alg/re.alg.match/basic.locale.pass.cpp
@@ -22,7 +22,7 @@
 //                  regex_constants::match_flag_type flags = regex_constants::match_default);
 
 // TODO: investigation needed
-// XFAIL: target={{.*}}-linux-gnu{{.*}}, freebsd
+// XFAIL: target={{.*}}-linux-gnu{{.*}}, {{.*}}-amazon-linux{{.*}}, freebsd
 
 #include <regex>
 #include <cassert>
diff --git a/libcxx/test/std/re/re.alg/re.alg.match/ecma.locale.pass.cpp b/libcxx/test/std/re/re.alg/re.alg.match/ecma.locale.pass.cpp
index b512fa9b5fcf8..8b613ecb1c1ae 100644
--- a/libcxx/test/std/re/re.alg/re.alg.match/ecma.locale.pass.cpp
+++ b/libcxx/test/std/re/re.alg/re.alg.match/ecma.locale.pass.cpp
@@ -22,7 +22,7 @@
 //                  regex_constants::match_flag_type flags = regex_constants::match_default);
 
 // TODO: investigation needed
-// XFAIL: target={{.*}}-linux-gnu{{.*}}, freebsd
+// XFAIL: target={{.*}}-linux-gnu{{.*}}, {{.*}}-amazon-linux{{.*}}, freebsd
 
 #include <regex>
 #include <cassert>
diff --git a/libcxx/test/std/re/re.alg/re.alg.match/extended.locale.pass.cpp b/libcxx/test/std/re/re.alg/re.alg.match/extended.locale.pass.cpp
index 472dc19680263..71022a1020431 100644
--- a/libcxx/test/std/re/re.alg/re.alg.match/extended.locale.pass.cpp
+++ b/libcxx/test/std/re/re.alg/re.alg.match/extended.locale.pass.cpp
@@ -22,7 +22,7 @@
 //                  regex_constants::match_flag_type flags = regex_constants::match_default);
 
 // TODO: investigation needed
-// XFAIL: target={{.*}}-linux-gnu{{.*}}, freebsd
+// XFAIL: target={{.*}}-linux-gnu{{.*}}, {{.*}}-amazon-linux{{.*}}, freebsd
 
 #include <regex>
 #include <cassert>
diff --git a/libcxx/test/std/re/re.alg/re.alg.search/awk.locale.pass.cpp b/libcxx/test/std/re/re.alg/re.alg.search/awk.locale.pass.cpp
index 9125df404b1de..c2c80100fc069 100644
--- a/libcxx/test/std/re/re.alg/re.alg.search/awk.locale.pass.cpp
+++ b/libcxx/test/std/re/re.alg/re.alg.search/awk.locale.pass.cpp
@@ -22,7 +22,7 @@
 //                  regex_constants::match_flag_type flags = regex_constants::match_default);
 
 // TODO: investigation needed
-// XFAIL: target={{.*}}-linux-gnu{{.*}}, freebsd
+// XFAIL: target={{.*}}-linux-gnu{{.*}}, {{.*}}-amazon-linux{{.*}}, freebsd
 
 #include <regex>
 #include <cassert>
diff --git a/libcxx/test/std/re/re.alg/re.alg.search/basic.locale.pass.cpp b/libcxx/test/std/re/re.alg/re.alg.search/basic.locale.pass.cpp
index f85b6a40ce129..5e13d535b5702 100644
--- a/libcxx/test/std/re/re.alg/re.alg.search/basic.locale.pass.cpp
+++ b/libcxx/test/std/re/re.alg/re.alg.search/basic.locale.pass.cpp
@@ -22,7 +22,7 @@
 //                  regex_constants::match_flag_type flags = regex_constants::match_default);
 
 // TODO: investigation needed
-// XFAIL: target={{.*}}-linux-gnu{{.*}}, freebsd
+// XFAIL: target={{.*}}-linux-gnu{{.*}}, {{.*}}-amazon-linux{{.*}}, freebsd
 
 #include <regex>
 #include <cassert>
diff --git a/libcxx/test/std/re/re.alg/re.alg.search/ecma.locale.pass.cpp b/libcxx/test/std/re/re.alg/re.alg.search/ecma.locale.pass.cpp
index aa9441cb3e58f..06ee8d1ac9caf 100644
--- a/libcxx/test/std/re/re.alg/re.alg.search/ecma.locale.pass.cpp
+++ b/libcxx/test/std/re/re.alg/re.alg.search/ecma.locale.pass.cpp
@@ -22,7 +22,7 @@
 //                  regex_constants::match_flag_type flags = regex_constants::match_default);
 
 // TODO: investigation needed
-// XFAIL: target={{.*}}-linux-gnu{{.*}}, freebsd
+// XFAIL: target={{.*}}-linux-gnu{{.*}}, {{.*}}-amazon-linux{{.*}}, freebsd
 
 #include <regex>
 #include <cassert>
diff --git a/libcxx/test/std/re/re.alg/re.alg.search/extended.locale.pass.cpp b/libcxx/test/std/re/re.alg/re.alg.search/extended.locale.pass.cpp
index 9746e45f29da5..c93b745265e56 100644
--- a/libcxx/test/std/re/re.alg/re.alg.search/extended.locale.pass.cpp
+++ b/libcxx/test/std/re/re.alg/re.alg.search/extended.locale.pass.cpp
@@ -22,7 +22,7 @@
 //                  regex_constants::match_flag_type flags = regex_constants::match_default);
 
 // TODO: investigation needed
-// XFAIL: target={{.*}}-linux-gnu{{.*}}, freebsd
+// XFAIL: target={{.*}}-linux-gnu{{.*}}, {{.*}}-amazon-linux{{.*}}, freebsd
 
 #include <regex>
 #include <cassert>
diff --git a/libcxx/test/std/re/re.traits/lookup_collatename.pass.cpp b/libcxx/test/std/re/re.traits/lookup_collatename.pass.cpp
index 178979d5b9ce8..e0ba4e5bfec27 100644
--- a/libcxx/test/std/re/re.traits/lookup_collatename.pass.cpp
+++ b/libcxx/test/std/re/re.traits/lookup_collatename.pass.cpp
@@ -23,7 +23,7 @@
 //   lookup_collatename(ForwardIterator first, ForwardIterator last) const;
 
 // TODO: investigation needed
-// XFAIL: target={{.*}}-linux-gnu{{.*}}
+// XFAIL: target={{.*}}-linux-gnu{{.*}}, {{.*}}-amazon-linux{{.*}}
 
 #include <regex>
 #include <iterator>

@pawosm-arm
Copy link
Contributor Author

This is a fresh attempt after the unfortunate PR #129140 and this one addresses Amazon Linux specifically.

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 working on this.

Do you intent to add a CI runner with Amazon Linux? Without such a runner it will be impossible to maintain these changes.

@@ -18,7 +18,7 @@

// TODO: investigation needed
// TODO(netbsd): incomplete support for locales
// XFAIL: target={{.*}}-linux-gnu{{.*}}, netbsd, freebsd
// XFAIL: target={{.*}}-linux-gnu{{.*}}, {{.*}}-amazon-linux{{.*}}, netbsd, freebsd
Copy link
Member

Choose a reason for hiding this comment

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

IMO having it on a separate line makes it easier to read, and avoids mistakes.

Suggested change
// XFAIL: target={{.*}}-linux-gnu{{.*}}, {{.*}}-amazon-linux{{.*}}, netbsd, freebsd
// XFAIL: target={{.*}}-linux-gnu{{.*}}, netbsd, freebsd
// XFAIL: target={{.*}}-amazon-linux{{.*}}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed according to your suggestion.

@mordante mordante self-assigned this Mar 1, 2025
The default triple of Amazon Linux on AArch64 is aarch64-amazon-linux,
see issue highlighded by PR llvm#109263, somewhat serious linker issues
are encountered if any other triple is being used.

Unfortunately, this makes XFAIL lines like
`XFAIL: target=aarch64{{.*}}-linux-gnu` ineffective, making it
impossible to complete all of the check-cxx on Amazon Linux without
failing.
@pawosm-arm
Copy link
Contributor Author

Thanks for working on this.

Do you intent to add a CI runner with Amazon Linux? Without such a runner it will be impossible to maintain these changes.

I'm merely helping our devops to handle this. In our CI, libc++ is being used for building LLVM which has binaries that don't depend on system-provided libstdc++. It's fairly easy on Ubuntus, but slightly more challenging on others. And we demand that all checks are passing after each stage.

@mordante
Copy link
Member

mordante commented Mar 2, 2025

Thanks for working on this.
Do you intent to add a CI runner with Amazon Linux? Without such a runner it will be impossible to maintain these changes.

I'm merely helping our devops to handle this. In our CI, libc++ is being used for building LLVM which has binaries that don't depend on system-provided libstdc++. It's fairly easy on Ubuntus, but slightly more challenging on others. And we demand that all checks are passing after each stage.

Thanks for the information. I don't mind too much to add some XFAILs to tests. However when there are Amazon Linux specific code changes required we really want to have a CI runner.

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.

LGTM.

The FreeBSD error is unrelated to your changes.

@github-project-automation github-project-automation bot moved this from Needs Triage to Needs Merge in LLVM Release Status Mar 2, 2025
@pawosm-arm pawosm-arm merged commit 8f4ee42 into llvm:main Mar 3, 2025
77 of 81 checks passed
@github-project-automation github-project-automation bot moved this from Needs Merge to Done in LLVM Release Status Mar 3, 2025
@pawosm-arm
Copy link
Contributor Author

/cherry-pick 8f4ee42

@llvmbot
Copy link
Member

llvmbot commented Mar 3, 2025

Failed to create pull request for issue129377 https://github.com/llvm/llvm-project/actions/runs/13637501343

@llvmbot
Copy link
Member

llvmbot commented Mar 3, 2025

/pull-request #129566

swift-ci pushed a commit to swiftlang/llvm-project that referenced this pull request Mar 12, 2025
…29377)

The default triple of Amazon Linux on AArch64 is aarch64-amazon-linux,
see issue highlighded by PR llvm#109263, somewhat serious linker issues are
encountered if any other triple is being used.

Unfortunately, this makes XFAIL lines like
`XFAIL: target=aarch64{{.*}}-linux-gnu` ineffective, making it
impossible to complete all of the check-cxx on Amazon Linux without
failing.

(cherry picked from commit 8f4ee42)
jph-13 pushed a commit to jph-13/llvm-project that referenced this pull request Mar 21, 2025
…29377)

The default triple of Amazon Linux on AArch64 is aarch64-amazon-linux,
see issue highlighded by PR llvm#109263, somewhat serious linker issues are
encountered if any other triple is being used.

Unfortunately, this makes XFAIL lines like
`XFAIL: target=aarch64{{.*}}-linux-gnu` ineffective, making it
impossible to complete all of the check-cxx on Amazon Linux without
failing.
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
Development

Successfully merging this pull request may close these issues.

3 participants